diff --git a/tests/PHPStan/Rules/Comparison/data/bug-12241.php b/tests/PHPStan/Rules/Comparison/data/bug-12241.php index 7d8edd3f131..82bc6e8ba17 100644 --- a/tests/PHPStan/Rules/Comparison/data/bug-12241.php +++ b/tests/PHPStan/Rules/Comparison/data/bug-12241.php @@ -18,3 +18,10 @@ function (Foo $foo): string { Baz::class => 'Baz', }; }; + +function (Foo $foo): string { + return match (get_class($foo)) { + Bar::class => 'Bar', + Baz::class => 'Baz', + }; +};