diff options
author | Araq <rumpf_a@web.de> | 2020-01-26 10:50:21 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-01-26 13:43:02 +0100 |
commit | a10cc18247cb576aa409e9056ed99f23539d14f9 (patch) | |
tree | 8ad1a8ac55ccb34b9438bbfb57476fcad01d7261 /compiler/semobjconstr.nim | |
parent | ab35f07e774c3faaee3708479523e66614eb3aa6 (diff) | |
download | Nim-a10cc18247cb576aa409e9056ed99f23539d14f9.tar.gz |
ARC: optimize complete object constructors to use nimNewObjUninit
Diffstat (limited to 'compiler/semobjconstr.nim')
-rw-r--r-- | compiler/semobjconstr.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semobjconstr.nim b/compiler/semobjconstr.nim index 0ddec1706..489bc6684 100644 --- a/compiler/semobjconstr.nim +++ b/compiler/semobjconstr.nim @@ -388,3 +388,6 @@ proc semObjConstr(c: PContext, n: PNode, flags: TExprFlags): PNode = # 2) No such field exists in the constructed type localError(c.config, field.info, errUndeclaredFieldX % id.s) return + + if initResult == initFull: + incl result.flags, nfAllFieldsSet |