Skip to content

Commit 8d73b97

Browse files
committed
Update test case for i17105
1 parent c7a88fa commit 8d73b97

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

tests/run-macros/i17105.check

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
((g: (y: scala.Int)scala.Int, n: scala.Int) => g(n))
2-
((g: (y: scala.Int, z: scala.Int)scala.Int) => g(1, 2))
3-
((g2: (x$1: scala.math.Ordered[scala.Int])scala.Boolean, ord: scala.math.Ordered[scala.Int]) => (g2(ord).||(2.<(3)): scala.Boolean))
1+
str_from_macro 1st 2nd

tests/run-macros/i17105/Macro_1.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import scala.quoted.*
33
inline def testExpr(inline body: Any) = ${ testExprImpl('body) }
44
def testExprImpl(body: Expr[Any])(using Quotes): Expr[String] =
55
body match
6-
case '{ def g(y: Int) = "hello" * y; $a(g): String } =>
7-
'{ $a((z:Int) => "this is " + z.toString()) }
6+
case '{ def g(y: String) = "placeholder" + y; $a(g): String } =>
7+
'{ $a((z:String) => "str_from_macro " + z) }
88
case _ => Expr("not matched")
99

1010
// TODO issue-17105: Clean this up if not neccessary

tests/run-macros/i17105/Test_2.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
@main def app: Unit =
2-
testExpr { def f(x: Int) = "hello" * x; f(0) + "bye" }
1+
@main def Test: Unit =
2+
println(testExpr { def f(x: String) = "placeholder" + x; f("1st") + " 2nd" })

0 commit comments

Comments
 (0)