Closed SignpostMarv closed 5 years ago
Is it possible to reproduce the problem into something that fits in getpsalm.org?
this isn't quite the same thing, but seems to be similar enough to get started? https://getpsalm.org/r/5a157dbbc3
tl:dr; it seems that using union types w/ @template
is a bad idea.
Yes, sorry - I just commented in https://github.com/vimeo/psalm/pull/1285#issuecomment-460842272
BUT intersection types should be fine
I've ticketed that here: https://github.com/vimeo/psalm/issues/1287
though if stuff still doesn't work after that's fixed feel free to create more
oh I'm happy with this being closed- I've taken the option of rather than specifying T0&T1
, to actually implement & require interface T0andT1 extends T0, T1 {}
:P
So I've been pruning out code from my projects that psalm renders superfluous, but I've still not quite groked appropriate use of
@template-*
One of the possible issues that I'm getting is that some of the code in a class was split across two different traits (for reasons of Scrutinizer's code quality score being gameable).
Only problem is that I think I've messed up the template inheritance tags ?
If you can spare a moment in your undoubtedly busy schedule to identify what I'm doing wrong (as I doubt I've broken something in psalm this time), your help would be gratefully appreciated.