LuaMultiReturn returns all values even when indexed with [0] #1411
Labels
bug
scope: language extensions
Related to language-extension types
scope: transformation
Transformation of TS to Lua
See Playground sample.
I expected that
foo
would have transpiled to (notice parentheses):But, it clearly doesn't and therefore leads to multiple returns, because
string.gsub
also returns the amount of replacements as a secondary return value, which invalidates the specified return type: string
of thefoo
... It works fine in case ofbar
andbaz
since they make use of a variable.The text was updated successfully, but these errors were encountered: