In Luau, the argument type information for string.char
is wrong; it has the first argument type as string
, which is incorrect.
As an example, enter string.char(1)
in a script. Even outside of strict mode, it will emit an error saying This function must be called with self. Did you mean to use a colon instead of a dot?
Replacing the 1
with "1"
will cause that error to go away (though it will still complain until a second argument is provided).
As of May 20th the type signature for string.char
was: (string,number,number?,number?,number?)->(string)
It should instead be: (number) -> (string)
or something to that effect. string.char
accepts a vararg so maybe it should be () -> string
.
This is occurring in Studio version 0.442.3.409454
.