Skip to content

join is not associative in the presence of unions #3339

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions