@@ -3,6 +3,8 @@
Bugfixes:
all : fixed issue with side-effect detection when optimizing (#5911)
+ php7 : Allow user-defined modules in `php` package (#5921)
+ php7 : Dereference some of `php.Syntax` methods if required (#5923)
2016-12-24: 3.4.0-RC2
@@ -364,6 +364,12 @@ let needs_dereferencing expr =
| TArrayDecl _ -> true
| TObjectDecl _ -> true
| TConst TNull -> true
+ (* some of `php.Syntax` methods *)
+ | TCall ({ eexpr = TField (_, FStatic ({ cl_path = syntax_type_path }, { cf_name = name })) }, _) ->
+ (match name with
+ | "binop" | "object" | "array" -> true
+ | _ -> false
+ )
| _ -> false
in
match expr.eexpr with
@@ -0,0 +1,18 @@
+package unit.issues;
+
+#if php7
+import php.Syntax.*;
+#end
+class Issue5923 extends unit.Test {
+ function test() {
+ //These expressions should not fail at runtime
+ binop({}, '??', null).value = 1;
+ object(arrayDecl()).value = 1;
+ array({})['value'] = 1;
+ t(true);
+ }
+}