File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/test/php/lang/ast/unittest/emit Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public function run() { return $this->length(...); }
52
52
}
53
53
54
54
#[Test]
55
- public function variable_function () {
55
+ public function string_reference () {
56
56
$ this ->verify ('class <T> {
57
57
public function run() {
58
58
$func= "strlen";
@@ -62,7 +62,17 @@ public function run() {
62
62
}
63
63
64
64
#[Test]
65
- public function instance_method_reference () {
65
+ public function fn_reference () {
66
+ $ this ->verify ('class <T> {
67
+ public function run() {
68
+ $func= fn($arg) => strlen($arg);
69
+ return $func(...);
70
+ }
71
+ } ' );
72
+ }
73
+
74
+ #[Test]
75
+ public function instance_property_reference () {
66
76
$ this ->verify ('class <T> {
67
77
private $func= "strlen";
68
78
public function run() {
You can’t perform that action at this time.
0 commit comments