Closed
Description
Minimized code
notmacro/Main.scala:
package notmacro
import scala.util.Not
object Main extends App {
summon[Not[T[Int]]]
}
notmacro/T.scala:
package notmacro
import scala.quoted._
case class T[A <: AnyKind](s: String)
object T {
implicit inline def derived[A <: AnyKind]: T[A] = ${ reprImpl[A] }
def reprImpl[A <: AnyKind](using t: Type[A])(using ctx: QuoteContext): Expr[T[A]] =
'{ T[A]("") }
}
Output
java.lang.AssertionError: assertion failed: position not set for Int # 4099305 of class dotty.tools.dotc.ast.Trees$TypeTree in /home/<redacted>/src/main/scala/notmacro/Main.scala
Expectation
I expect useful error about missing implicit instance