Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[php7] dereference Syntax.binop(), Syntax.array() and Syntax.object()…
… in left part of assignments (fixes #5923)
- Loading branch information
1 parent
e3b8bcc
commit e2e3550
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package unit.issues; | ||
|
||
#if php7 | ||
import php.Syntax.*; | ||
#end | ||
|
||
class Issue5923 extends unit.Test { | ||
#if php7 | ||
function test() { | ||
//These expressions should not fail at runtime | ||
binop({}, '??', null).value = 1; | ||
object(arrayDecl()).value = 1; | ||
array({})['value'] = 1; | ||
|
||
t(true); | ||
} | ||
#end | ||
} |