Skip to content

Commit 05d94bc

Browse files
committed
Add test for final readonly classes
1 parent cba6a23 commit 05d94bc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
The readonly and final class modifiers can be defined in the same time
3+
--FILE--
4+
<?php
5+
6+
final readonly class Foo
7+
{
8+
}
9+
10+
readonly class Bar extends Foo
11+
{
12+
}
13+
14+
?>
15+
--EXPECTF--
16+
Fatal error: Class Bar cannot extend final class Foo in %s on line %d

0 commit comments

Comments
 (0)