Skip to content

record union breaks type information #2969

@HoneyryderChuck

Description

@HoneyryderChuck
# RBS
# type simple = { flags: Integer }

a1 = { flags: 1 } #: simple
a1[:flags] #=> steep will correctly identify this as an integer

# type not_so_simple = simple & { id: String }
a2 = {id: "abc", flags: 2 }#: not_so_simple
a2[:flags] #=> steep will think this is either a String or an Integer. this is the bug!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions