File tree Expand file tree Collapse file tree 6 files changed +47
-0
lines changed Expand file tree Collapse file tree 6 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ import scala .quoted ._
2+
3+ trait Quoted {
4+ def foo : Int
5+ }
6+ inline def quote : Quoted = $ { quoteImpl }
7+
8+ def quoteImpl (given qctx : QuoteContext ): Expr [Quoted ] = ' {
9+ new Quoted {
10+ def foo = ???
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ object Test {
2+ quote.foo
3+ }
Original file line number Diff line number Diff line change 1+ import scala .quoted ._
2+
3+ trait Quoted {
4+ val foo : Int
5+ }
6+ inline def quote : Quoted = $ { quoteImpl }
7+
8+ def quoteImpl (given qctx : QuoteContext ): Expr [Quoted ] = ' {
9+ new Quoted {
10+ val foo = ???
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ object Test {
2+ quote.foo
3+ }
Original file line number Diff line number Diff line change 1+ import scala .quoted ._
2+
3+ object Macros {
4+ trait Quoted {
5+ def foo : Int
6+ }
7+ inline def quote : Quoted = $ { quoteImpl }
8+
9+ def quoteImpl (given qctx : QuoteContext ): Expr [Quoted ] = ' {
10+ new Quoted {
11+ def foo = ???
12+ }
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ object Test {
2+ Macros .quote.foo
3+ }
You can’t perform that action at this time.
0 commit comments