diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-11-26 23:16:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-26 22:16:43 +0000 |
commit | 9f1c5f64c5a9a3de5f4f39040b3df484de649ef2 (patch) | |
tree | 2be0e7cc057acdf98e299d34501aa6de1efe8544 /compiler | |
parent | 13b1b19a83000743df3c844a34652e7ad0d308f5 (diff) | |
download | Nim-9f1c5f64c5a9a3de5f4f39040b3df484de649ef2.tar.gz |
fixes #16119 [backport:1.4] (#16149)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semstmts.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index d7f66208e..d3d8c0fb8 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -477,7 +477,7 @@ proc semLowerLetVarCustomPragma(c: PContext, a: PNode, n: PNode): PNode = proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode = if n.len == 1: result = semLowerLetVarCustomPragma(c, n[0], n) - if result!=nil: return result + if result != nil: return result var b: PNode result = copyNode(n) @@ -513,7 +513,7 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode = def = fitNode(c, typ, def, def.info) #changeType(def.skipConv, typ, check=true) else: - typ = def.typ.skipTypes({tyStatic}).skipIntLit(c.idgen) + typ = def.typ.skipTypes({tyStatic, tySink}).skipIntLit(c.idgen) if typ.kind in tyUserTypeClasses and typ.isResolvedUserTypeClass: typ = typ.lastSon if hasEmpty(typ): @@ -1282,7 +1282,7 @@ proc typeSectionRightSidePass(c: PContext, n: PNode) = obj.ast = a.shallowCopy case a[0].kind of nkSym: obj.ast[0] = symNode - of nkPragmaExpr: + of nkPragmaExpr: obj.ast[0] = a[0].shallowCopy obj.ast[0][0] = symNode obj.ast[0][1] = a[0][1] |