diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 58f3f93162..d39fe146e7 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -2268,7 +2268,7 @@ proc semMagic(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode = result = semDirectOp(c, n, flags) c.config.internalAssert result[1].typ.kind == tyTypeDesc let typ = result[1].typ.base - if typ.kind in {tyObject, tyTuple}: + if typ.kind == tyObject: checkDefaultConstruction(c, typ, n.info) else: result = semDirectOp(c, n, flags) diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 373e5fcdbe..fc624c7101 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -615,7 +615,7 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode = else: v.typ = tup b[j] = newSymNode(v) if def.kind == nkEmpty: - if v.typ.kind in {tyObject, tyTuple}: + if v.typ.kind == tyObject: checkDefaultConstruction(c, v.typ, v.info) else: checkNilable(c, v)