summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-27 14:59:28 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-28 20:23:24 +0200
commit471672fecc579b9453d3e756d3fa4f51a8e72b5e (patch)
tree30ed671929a59a68b65e8066fbc94a65013c1686 /compiler
parentf18ff6a033643dc861002b18124feafb52cedfd3 (diff)
downloadNim-471672fecc579b9453d3e756d3fa4f51a8e72b5e.tar.gz
fix: generic tuples instantiations were cached incorrectly
Diffstat (limited to 'compiler')
-rw-r--r--compiler/types.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/types.nim b/compiler/types.nim
index a87f9470f..5fbab85b9 100644
--- a/compiler/types.nim
+++ b/compiler/types.nim
@@ -803,6 +803,8 @@ proc sameTuple(a, b: PType, c: var TSameTypeClosure): bool =
           result = x.name.id == y.name.id
           if not result: break
         else: internalError(a.n.info, "sameTuple")
+    elif a.n != b.n and (a.n == nil or b.n == nil) and IgnoreTupleFields notin c.flags:
+      result = false
 
 template ifFastObjectTypeCheckFailed(a, b: PType, body: stmt) {.immediate.} =
   if tfFromGeneric notin a.flags + b.flags: