Skip to content

Commit 7444fdd

Browse files
committed
Test mixed signature
1 parent 9fee741 commit 7444fdd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Zend/tests/named_params/lsp_no_conflict.phpt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@ class D implements I, J, K {
4747
(new D)->method(d: 42);
4848
echo "\n";
4949

50+
interface U {
51+
public function test($foo, $bar);
52+
}
53+
class V implements U {
54+
public function test($a, $b) {
55+
echo __METHOD__ . ": $a, $b\n";
56+
}
57+
}
58+
59+
(new V)->test(a: "foo", b: "bar");
60+
(new V)->test(foo: "foo", bar: "bar");
61+
// Weird, but works:
62+
(new V)->test(a: "foo", bar: "bar");
63+
echo "\n";
64+
5065
trait T {
5166
abstract public function method($t);
5267
}
@@ -94,6 +109,10 @@ D::method: 42
94109
D::method: 42
95110
D::method: 42
96111

112+
V::test: foo, bar
113+
V::test: foo, bar
114+
V::test: foo, bar
115+
97116
Y::method: 42
98117
Y::method: 42
99118
Y::method: 42

0 commit comments

Comments
 (0)