ARC: optimize complete object constructors to use nimNewObjUninit

This commit is contained in:
Araq 2020-01-26 10:50:21 +01:00 • committed by Andreas Rumpf
commit a10cc18247
5 changed files with 40 additions and 12 deletions

View file

@ -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