Skip to content

String concat needs to convert all values to strings #504

@tomblind

Description

@tomblind
print("foo" + 2 + true);

=>

print("foo" .. 2 .. true); --attempt to concatenate a boolean value

The string concat operator will only convert numbers to strings. Other types will cause an error (unlike TS which calls toString on all values);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions