improvements for 'not nil' checking
This commit is contained in:
parent
0097305953
commit
d4c91bbd85
9 changed files with 99 additions and 27 deletions
|
|
@ -865,7 +865,6 @@ proc semTypeNode(c: PContext, n: PNode, prev: PType): PType =
|
|||
if result.kind in NilableTypes and n.sons[2].kind == nkNilLit:
|
||||
result = freshType(result, prev)
|
||||
result.flags.incl(tfNotNil)
|
||||
result.flags.incl(tfNeedsInit)
|
||||
else:
|
||||
LocalError(n.info, errGenerated, "invalid type")
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue