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
String_::$value unescapes the string, String_::$attributes["rawValue"] was recently added for this. We should upgrade the parser version and fix these issues.
https://psalm.dev/r/c53ed4f377 (we might also have to change how we handle escaping in single and double quote literal types)
Psalm output (using commit f2f211c):
ERROR: InvalidReturnStatement - 8:12 - The inferred type ''\t'' does not match the declared return type ''\\t'' for foobar
ERROR: InvalidReturnType - 4:12 - The declared return type ''\\t'' for foobar is incorrect, got ''\t''
Psalm output (using commit f2f211c):
ERROR: InvalidReturnStatement - 8:12 - The inferred type ''\t'' does not match the declared return type '' '' for foobar
ERROR: InvalidReturnType - 4:12 - The declared return type '' '' for foobar is incorrect, got ''\t''
Psalm output (using commit f2f211c):
ERROR: InvalidArrayOffset - 5:11 - Cannot access value on variable $arr using offset value of '\\test', expecting '\test'
INFO: MixedAssignment - 5:1 - Unable to determine the type that $unset2 is being assigned to
Ok, part of this was because I was dumb and was using "\\" in Psalm's tests when it actually needs to be "\\\\" to represent "\\" because the whole thing is in single quotes. I think there are related issues though so I'll leave this open.
String_::$value
unescapes the string,String_::$attributes["rawValue"]
was recently added for this. We should upgrade the parser version and fix these issues.https://psalm.dev/r/cc297a99cb(actually correct)The text was updated successfully, but these errors were encountered: