-
-
Notifications
You must be signed in to change notification settings - Fork 181
Closed
Labels
bugscope: language extensionsRelated to language-extension typesRelated to language-extension typesscope: transformationTransformation of TS to LuaTransformation of TS to Lua
Description
See Playground sample.
I expected that foo would have transpiled to (notice parentheses):
function foo(str)
return (string.gsub(str, ".", "*"))
endBut, 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 the foo... It works fine in case of bar and baz since they make use of a variable.
Metadata
Metadata
Assignees
Labels
bugscope: language extensionsRelated to language-extension typesRelated to language-extension typesscope: transformationTransformation of TS to LuaTransformation of TS to Lua