summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorMatthew Baulch <baulch.matt@gmail.com>2016-07-05 22:56:22 +1000
committerMatthew Baulch <baulch.matt@gmail.com>2016-07-05 22:56:22 +1000
commit109c9d551f7a00394b6211d8983ca0169a0e7fdf (patch)
tree86955747c670eaada03ee0862f68a5f8385b5417 /compiler
parent5f9da6b2ae137feb762c149ed5a7e0eb0f23a17d (diff)
downloadNim-109c9d551f7a00394b6211d8983ca0169a0e7fdf.tar.gz
Regard nil nodes as having equal type constraints.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/types.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/types.nim b/compiler/types.nim
index bada47075..107bd9f75 100644
--- a/compiler/types.nim
+++ b/compiler/types.nim
@@ -727,6 +727,7 @@ proc equalParam(a, b: PSym): TParamsEquality =
     result = paramsNotEqual
 
 proc sameConstraints(a, b: PNode): bool =
+  if isNil(a) and isNil(b): return true
   internalAssert a.len == b.len
   for i in 1 .. <a.len:
     if not exprStructuralEquivalent(a[i].sym.constraint,