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
The class RepA uses the trait TraitBase with the type parameter A, which works as expected. However, if the TraitBase is used by the trait TraitSub and the TraitSub is used by a class, which finally defines the type parameter (RepB or RepC), the following error is produced:
ERROR: [ArgumentTypeCoercion](https://psalm.dev/193) - 44:30 - Argument 1 of RepB::configureBase expects class-string<B>, but parent type class-string<T:TraitSub as object> provided
The text was updated successfully, but these errors were encountered:
Psalm output (using commit a75d26a):
ERROR: ArgumentTypeCoercion - 44:30 - Argument 1 of RepB::configureBase expects class-string<B>, but parent type class-string<T:TraitSub as object> provided
ERROR: PropertyNotSetInConstructor - 64:7 - Property RepB::$_ObjectType is not defined in constructor of RepB or in any methods called in the constructor
ERROR: ArgumentTypeCoercion - 44:30 - Argument 1 of RepC::configureBase expects class-string<C>, but parent type class-string<T:TraitSub as object> provided
ERROR: PropertyNotSetInConstructor - 75:7 - Property RepC::$_ObjectType is not defined in constructor of RepC or in any methods called in the constructor
Example: https://psalm.dev/r/37284614ae
The class
RepA
uses the traitTraitBase
with the type parameterA
, which works as expected. However, if theTraitBase
is used by the traitTraitSub
and theTraitSub
is used by a class, which finally defines the type parameter (RepB
orRepC
), the following error is produced:The text was updated successfully, but these errors were encountered: