From: Jean Privat Date: Mon, 21 Jul 2014 14:57:43 +0000 (-0400) Subject: engine: skip noinit attributes on free constructors X-Git-Tag: v0.6.7~33^2~1 X-Git-Url: http://nitlanguage.org engine: skip noinit attributes on free constructors Signed-off-by: Jean Privat --- diff --git a/src/abstract_compiler.nit b/src/abstract_compiler.nit index 1296ddb..c4ddcb0 100644 --- a/src/abstract_compiler.nit +++ b/src/abstract_compiler.nit @@ -2081,7 +2081,7 @@ redef class AClassdef var i = 1 # Collect undefined attributes for npropdef in self.n_propdefs do - if npropdef isa AAttrPropdef and npropdef.n_expr == null then + if npropdef isa AAttrPropdef and npropdef.n_expr == null and not npropdef.noinit then v.write_attribute(npropdef.mpropdef.mproperty, recv, arguments[i]) i += 1 end diff --git a/src/naive_interpreter.nit b/src/naive_interpreter.nit index fc6cbfc..ba2fb39 100644 --- a/src/naive_interpreter.nit +++ b/src/naive_interpreter.nit @@ -1031,7 +1031,7 @@ redef class AClassdef var i = 1 # Collect undefined attributes for npropdef in self.n_propdefs do - if npropdef isa AAttrPropdef and npropdef.n_expr == null then + if npropdef isa AAttrPropdef and not npropdef.noinit and npropdef.n_expr == null then v.write_attribute(npropdef.mpropdef.mproperty, recv, args[i]) i += 1 end