Skip to content

Quoted patterns with lambdas fail level check #6215

@nicolasstucki

Description

@nicolasstucki
object Test {
  def res(x: quoted.Expr[Int]) given tasty.Reflection: quoted.Expr[Int] = x match {
    case '{ ((a: Int) => 2)(5) } => ???
  }
}

fails Ycheck with

3 |    case '{ ((a: Int) => 8)(5) } => ???
  |                          ^
  |                       access to method $anonfun from wrong staging level:
  |                        - the definition is at level 0,
  |                        - but the access is at level 1.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions