diff options
-rw-r--r-- | compiler/sempass2.nim | 1 | ||||
-rw-r--r-- | tests/errmsgs/t6499.nim | 6 | ||||
-rw-r--r-- | tests/system/tmagics.nim | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index b58d08a01..974711047 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -1223,6 +1223,7 @@ proc track(tracked: PEffects, n: PNode) = of nkTupleConstr: for i in 0..<n.len: track(tracked, n[i]) + notNilCheck(tracked, n[i].skipColon, n[i].typ) if tracked.owner.kind != skMacro: if n[i].kind == nkExprColonExpr: createTypeBoundOps(tracked, n[i][0].typ, n.info) diff --git a/tests/errmsgs/t6499.nim b/tests/errmsgs/t6499.nim new file mode 100644 index 000000000..25e78fdbb --- /dev/null +++ b/tests/errmsgs/t6499.nim @@ -0,0 +1,6 @@ +discard """ + errormsg: "'chr' is a built-in and cannot be used as a first-class procedure" +""" + +# bug #6499 +let x = (chr, 0) diff --git a/tests/system/tmagics.nim b/tests/system/tmagics.nim index e52912b74..6088c9600 100644 --- a/tests/system/tmagics.nim +++ b/tests/system/tmagics.nim @@ -57,10 +57,6 @@ block t9442: GC_ref(v3) GC_unref(v3) -block: # bug #6499 - let x = (chr, 0) - doAssert x[1] == 0 - block: # bug #12229 proc foo(T: typedesc) = discard foo(ref) |