Skip to content

Commit 60acf78

Browse files
committed
Add test for issue nikic#78
This has been fixed upstream.
1 parent bdd49ef commit 60acf78

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/multiple_final_modifiers.phpt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
Multiple final multipliers should generate CompileError, not a fatal error
3+
--SKIPIF--
4+
<?php if (PHP_VERSION_ID < 70300) die('skip Requires PHP 7.3+'); ?>
5+
--FILE--
6+
<?php
7+
8+
$code = <<<'PHP'
9+
<?php class C {
10+
final final function foo($fff) {}
11+
}
12+
PHP;
13+
14+
try {
15+
ast\parse_code($code, $version=50);
16+
} catch (CompileError $e) {
17+
echo $e->getMessage(), "\n";
18+
}
19+
?>
20+
--EXPECT--
21+
Multiple final modifiers are not allowed

0 commit comments

Comments
 (0)