Open mrdziuban opened 6 days ago
Seems somewhat related to #18517
Further minimized: VisitorMacros.scala:
package example
import scala.quoted.*
private def mkVisitorTypeImpl[T: Type](using q: Quotes): Expr[VisitorType[T]] =
'{new VisitorType[T]{}}
transparent inline def mkVisitorType[T]: VisitorType[T] = ${ mkVisitorTypeImpl[T] }
trait VisitorType[T] {
type Out[A]
}
UsesTest.scala:
package example
val _ = Test.Foo
Test.scala
package example
sealed trait Test
object Test {
case object Foo extends Test
val visitorType = mkVisitorType[Test]
trait Visitor[A] {
type V[a] = visitorType.Out[a]
}
}
Compiler version
Reproduced on 3.4.3, 3.5.2, and the latest nightly 3.6.3-RC1-bin-20241119-cc4a324-NIGHTLY
Minimized code
https://github.com/mrdziuban/scala3-suspend-exception
The README there describes the 4 files involved, they're all pretty minimal. The most complex, and I think the one most likely related to the issue, is
VisitorMacros.scala
.Output (click arrow to expand)