Closed jrudolph closed 3 years ago
I could not start SBT on that project
error: error while loading AnnotatedElement, class file '/usr/local/Cellar/openjdk@8/1.8.0+282/libexec/openjdk.jdk/Contents/Home/jre/lib/rt.jar(java/lang/reflect/AnnotatedElement.class)' is broken
(bad constant pool tag 18 at byte 76)
error: error while loading CharSequence, class file '/usr/local/Cellar/openjdk@8/1.8.0+282/libexec/openjdk.jdk/Contents/Home/jre/lib/rt.jar(java/lang/CharSequence.class)' is broken
(bad constant pool tag 18 at byte 10)
@jrudolph what version of the JDK are you using? Or could you help me minimize the issue?
Self contained version
Slightly minimized
Minimized
import scala.quoted._
inline def rule(inline r: Any): Unit = ${ ruleImpl('r) }
def ruleImpl(r: Expr[Any])(using Quotes): Expr[Unit] = {
import quotes.reflect.*
r.asTerm.show
throw new Throwable("OK")
}
def test = rule {
foo(bar(baz))
}
def foo[I](r: I): Nothing = ???
def bar(i: Baz): i.Out = ???
sealed trait Baz:
type Out = Nothing match { case Nothing => Nothing }
def baz: Baz = ???
Compiler version
3.0.1
Reproducer
With branch https://github.com/jrudolph/parboiled2/tree/skkolem-crasher run
parboiledCoreJVM/Test/compile
in sbt.Output