diff options
Diffstat (limited to 'Zend/tests/enum/backed-int-case-without-value.phpt')
-rw-r--r-- | Zend/tests/enum/backed-int-case-without-value.phpt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Zend/tests/enum/backed-int-case-without-value.phpt b/Zend/tests/enum/backed-int-case-without-value.phpt new file mode 100644 index 0000000000..4b84c069b4 --- /dev/null +++ b/Zend/tests/enum/backed-int-case-without-value.phpt @@ -0,0 +1,14 @@ +--TEST-- +Int backed enums with case without value +--FILE-- +<?php + +enum Foo: int { + case Bar; +} + +var_dump(Foo::Bar->value); + +?> +--EXPECTF-- +Fatal error: Case Bar of backed enum Foo must have a value in %s on line %d |