Skip to content

Overloading regression in Scala 3 #14699

Closed
@soronpo

Description

@soronpo

The following works in 2.13, but fails in Scala 3.

Compiler version

v3.1.2-RC1

Minimized code

https://scastie.scala-lang.org/eiWBjoMFRiWNNuBRV2oH2g

def always(block: => Unit): Unit = {}
def always(args: Int*)(block: => Unit): Unit ={}

always{} //error
always(1,2,3) {}

Output

None of the overloaded alternatives of method always in object Playground with types
 (args: Int*)(block: => Unit): Unit
 (block: => Unit): Unit
match arguments (<nonsensical><notype></nonsensical>)

Expectation

No error, same as in Scala 2.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions