Skip to content

Commit ade87ab

Browse files
committed
Add a test on nested quoted patterns
1 parent 145db07 commit ade87ab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/pos/i6214b.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
object Test {
2+
def res(x: quoted.Expr[Int]) given tasty.Reflection: quoted.Expr[Int] = x match {
3+
case '{ val a: Int = ${ Foo('{ val b: Int = $y; b }) }; a } => y // owner of y is res
4+
}
5+
object Foo {
6+
def unapply(x: quoted.Expr[Int]): Option[quoted.Expr[Int]] = Some(x)
7+
}
8+
}

0 commit comments

Comments
 (0)