TysonAndre / phan

Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
Other
0 stars 0 forks source link

Revisit uses of canCastToExpandedUnionType (It casts **both** to the expanded union types) #123

Open TysonAndre opened 6 years ago

TysonAndre commented 6 years ago

It's probably more accurate to just cast one of them to the desired union type. Add unit tests to catch bugs that the old code would let through.

Phan's template types are difficult to check, e.g. Option vs none