File tree 2 files changed +4
-0
lines changed
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ def testExprImpl(body: Expr[Any])(using Quotes): Expr[String] =
7
7
' { $a((z : String ) => s " [1st case] ${z}" ) }
8
8
case ' { def g (y : String )(z : String ) = " placeholder" + y; $a(g): String } =>
9
9
' { $a((z1 : String ) => (z2 : String ) => s " [2nd case] ${z1}, ${z2}" ) }
10
+ case ' { def g (using s : String ) = " placeholder" ; $a(g) } =>
11
+ ' { $a((s : String ) => s " [3rd case] ${s}" ) }
10
12
case _ => Expr (" not matched" )
11
13
12
14
// TODO issue-17105: Clean this up if not neccessary
Original file line number Diff line number Diff line change 3
3
println(" case curried: " + testExpr { def f (x : String )(y : String ) = " placeholder" + x; f(" arg1" )(" arg2" ) + " outside" })
4
4
def outer () = " outer-method"
5
5
println(" case methods from outer scope: " + testExpr { def f (x : String ) = " placeholder" + x; f(" arg1" ) + outer() })
6
+ given String = " given"
7
+ println(" case contextual params: " + testExpr { def f (using t : String ) = " placeholder" ; f + " outside" })
You can’t perform that action at this time.
0 commit comments