X-Git-Url: http://nitlanguage.org diff --git a/src/interpreter/naive_interpreter.nit b/src/interpreter/naive_interpreter.nit index bbdb30c..7557da7 100644 --- a/src/interpreter/naive_interpreter.nit +++ b/src/interpreter/naive_interpreter.nit @@ -2295,8 +2295,12 @@ redef class ACallrefExpr do var recv = v.expr(self.n_expr) if recv == null then return null + var mtype = self.mtype assert mtype != null - var inst = new CallrefInstance(mtype.as(not null), recv, callsite.as(not null)) + # In case we are in generic class where formal parameter can not + # be resolved. + var mtype2 = v.unanchor_type(mtype) + var inst = new CallrefInstance(mtype2, recv, callsite.as(not null)) return inst end end