Skip to content

Commit 2269951

Browse files
committed
Zend: add interface inheriting enum interface implemented in class test
1 parent cccc548 commit 2269951

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Interface that is extended from Enum only interface shouldn't be implementable by non-enum class
3+
--FILE--
4+
<?php
5+
interface I extends UnitEnum {}
6+
7+
class C implements I {
8+
public static function cases(): array {
9+
return [];
10+
}
11+
}
12+
13+
?>
14+
--EXPECTF--
15+
Fatal error: Non-enum class C cannot implement interface UnitEnum in %s on line %d

0 commit comments

Comments
 (0)