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
Two string vars or a string var and a string literal being concatenated should get the result inferred to also be a string.
Actual Behaviour
It infers unknown.
Reproduction steps
Additional Notes
I'm guessing #680 maybe took away too much? It seems reasonable to infer string as the result type when both the sources are also pure strings (or possibly other basic types too). And maybe there are also other operators where this is the case.
I'd say it doesn't need to be a goal to support every weird corner case like if one variable is ´string|CustomType´ or accounting for metatable shenanigans, but the straightforward basic cases should be supported.
Log File
No response
The text was updated successfully, but these errors were encountered:
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Type Checking, Hover
Expected Behaviour
Two string vars or a string var and a string literal being concatenated should get the result inferred to also be a string.
Actual Behaviour
It infers unknown.
Reproduction steps
Additional Notes
I'm guessing #680 maybe took away too much? It seems reasonable to infer string as the result type when both the sources are also pure strings (or possibly other basic types too). And maybe there are also other operators where this is the case.
I'd say it doesn't need to be a goal to support every weird corner case like if one variable is ´string|CustomType´ or accounting for metatable shenanigans, but the straightforward basic cases should be supported.
Log File
No response
The text was updated successfully, but these errors were encountered: