Skip to content

Commit 3467c48

Browse files
committed
Add pos typing test case
1 parent 76a51d2 commit 3467c48

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import scala.quoted.*
2+
3+
def test(body: Expr[Any])(using Quotes): Expr[String] =
4+
body match
5+
case '{ [A] => (x : A, y : A) => $b[A](x, y) : A } =>
6+
'{ $b[String]("truthy", "falsy") }
7+
case '{ [A, B] => (x : A, f : A => B) => $b[A, B](x, f) : B} =>
8+
'{ $b[Int, String](10, (x:Int)=>x.toHexString) }
9+
case _ => Expr("not matched")

0 commit comments

Comments
 (0)