Skip to content

Autotupling fails for curried argument lists when overloaded #22718

Open
@EugeneFlesselle

Description

@EugeneFlesselle

Compiler version

Scala compiler version 3.7.0-RC1-bin-SNAPSHOT-nonbootstrapped-git-bef520f

Minimized code

def f(x: String) = ???
def f(x: (Int, Int)) = ???

def g()(x: (Int, Int)) = ???

def h()(x: String) = ???
def h()(x: (Int, Int)) = ???

val r1 = f(1, 2) // ok
val r2 = g()(1, 2) // ok
val r3 = h()(1, 2) // error

Output

-- [E134] Type Error: tests/playground/example.scala:12:9 ----------------------
12 |val r3 = h()(1, 2) // error
   |         ^
   |         None of the overloaded alternatives of method h with types
   |          ()(x: (Int, Int)): Nothing
   |          ()(x: String): Nothing
   |         match arguments ()((1 : Int), (2 : Int))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions