Skip to content

join is not associative in the presence of unions #3339

Open
@ilevkivskyi

Description

@ilevkivskyi

While working on #3322 I have found this problem:

lst1 = [1, 'a', None]
lst2 = [1, None, 'a']

reveal_type(lst1) # builtins.list[builtins.object*]
reveal_type(lst2) # builtins.list[Union[builtins.str, builtins.int, builtins.None]]

This turns out to be the cause of spurious --strict-optional errors I mentioned there.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions