Skip to content

Commit 5216ca1

Browse files
committed
Add test case for neg-macros
1 parent b991e1f commit 5216ca1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/neg-macros/hoas-pattern-with-type-params.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ def test(body: Expr[Any])(using Quotes): Expr[String] =
44
body match
55
case '{ [A] => (x : A) => $b[A] : A => A } => // error // error
66
Expr("Hoas pattern should always take value params")
7+
case '{ [A] => (x : A) => $b(x) : A => A } => // error // error
8+
Expr("`A` should be in type arguments because `x` depends on it")
79
case '{ (a:Int) => $b[Int](a) : String } => // error
810
Expr("Type params of a hoas pattern should be introduced inside the quote")
911
case _ => Expr("not matched")

0 commit comments

Comments
 (0)