Browse Source

[php] wrap TEnumParameter in `_hx_deref` because it could contain constructors

Simon Krajewski 11 years ago
parent
commit
8213dcabb9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      genphp.ml

+ 2 - 0
genphp.ml

@@ -1233,7 +1233,9 @@ and gen_expr ctx e =
 			gen_value_op ctx e2;
 			gen_value_op ctx e2;
 		));
 		));
 	| TEnumParameter(e1,_,i) ->
 	| TEnumParameter(e1,_,i) ->
+		spr ctx "_hx_deref(";
 		gen_value ctx e1;
 		gen_value ctx e1;
+		spr ctx ")";
 		print ctx "->params[%d]" i;
 		print ctx "->params[%d]" i;
 	| TField (e1,s) ->
 	| TField (e1,s) ->
 		gen_tfield ctx e e1 (field_name s)
 		gen_tfield ctx e e1 (field_name s)