diff options
author | Matthew Baulch <baulch.matt@gmail.com> | 2016-07-05 22:56:22 +1000 |
---|---|---|
committer | Matthew Baulch <baulch.matt@gmail.com> | 2016-07-05 22:56:22 +1000 |
commit | 109c9d551f7a00394b6211d8983ca0169a0e7fdf (patch) | |
tree | 86955747c670eaada03ee0862f68a5f8385b5417 /compiler | |
parent | 5f9da6b2ae137feb762c149ed5a7e0eb0f23a17d (diff) | |
download | Nim-109c9d551f7a00394b6211d8983ca0169a0e7fdf.tar.gz |
Regard nil nodes as having equal type constraints.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/types.nim | 1 |
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, |