diff options
author | Araq <rumpf_a@web.de> | 2015-03-28 00:41:44 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-03-28 00:47:03 +0100 |
commit | 165619552a7ad0fa4f594963ee0441dd711edfd4 (patch) | |
tree | a81ec165685fdae56a01d26fe21a96e3fbd45597 /compiler | |
parent | bd56d36326da28326a494945bfafb8e40f370c8d (diff) | |
download | Nim-165619552a7ad0fa4f594963ee0441dd711edfd4.tar.gz |
fixes #2355
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semexprs.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index bc7303266..28373e3c6 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1904,7 +1904,8 @@ proc checkInitialized(n: PNode, ids: IntSet, info: TLineInfo) = of nkOfBranch, nkElse: checkInitialized(lastSon(n.sons[i]), ids, info) else: internalError(info, "checkInitialized") of nkSym: - if tfNeedsInit in n.sym.typ.flags and n.sym.name.id notin ids: + if {tfNotNil, tfNeedsInit} * n.sym.typ.flags != {} and + n.sym.name.id notin ids: message(info, errGenerated, "field not initialized: " & n.sym.name.s) else: internalError(info, "checkInitialized") |