diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-07-23 18:21:44 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-07-23 20:27:17 +0200 |
commit | 18a70a75638ded6ff23b2a9a57edfc7dd09bb5b1 (patch) | |
tree | a297425e110c5edcf95140a0acc1331a95f6fe9d | |
parent | c90c53e8bb93c99a323684d73df7e7ec4791107d (diff) | |
download | Nim-18a70a75638ded6ff23b2a9a57edfc7dd09bb5b1.tar.gz |
fixes #15036
-rw-r--r-- | compiler/ast.nim | 3 | ||||
-rw-r--r-- | compiler/injectdestructors.nim | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index d8fe6b1c0..6ca79aeee 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -230,7 +230,7 @@ type TNodeKinds* = set[TNodeKind] type - TSymFlag* = enum # 42 flags! + TSymFlag* = enum # 43 flags! sfUsed, # read access of sym (for warnings) or simply used sfExported, # symbol is exported from module sfFromGeneric, # symbol is instantiation of a generic; this is needed @@ -294,6 +294,7 @@ type sfNeverRaises # proc can never raise an exception, not even OverflowDefect # or out-of-memory sfUsedInFinallyOrExcept # symbol is used inside an 'except' or 'finally' + sfSingleUsedTemp # For temporaries that we know will only be used once TSymFlags* = set[TSymFlag] diff --git a/compiler/injectdestructors.nim b/compiler/injectdestructors.nim index 752438180..01f72744a 100644 --- a/compiler/injectdestructors.nim +++ b/compiler/injectdestructors.nim @@ -59,8 +59,6 @@ proc getTemp(c: var Con; s: var Scope; typ: PType; info: TLineInfo): PNode = s.vars.add(sym) result = newSymNode(sym) -const sfSingleUsedTemp = sfExported # For temporaries that we know will only be used once - proc nestedScope(parent: var Scope): Scope = Scope(vars: @[], wasMoved: @[], final: @[], needsTry: false, parent: addr(parent)) |