You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?phpclassExample {
constX = [
'foo' => [
'a' => 'b',
],
];
publicfunctionmain(string$key) : ?string {
// False positive PhanCoalescingNeverNull Using non-null self::X[$key]['a'] of type 'b' as the left hand side of a null coalescing (??) operation. The right hand side may be unnecessary.returnself::X[$key]['a'] ?? null;
}
}
Expected: Phan should infer the real type of self::X[$key] is nullable, and not warn.
The text was updated successfully, but these errors were encountered:
TysonAndre
added
the
bug
A crash in Phan, a recent change causing incorrect analysis results, etc.
label
Jan 11, 2020
Expected: Phan should infer the real type of self::X[$key] is nullable, and not warn.
The text was updated successfully, but these errors were encountered: