Skip to content

Commit 36aa41a

Browse files
committed
IsReferenceTest: fix invalid test case
Closures use clauses only take plain variables, not complex variables, like properties or array keys. In other words, this test case as-is, was a parse error. For the purposes of this test, it makes no difference what type of variable is passed, so let's fix the test.
1 parent c5e1807 commit 36aa41a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Core/File/IsReferenceTest.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ functionCall( $something , &new Foobar() );
169169
$closure = function() use (&$var){};
170170

171171
/* testUseByReferenceWithCommentFirstParam */
172-
$closure = function() use /*comment*/ (&$this->value){};
172+
$closure = function() use /*comment*/ (&$value){};
173173

174174
/* testUseByReferenceWithCommentSecondParam */
175175
$closure = function() use /*comment*/ ($varA, &$varB){};

0 commit comments

Comments
 (0)