diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-01-20 15:22:44 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-01-20 15:22:44 +0200 |
commit | a09ddfa0995db598aa2287d08a5e31ea172fcaba (patch) | |
tree | dc6c21fac4500d520c73e01672bce3cc509c6942 /compiler | |
parent | 6fd008f23ed3c1e712ddd0fc0b158b979bdbbce2 (diff) | |
download | Nim-a09ddfa0995db598aa2287d08a5e31ea172fcaba.tar.gz |
fix the segfault in #827
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sigmatch.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 1fe667a3c..bb70e0d6b 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -103,7 +103,7 @@ proc initCandidate*(ctx: PContext, c: var TCandidate, callee: PSym, for i in 1..min(sonsLen(typeParams), sonsLen(binding)-1): var formalTypeParam = typeParams.sons[i-1].typ var bound = binding[i].typ - if formalTypeParam.kind != tyTypeDesc: + if bound != nil and formalTypeParam.kind != tyTypeDesc: bound = bound.skipTypes({tyTypeDesc}) put(c.bindings, formalTypeParam, bound) |