php-parser/test/code/parser/stmt/class/modifier.test-fail
nikic fbaa1e5fc3 Add information on expected tokens to syntax errors
This now mimics the error messages provided by PHP itself (pre 5.4).
2013-01-15 17:30:14 +01:00

29 lines
775 B
Plaintext

Invalid modifier combination
-----
<?php class A { public public $a; }
-----
Multiple access type modifiers are not allowed on line 1
-----
<?php class A { public protected $a; }
-----
Multiple access type modifiers are not allowed on line 1
-----
<?php class A { abstract abstract a(); }
-----
Multiple abstract modifiers are not allowed on line 1
-----
<?php class A { static static $a; }
-----
Multiple static modifiers are not allowed on line 1
-----
<?php class A { final final a() {} }
-----
Multiple final modifiers are not allowed on line 1
-----
<?php class A { abstract final a(); }
-----
Cannot use the final and abstract modifier at the same time on line 1
-----
<?php abstract final class A { }
-----
Syntax error, unexpected T_FINAL, expecting T_CLASS on line 1