diff options
author | Araq <rumpf_a@web.de> | 2013-07-20 20:18:21 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-07-20 20:18:21 +0200 |
commit | 84534ce4b8d2717f672e870921cab46dc2397c28 (patch) | |
tree | 7af128c33e1e40f44d538c2e1ba60e4c026f4770 /compiler/guards.nim | |
parent | aa88e150dac8753dc94da237c2b8d09b2ba7a91d (diff) | |
parent | a932d201d2a0090e3501d9fcf2e38b65f2b0997a (diff) | |
download | Nim-84534ce4b8d2717f672e870921cab46dc2397c28.tar.gz |
Merge branch 'master' of github.com:Araq/Nimrod
Diffstat (limited to 'compiler/guards.nim')
-rw-r--r-- | compiler/guards.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/guards.nim b/compiler/guards.nim index d8441c544..8d271fa6d 100644 --- a/compiler/guards.nim +++ b/compiler/guards.nim @@ -187,7 +187,8 @@ proc usefulFact(n: PNode): PNode = # if a: # ... # We make can easily replace 'a' by '2 < x' here: - result = usefulFact(n.sym.ast) + if n.sym.ast != nil: + result = usefulFact(n.sym.ast) elif n.kind == nkStmtListExpr: result = usefulFact(n.lastSon) |