phpdoc-parser
phpdoc-parser copied to clipboard
Add syntax for subtraction type
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.
- 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
- 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.