Skip to content

Commit c484f1e

Browse files
committed
Fix scala#7513: Add regression test
1 parent 4d3f315 commit c484f1e

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

tests/pos-macros/i7513/Macro_1.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
}

tests/pos-macros/i7513/Test_2.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
object Test {
3+
quote.foo
4+
}

tests/pos-macros/i7513b/Macro_1.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
}

tests/pos-macros/i7513b/Test_2.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
object Test {
3+
quote.foo
4+
}

0 commit comments

Comments
 (0)