summaryrefslogtreecommitdiff
path: root/Zend/tests/enum/backed-type-no-union.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/enum/backed-type-no-union.phpt')
-rw-r--r--Zend/tests/enum/backed-type-no-union.phpt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/tests/enum/backed-type-no-union.phpt b/Zend/tests/enum/backed-type-no-union.phpt
new file mode 100644
index 0000000000..8330f8de3d
--- /dev/null
+++ b/Zend/tests/enum/backed-type-no-union.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Backed enums type can't be union
+--FILE--
+<?php
+
+enum Foo: int|string {}
+
+?>
+--EXPECTF--
+Fatal error: Enum backing type must be int or string, string|int given in %s on line %d