|
@@ -580,10 +580,10 @@ and gen_expr ctx e =
|
|
|
print ctx " %s " (Ast.s_binop op);
|
|
|
gen_value_op ctx e2;
|
|
|
(* variable fields on interfaces are generated as (class["field"] as class) *)
|
|
|
- | TField ({etype = TInst({cl_interface = true} as c,_)} as e,FInstance (_,{ cf_name = s }))
|
|
|
+ | TField ({etype = TInst({cl_interface = true} as c,_)} as ei,FInstance (_,{ cf_name = s }))
|
|
|
when (try (match (PMap.find s c.cl_fields).cf_kind with Var _ -> true | _ -> false) with Not_found -> false) ->
|
|
|
spr ctx "(";
|
|
|
- gen_value ctx e;
|
|
|
+ gen_value ctx ei;
|
|
|
print ctx "[\"%s\"]" s;
|
|
|
print ctx " as %s)" (type_str ctx e.etype e.epos);
|
|
|
| TField({eexpr = TArrayDecl _} as e1,s) ->
|