diff options
author | Alexander Ivanov <alehander42@gmail.com> | 2019-04-05 17:43:36 +0300 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-04-05 16:43:36 +0200 |
commit | f101f09256d5d788a404c1d0a2301ed7853b0f14 (patch) | |
tree | 609b913b6b9cab692112dcf4c80d5259b3cd579c /compiler/semstmts.nim | |
parent | 3a5a0f6d46fa0b43ec223d60b2e0f600305eb5f8 (diff) | |
download | Nim-f101f09256d5d788a404c1d0a2301ed7853b0f14.tar.gz |
Fix astdef typ deref (#10245)
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 6fd87d26f..93af6ddbb 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -336,7 +336,7 @@ proc checkNilable(c: PContext; v: PSym) = {tfNotNil, tfNeedsInit} * v.typ.flags != {}: if v.astdef.isNil: message(c.config, v.info, warnProveInit, v.name.s) - elif tfNotNil in v.typ.flags and tfNotNil notin v.astdef.typ.flags: + elif tfNotNil in v.typ.flags and not v.astdef.typ.isNil and tfNotNil notin v.astdef.typ.flags: message(c.config, v.info, warnProveInit, v.name.s) #include liftdestructors |