We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04f8a96 commit b260dadCopy full SHA for b260dad
1 file changed
tests/PHPStan/Analyser/nsrt/bug-14362.php
@@ -68,3 +68,12 @@ function () : void {
68
// Intersection with only maybe-callable types (neither has __invoke)
69
assertType('Closure', H::u()(...));
70
};
71
+
72
+function doFoo(string $c):void {
73
+ if (is_callable($c)) {
74
+ $a = $c;
75
+ } else {
76
+ $a = C::u()(...);
77
+ }
78
+ assertType('callable-string|(Closure(Bug14362\B): int)', $a);
79
+}
0 commit comments