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
a) returning Field for expected Field2 does emit an error since level 3
b) returning Field for expected template of Field2 does NOT emit an error until level 7
c) returning Field for expected template of Field does NOT emit an error until level 7
I agree the c) example needs a compromise (fixed in phpstan rel. v1.4.6), but the b) one is clearly not consistent vs. non-template a).
Template base interface/class check is consistent with simple type, eg. both checked at level 3.
Method HelloWorldTemplated::getField() should return Field2 but returns Field.
Method HelloWorldSimple::getField() should return Field2 but returns Field.
The text was updated successfully, but these errors were encountered:
I'm not saying this is a bug, but you're welcome to look into it and improve it. But I don't want this as an open issue because the current state is good enough.
Bug report
follow #6575 (reply in thread)
a) returning
Field
for expectedField2
does emit an error since level 3b) returning
Field
for expectedtemplate of Field2
does NOT emit an error until level 7c) returning
Field
for expectedtemplate of Field
does NOT emit an error until level 7I agree the c) example needs a compromise (fixed in phpstan rel. v1.4.6), but the b) one is clearly not consistent vs. non-template a).
Code snippet that reproduces the problem
https://phpstan.org/r/24ccc414-b3e2-4c7a-b2fe-d02b34722f92
Expected output
Template base interface/class check is consistent with simple type, eg. both checked at level 3.
The text was updated successfully, but these errors were encountered: