added warning for confusing var declarations
This commit is contained in:
parent
9222a8a0eb
commit
2ff8d17369
5 changed files with 19 additions and 7 deletions
|
|
@ -244,7 +244,16 @@ proc transformConstSection(c: PTransf, v: PNode): PTransNode =
|
|||
result[i] = PTransNode(b)
|
||||
else:
|
||||
result[i] = PTransNode(it)
|
||||
|
||||
|
||||
proc trivialBody(s: PSym): PNode =
|
||||
# a routine's body is trivially inlinable if marked as 'inline' and its
|
||||
# body consists of only 1 statement. It is important that we perform this
|
||||
# optimization here as 'distinct strings' may cause string copying otherwise:
|
||||
# proc xml(s: string): TXmlString = return xmlstring(s)
|
||||
# We have to generate a ``nkLineTracking`` node though to not lose
|
||||
# debug information:
|
||||
# XXX to implement
|
||||
nil
|
||||
|
||||
proc hasContinue(n: PNode): bool =
|
||||
case n.kind
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue