Open rvanvelzen opened 4 months ago
1) We have to get rid of all Type inheritance before this is possible to do: https://phpstan.org/blog/why-is-instanceof-type-wrong-and-getting-deprecated
2) I'm not sure we need a new syntax for this and how it should look like. We could do this simply with subtract-from<X, Y>
generics.
This is a preliminary syntax implementation for subtraction type syntax.
Merging now isn't necessary because the work in phpstan-src is far from done. Any feedback is still appreciated though.