From e2c0465e309e238fb9e50b3c96198c6f25457e9c Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 27 May 2015 09:28:06 -0400 Subject: [PATCH] modelize: rely on `AAttrPropdef::mreadpropdef` to be the main property Signed-off-by: Jean Privat --- src/compiler/abstract_compiler.nit | 2 +- src/interpreter/naive_interpreter.nit | 2 +- src/rapid_type_analysis.nit | 2 +- src/semantize/typing.nit | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) 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 -- 1.7.9.5