Skip to content

Tuple.Union doesn't work if all types in a tuple are singletons #10897

Closed
@prolativ

Description

@prolativ

Minimized code

import Tuple.Union

object Foo

val x = summon[Union[(Foo.type, 1)] =:= (Foo.type | 1)] // doesn't compile
val y = summon[Union[(Foo.type, 1, String)] =:= (Foo.type | 1 | String)] // compiles

Output

val x = summon[Union[(Foo.type, 1)] =:= (Foo.type | 1)] // doesn't compile
                                                       ^
Cannot prove that Tuple.Union[(Foo.type, (1 : Int))] =:= Foo.type | (1 : Int).

Expectation

Tuple.Union should work for tuples containing any types

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