Skip to content

Commit af80109

Browse files
authored
Merge pull request #8477 from dotty-staging/fix-#7403
Fix #7403: Add regression test
2 parents c1c2e3e + c81e8dd commit af80109

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/pos-macros/i7322/Macro_1.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import scala.quoted.{ QuoteContext, Expr, Type }
2+
3+
trait M[T] {
4+
def f: Any
5+
}
6+
7+
inline def g[T: Type](em: Expr[M[T]])(using QuoteContext) = '{$em.f}

tests/pos-macros/i7322/Test_2.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
object Test {
2+
3+
extension on (i: Int):
4+
def pow2 = i * i
5+
6+
println(5.pow2)
7+
8+
}

0 commit comments

Comments
 (0)