Skip to content

Built-in types can be inherited from, but that results in strange semantics #1152

Description

@purplesyringa
local record A
    is userdata
end

local x: any
print(x is A) -- compiles to type(x) == "table", not type(x) == "userdata"

Similarly for is number, is string, etc. Sounds like that should be a compile error, since those are not interfaces. (Maybe number technically is?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions