summaryrefslogtreecommitdiff
path: root/Zend/tests/type_declarations/mixed/syntax/nullable_mixed_return_error.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/type_declarations/mixed/syntax/nullable_mixed_return_error.phpt')
-rw-r--r--Zend/tests/type_declarations/mixed/syntax/nullable_mixed_return_error.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/tests/type_declarations/mixed/syntax/nullable_mixed_return_error.phpt b/Zend/tests/type_declarations/mixed/syntax/nullable_mixed_return_error.phpt
new file mode 100644
index 0000000000..945e7dcc8d
--- /dev/null
+++ b/Zend/tests/type_declarations/mixed/syntax/nullable_mixed_return_error.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Test that the nullable mixed return type is not valid
+--FILE--
+<?php
+
+function foo(): ?mixed
+{
+}
+
+?>
+--EXPECTF--
+Fatal error: Type mixed cannot be marked as nullable since mixed already includes null in %s on line %d