Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/run-macros/i6765-b.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
val x$1: java.lang.String = "One"
scala.Nil.::[java.lang.String](x$1)
}
{
val x$1: java.lang.String = "One"
scala.Nil.::[java.lang.String](x$1)
}
9 changes: 9 additions & 0 deletions tests/run-macros/i6765-b/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import scala.quoted._
import delegate scala.quoted._

inline def foo = ${fooImpl}

def fooImpl given (qctx: QuoteContext) = {
val res = List('{"One"}).toExprOfList
res.show.toExpr
}
8 changes: 8 additions & 0 deletions tests/run-macros/i6765-b/Test_2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
object Test {
def main(args: Array[String]): Unit = {
val res = foo
println(res)

println(foo)
}
}
8 changes: 8 additions & 0 deletions tests/run-macros/i6765.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
val x$1: java.lang.String = "One"
scala.Nil.::[java.lang.String](x$1)
}
{
val x$1: java.lang.String = "One"
scala.Nil.::[java.lang.String](x$1)
}
12 changes: 12 additions & 0 deletions tests/run-macros/i6765/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import scala.quoted._
import delegate scala.quoted._

delegate for Toolbox = Toolbox.make(getClass.getClassLoader)

inline def foo = ${fooImpl}

def fooImpl given (qctx: QuoteContext) = {
import qctx.tasty._
val res = List('{"One"}).toExprOfList
res.show.toExpr
}
8 changes: 8 additions & 0 deletions tests/run-macros/i6765/Test_2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
object Test {
def main(args: Array[String]): Unit = {
val res = foo
println(res)

println(foo)
}
}