summary refs log tree commit diff stats
path: root/compiler/sigmatch.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-11-02 02:47:34 +0100
committerAraq <rumpf_a@web.de>2011-11-02 02:47:34 +0100
commitcacb200eff810483aba9ae055bdefe751e124a53 (patch)
tree09b97e57f46dd022f09e3ab72f7866cd9104d100 /compiler/sigmatch.nim
parent77222b2aaddac5deeb1e68b750dae255fa095c6e (diff)
downloadNim-cacb200eff810483aba9ae055bdefe751e124a53.tar.gz
fixes #2
Diffstat (limited to 'compiler/sigmatch.nim')
-rwxr-xr-xcompiler/sigmatch.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index fac7815d1..16a93f47f 100755
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -172,7 +172,9 @@ proc minRel(a, b: TTypeRelation): TTypeRelation =
   
 proc tupleRel(mapping: var TIdTable, f, a: PType): TTypeRelation = 
   result = isNone
-  if sonsLen(a) == sonsLen(f): 
+  if sameType(f, a):
+    result = isEqual
+  elif sonsLen(a) == sonsLen(f): 
     result = isEqual
     for i in countup(0, sonsLen(f) - 1): 
       var m = typeRel(mapping, f.sons[i], a.sons[i])