Skip to content

Commit 58d94d2

Browse files
authored
Merge pull request #15482 from dotty-staging/test-15475
Test case #15475
2 parents 4cb967f + 937714c commit 58d94d2

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

tests/pending/pos/i15475/A.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// A.scala
2+
package x
3+
4+
def hello = {
5+
xtransform {
6+
val a: Seq[Generic[?]] = null
7+
a
8+
.foreach { to =>
9+
to.mthd()
10+
}
11+
}
12+
}
13+
14+
trait Generic[+T] {
15+
def mthd(): Generic[T] = this
16+
}

tests/pending/pos/i15475/X.scala

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package x
2+
3+
import scala.quoted.*
4+
5+
6+
transparent inline def xtransform[T](inline expr:T) = ${
7+
X.transform('expr)
8+
}
9+
10+
object X {
11+
12+
def transform[T:Type](x: Expr[T])(using Quotes):Expr[T] = {
13+
import quotes.reflect.*
14+
x
15+
}
16+
17+
}

0 commit comments

Comments
 (0)