diff options
author | Zahary Karadjov <zahary@gmail.com> | 2020-03-27 21:58:32 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-04-01 19:38:44 +0200 |
commit | 54f06427c8c2d1a29bf7dab2b9e36fc4bb231d3c (patch) | |
tree | 06935b8b36d1543c8b7f391807d3c004a36fb37b /compiler/semexprs.nim | |
parent | 8ae48292ff3e3b38fd4013b1983c860fd0d49f4c (diff) | |
download | Nim-54f06427c8c2d1a29bf7dab2b9e36fc4bb231d3c.tar.gz |
Enable the requiresInit checks only for objects
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 58f3f9316..d39fe146e 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) |