mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
22 lines
266 B
PHP
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
|