Skip to content

Commit e26c292

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

File tree

6 files changed

+47
-0
lines changed

6 files changed

+47
-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+
}

tests/pos-macros/i7513c/Macro_1.scala

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

tests/pos-macros/i7513c/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+
Macros.quote.foo
3+
}

0 commit comments

Comments
 (0)