Skip to content

3.2.1 regression with partially applied classes #16320

Closed as not planned
Closed as not planned
@andrzejressel

Description

@andrzejressel

Compiler version

3.2.1
3.2.2-RC1

Minimized code

//> using platform "jvm"
//> using scala "3.2.1"

@main
def main() = {
  A { (a: Unit) => () }
}

object A {
  def apply[E] = new PartiallyApplied[E]
  final class PartiallyApplied[E] {
    def apply[T1](fn: (T1) => Unit): Unit = ()
  }
}

Output

[error] .\partial.scala:6:3: method apply in object A does not take parameters
[error]   A { (a: Unit) => () }
[error]

Expectation

No error like with Scala 3.2.0

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