File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed
Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,9 @@ enum Hoo : string
8585/* testBackedEnumNoSpaceBetweenNameAndColon */
8686enum Suit: int implements Colorful, CardGame {}
8787
88+ /* testFunctionReturnByRefWithReservedKeywordEach */
89+ function &each () {}
90+
8891/* testLiveCoding */
8992// Intentional parse error. This has to be the last test in the file.
9093function // Comment.
Original file line number Diff line number Diff line change @@ -192,6 +192,10 @@ public function dataGetDeclarationName()
192192 '/* testBackedEnumNoSpaceBetweenNameAndColon */ ' ,
193193 'Suit ' ,
194194 ],
195+ 'function-return-by-reference-with-reserved-keyword-each ' => [
196+ '/* testFunctionReturnByRefWithReservedKeywordEach */ ' ,
197+ 'each ' ,
198+ ],
195199 ];
196200 }
197201}
Original file line number Diff line number Diff line change @@ -12,6 +12,15 @@ interface switch{ // Intentional parse error.
1212 public function someFunction ();
1313}
1414
15+ /* testFunctionReturnByRefWithReservedKeywordParent */
16+ function &parent () {}
17+
18+ /* testFunctionReturnByRefWithReservedKeywordSelf */
19+ function &self () {}
20+
21+ /* testFunctionReturnByRefWithReservedKeywordStatic */
22+ function &static () {}
23+
1524/* testLiveCoding */
1625// Intentional parse error. Redundancy testing.
1726abstract class
Original file line number Diff line number Diff line change @@ -117,6 +117,18 @@ public function dataGetName()
117117 'testMarker ' => '/* testInvalidInterfaceName */ ' ,
118118 'expected ' => 'switch ' ,
119119 ],
120+ 'function-return-by-reference-with-reserved-keyword-parent ' => [
121+ '/* testFunctionReturnByRefWithReservedKeywordParent */ ' ,
122+ 'parent ' ,
123+ ],
124+ 'function-return-by-reference-with-reserved-keyword-self ' => [
125+ '/* testFunctionReturnByRefWithReservedKeywordSelf */ ' ,
126+ 'self ' ,
127+ ],
128+ 'function-return-by-reference-with-reserved-keyword-static ' => [
129+ '/* testFunctionReturnByRefWithReservedKeywordStatic */ ' ,
130+ 'static ' ,
131+ ],
120132 ];
121133 }
122134}
You can’t perform that action at this time.
0 commit comments