From: Jean Privat Date: Wed, 27 May 2015 13:28:06 +0000 (-0400) Subject: modelize: rely on `AAttrPropdef::mreadpropdef` to be the main property X-Git-Tag: v0.7.6~54^2~9 X-Git-Url: http://nitlanguage.org modelize: rely on `AAttrPropdef::mreadpropdef` to be the main property Signed-off-by: Jean Privat --- diff --git a/src/compiler/abstract_compiler.nit b/src/compiler/abstract_compiler.nit index b8e78a5..61b59a9 100644 --- a/src/compiler/abstract_compiler.nit +++ b/src/compiler/abstract_compiler.nit @@ -2494,7 +2494,7 @@ redef class AAttrPropdef var oldnode = v.current_node v.current_node = self var old_frame = v.frame - var frame = new StaticFrame(v, self.mpropdef.as(not null), recv.mcasttype.undecorate.as(MClassType), [recv]) + var frame = new StaticFrame(v, self.mreadpropdef.as(not null), recv.mcasttype.undecorate.as(MClassType), [recv]) v.frame = frame var value diff --git a/src/interpreter/naive_interpreter.nit b/src/interpreter/naive_interpreter.nit index 91c4a87..53f2f41 100644 --- a/src/interpreter/naive_interpreter.nit +++ b/src/interpreter/naive_interpreter.nit @@ -1245,7 +1245,7 @@ redef class AAttrPropdef do if is_lazy then return if has_value then - var f = v.new_frame(self, mpropdef.as(not null), [recv]) + var f = v.new_frame(self, mreadpropdef.as(not null), [recv]) evaluate_expr(v, recv, f) return end diff --git a/src/rapid_type_analysis.nit b/src/rapid_type_analysis.nit index e27a98e..a87bc94 100644 --- a/src/rapid_type_analysis.nit +++ b/src/rapid_type_analysis.nit @@ -354,7 +354,7 @@ class RapidTypeAnalysis for npropdef in modelbuilder.collect_attr_propdef(cd) do if not npropdef.has_value then continue - var mpropdef = npropdef.mpropdef.as(not null) + var mpropdef = npropdef.mreadpropdef.as(not null) var v = new RapidTypeVisitor(self, bound_mtype, mpropdef) v.enter_visit(npropdef.n_expr) v.enter_visit(npropdef.n_block) diff --git a/src/semantize/typing.nit b/src/semantize/typing.nit index 3bca2cb..9676168 100644 --- a/src/semantize/typing.nit +++ b/src/semantize/typing.nit @@ -760,8 +760,8 @@ redef class AAttrPropdef do if not has_value then return - var mpropdef = self.mpropdef - if mpropdef == null then return # skip error + var mpropdef = self.mreadpropdef + if mpropdef == null or mpropdef.msignature == null then return # skip error var v = new TypeVisitor(modelbuilder, mpropdef.mclassdef.mmodule, mpropdef) self.selfvariable = v.selfvariable