diff --git a/tests/pos-macros/i7513/Macro_1.scala b/tests/pos-macros/i7513/Macro_1.scala new file mode 100644 index 000000000000..05193fbc7fc6 --- /dev/null +++ b/tests/pos-macros/i7513/Macro_1.scala @@ -0,0 +1,12 @@ +import scala.quoted._ + +trait Quoted { + def foo: Int +} +inline def quote: Quoted = ${ quoteImpl } + +def quoteImpl(given qctx: QuoteContext): Expr[Quoted] = '{ + new Quoted { + def foo = ??? + } +} diff --git a/tests/pos-macros/i7513/Test_2.scala b/tests/pos-macros/i7513/Test_2.scala new file mode 100644 index 000000000000..c8b382b6f42a --- /dev/null +++ b/tests/pos-macros/i7513/Test_2.scala @@ -0,0 +1,3 @@ +object Test { + quote.foo +} diff --git a/tests/pos-macros/i7513b/Macro_1.scala b/tests/pos-macros/i7513b/Macro_1.scala new file mode 100644 index 000000000000..ba1f60dfbf93 --- /dev/null +++ b/tests/pos-macros/i7513b/Macro_1.scala @@ -0,0 +1,12 @@ +import scala.quoted._ + +trait Quoted { + val foo: Int +} +inline def quote: Quoted = ${ quoteImpl } + +def quoteImpl(given qctx: QuoteContext): Expr[Quoted] = '{ + new Quoted { + val foo = ??? + } +} diff --git a/tests/pos-macros/i7513b/Test_2.scala b/tests/pos-macros/i7513b/Test_2.scala new file mode 100644 index 000000000000..c8b382b6f42a --- /dev/null +++ b/tests/pos-macros/i7513b/Test_2.scala @@ -0,0 +1,3 @@ +object Test { + quote.foo +} diff --git a/tests/pos-macros/i7513c/Macro_1.scala b/tests/pos-macros/i7513c/Macro_1.scala new file mode 100644 index 000000000000..671918f348f5 --- /dev/null +++ b/tests/pos-macros/i7513c/Macro_1.scala @@ -0,0 +1,14 @@ +import scala.quoted._ + +object Macros { + trait Quoted { + def foo: Int + } + inline def quote: Quoted = ${ quoteImpl } + + def quoteImpl(given qctx: QuoteContext): Expr[Quoted] = '{ + new Quoted { + def foo = ??? + } + } +} diff --git a/tests/pos-macros/i7513c/Test_2.scala b/tests/pos-macros/i7513c/Test_2.scala new file mode 100644 index 000000000000..b178088229dc --- /dev/null +++ b/tests/pos-macros/i7513c/Test_2.scala @@ -0,0 +1,3 @@ +object Test { + Macros.quote.foo +}