Skip to content

String(any) doesn't map to tostring(any) #1597

@admiralnelson

Description

@admiralnelson
const points = 13.23
print("The point is" + String(points))

output

--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
points = 13.23
print("The point is" .. String(nil, points))

expected

--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
points = 13.23
print("The point is" .. tostring(points))

Here's the playground thing
https://typescripttolua.github.io/play#code/MYewdgzgLgBADiAlmKEYF4YEYDMA6AJhwCg4AnZKACgCIAVACwFN4kUZEIaYBqGAZSgUwAcyoJKEAJRSgA

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions