Skip to content

Commit 6c74d3d

Browse files
committed
Fix #7513: Add regression test
1 parent 4d3f315 commit 6c74d3d

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
object Test {
2+
quote.foo
3+
}

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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
object Test {
2+
quote.foo
3+
}

0 commit comments

Comments
 (0)