1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/match/unmatched_enum.phpt
Ilija Tovilo 998bce117c Show enum cases in errors
Closes GH-14496
2024-06-10 22:58:25 +02:00

22 lines
266 B
PHP

--TEST--
Match errors show unmatched enum case
--FILE--
<?php
enum Foo {
case Bar;
case Baz;
}
try {
match (Foo::Bar) {
Foo::Baz => 42,
};
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Unhandled match case Foo::Bar