Skip to content

Commit

Permalink
Merge pull request #15482 from dotty-staging/test-15475
Browse files Browse the repository at this point in the history
Test case #15475
  • Loading branch information
odersky authored Jun 20, 2022
2 parents 4cb967f + 937714c commit 58d94d2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/pending/pos/i15475/A.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// A.scala
package x

def hello = {
xtransform {
val a: Seq[Generic[?]] = null
a
.foreach { to =>
to.mthd()
}
}
}

trait Generic[+T] {
def mthd(): Generic[T] = this
}
17 changes: 17 additions & 0 deletions tests/pending/pos/i15475/X.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package x

import scala.quoted.*


transparent inline def xtransform[T](inline expr:T) = ${
X.transform('expr)
}

object X {

def transform[T:Type](x: Expr[T])(using Quotes):Expr[T] = {
import quotes.reflect.*
x
}

}

0 comments on commit 58d94d2

Please sign in to comment.