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
Removed invalid T template parameter from methods where it is not bound to any template
These functions had a `T` template parameter in them, but this `T` is completely decoupled
from the one defined at class-level (and therefore at `Enum` instance level, rather than
statically):
* `Enum::from()`
* `Enum::isValid()`
* `Enum::assertValidValue()`
* `Enum::assertValidValueReturningKey()` (internal detail)
In practice, this means that myclabs#135 (Added new named constructor to create enum from mixed)
was not a valid approach to infer types for enumerable values, when performed statically.
A new approach will be attempted, but the current one will likely need to be scrapped for
now.
In practice, `@psalm-assert`, `@psalm-assert-if-true` and `@psalm-return static<T>` had no
effect on these methods, due to a design-level issue that wasn't spotted (by myself either)
at review.
0 commit comments