File tree 3 files changed +6
-4
lines changed
staging/test-resources/repl-staging
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
scala> import scala.quoted._
2
2
scala> def assertImpl(expr: Expr[Boolean])(using q: Quotes) = '{ if !($expr) then throw new AssertionError("failed assertion")}
3
3
def assertImpl
4
- (expr: quoted.Expr[Boolean])(using q: quoted.Quotes): quoted.Expr[Unit]
4
+ (expr: quoted.Expr[Boolean])(using q: quoted.Quotes): scala. quoted.Expr[Unit]
5
5
scala> inline def assert(expr: => Boolean): Unit = ${ assertImpl('{expr}) }
6
6
def assert(expr: => Boolean): Unit
7
7
Original file line number Diff line number Diff line change 1
1
scala> import scala.quoted._
2
2
scala> def foo(expr: Expr[Any])(using Quotes) = expr match { case '{ $x: t } => '{ $x: Any } }
3
- def foo(expr: quoted.Expr[Any])(using x$2: quoted.Quotes): quoted.Expr[Any]
3
+ def foo
4
+ (expr: quoted.Expr[Any])(using x$2: quoted.Quotes): scala.quoted.Expr[Any]
4
5
scala> def bar(expr: Expr[Any])(using Quotes) = expr match { case '{ $x: t } => '{ val a: t = ??? ; ???} }
5
- def bar(expr: quoted.Expr[Any])(using x$2: quoted.Quotes): quoted.Expr[Nothing]
6
+ def bar
7
+ (expr: quoted.Expr[Any])(using x$2: quoted.Quotes): scala.quoted.Expr[Nothing]
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ scala> import quoted.staging.{Compiler => StagingCompiler, _}
3
3
scala> implicit def compiler: StagingCompiler = StagingCompiler.make(getClass.getClassLoader)
4
4
def compiler: quoted.staging.Compiler
5
5
scala> def v(using Quotes) = '{ (if true then Some(1) else None).map(v => v+1) }
6
- def v(using x$1: quoted.Quotes): quoted.Expr[Option[Int]]
6
+ def v(using x$1: quoted.Quotes): scala. quoted.Expr[Option[Int]]
7
7
scala> scala.quoted.staging.withQuotes(v.show)
8
8
val res0: String = (if (true) scala.Some.apply[scala.Int](1) else scala.None).map[scala.Int](((v: scala.Int) => v.+(1)))
9
9
scala> scala.quoted.staging.run(v)
You can’t perform that action at this time.
0 commit comments