Skip to content

Commit b37f439

Browse files
Add final test
1 parent cf593f8 commit b37f439

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/PHPStan/Analyser/nsrt/is-subclass-of.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,11 @@ function (string $a, string $b, string $c, string $d) {
5353
class Foo {}
5454

5555
class Bar extends Foo {}
56+
57+
final class FinalFoo {}
58+
59+
function (FinalFoo $a) {
60+
if (is_subclass_of($a, FinalFoo::class)) {
61+
\PHPStan\Testing\assertType('*NEVER*', $a);
62+
}
63+
};

0 commit comments

Comments
 (0)