File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
run-macros/quote-matcher-symantics-3 Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ object Macros {
88 inline def assert (expr : => Boolean ): Unit =
99 $ { assertImpl(' expr ) }
1010
11- def assertImpl (expr : Expr [Boolean ])(given QuoateContext ) =
11+ def assertImpl (expr : Expr [Boolean ])(given QuoteContext ) =
1212 ' { if ! ($expr) then throw new AssertionError (s " failed assertion: ${$ {showExpr(expr)}}" ) }
1313
1414
15- def showExpr [T ](expr : Expr [T ])(given QuoateContext ): Expr [String ] = expr.toString
15+ def showExpr [T ](expr : Expr [T ])(given QuoteContext ): Expr [String ] = expr.toString
1616
1717 inline def power (inline n : Int , x : Double ) = $ { powerCode(n, ' x ) }
1818
19- def powerCode (n : Int , x : Expr [Double ])(given QuoateContext ): Expr [Double ] =
19+ def powerCode (n : Int , x : Expr [Double ])(given QuoteContext ): Expr [Double ] =
2020 if (n == 0 ) ' {1.0 }
2121 else if (n == 1 ) x
2222 else if (n % 2 == 0 ) ' { { val y = $x * $x; $ { powerCode(n / 2 , ' y ) } } }
@@ -25,7 +25,7 @@ object Macros {
2525
2626class Test {
2727
28- given as Toolbox = Toolbox .make(getClass.getClassLoader)
28+ given Toolbox = Toolbox .make(getClass.getClassLoader)
2929
3030 run {
3131 val program = ' {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ object Macros {
1717 env.updated(id, ref)
1818
1919 object FromEnv {
20- def unapply [T ](id : Bind [T ])(given Env : Option [Expr [R [T ]]]) =
20+ def unapply [T ](id : Bind [T ])(given Env ) : Option [Expr [R [T ]]] =
2121 summon[Env ].get(id).asInstanceOf [Option [Expr [R [T ]]]] // We can only add binds that have the same type as the refs
2222 }
2323
Original file line number Diff line number Diff line change 1- ((qctx: scala.quoted.QuoteContext) => '{3}( given (qctx) ))
1+ ((qctx: scala.quoted.QuoteContext) => '{3} given (qctx))
You can’t perform that action at this time.
0 commit comments