Skip to content

Commit a7b48e1

Browse files
committed
Verify missing argument
1 parent 55fc0bd commit a7b48e1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/test/php/lang/ast/unittest/emit/PipelinesTest.class.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,23 @@ public function run() {
110110
}
111111

112112
#[Test, Expect(Error::class)]
113-
public function pipe_to_missing() {
113+
public function missing_function() {
114114
$this->run('class %T {
115115
public function run() {
116116
return "test" |> "__missing";
117117
}
118118
}');
119119
}
120120

121+
#[Test, Expect(Error::class)]
122+
public function missing_argument() {
123+
$this->run('class %T {
124+
public function run() {
125+
return 5 |> fn($a, $b) => $a * $b;
126+
}
127+
}');
128+
}
129+
121130
#[Test]
122131
public function pipe_chain() {
123132
$r= $this->run('class %T {

0 commit comments

Comments
 (0)