CommandHelper

CommandHelper

46.5k Downloads

typeof("@a") is the type of the variable, rather than a string

Pieter12345 opened this issue ยท 1 comments

commented

Smart strings with a single ivariable that require no concat to glue their arguments together (e.g. "@var") seem to just get optimized to that variable. This causes the type of a smart string / doubly quoted string to be the type of that variable, rather than a string.
While we could consider always wrapping smart strings in either concat() or string(), I believe the problem actually lies in concat() optimization, as that should always be returning a string or optimizing to something that returns a string.

commented

Here's another funny example showing that "@a" is actually just rewritten to @a:
afbeelding