Turn the warning for uninitialized (result) variables into errors
This commit is contained in:
parent
e0bb78553a
commit
1b570f2b18
7 changed files with 103 additions and 17 deletions
|
|
@ -1396,6 +1396,9 @@ proc copyType*(t: PType, owner: PSym, keepId: bool): PType =
|
|||
|
||||
proc exactReplica*(t: PType): PType = copyType(t, t.owner, true)
|
||||
|
||||
template requiresInit*(t: PType): bool =
|
||||
t.flags * {tfRequiresInit, tfHasRequiresInit, tfNotNil} != {}
|
||||
|
||||
proc copySym*(s: PSym): PSym =
|
||||
result = newSym(s.kind, s.name, s.owner, s.info, s.options)
|
||||
#result.ast = nil # BUGFIX; was: s.ast which made problems
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue