Skip to content

Compiler crash while compiling with JDK 10 #11022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
denisrosset opened this issue Jul 13, 2018 · 2 comments
Closed

Compiler crash while compiling with JDK 10 #11022

denisrosset opened this issue Jul 13, 2018 · 2 comments

Comments

@denisrosset
Copy link

denisrosset commented Jul 13, 2018

This is with OpenJDK 10 on Ubuntu (where, weirdly, the package is name openjdk-11-jdk), on Scala 2.12.6.

The project is here: https://github.com/denisrosset/symdpoly

It's a medium-sized code base, using notably macros, path-dependent and singleton types.

The macros come mostly from machinist (for typeclass operators), shapeless (Witness is used a lot), metal and scalin.

The last two libraries are available here: https://github.com/denisrosset/metal
and here: https://github.com/denisrosset/scalin

Those last wo libraries compile and test without issues though on JDK 10.

Everything mentioned above runs just fine on JDK 8.

Excerpt of the console output:

[error] Error while emitting Solution.scala
[error] assertion failed: ClassBType.info not yet assigned: Ljava/lang/String;
java.lang.AssertionError: assertion failed: ClassBType.info not yet assigned: Ljava/lang/Object;
	at scala.tools.nsc.backend.jvm.BTypes$ClassBType.info(BTypes.scala:629)
	at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isInterface(BTypes.scala:661)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genCallMethod(BCodeBodyBuilder.scala:1082)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genApply(BCodeBodyBuilder.scala:579)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:296)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genStat(BCodeBodyBuilder.scala:80)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.$anonfun$genBlock$1(BCodeBodyBuilder.scala:812)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genBlock(BCodeBodyBuilder.scala:812)
	at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:366)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.emitNormalMethodBody$1(BCodeSkelBuilder.scala:602)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.genDefDef(BCodeSkelBuilder.scala:634)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.gen(BCodeSkelBuilder.scala:508)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.$anonfun$gen$7(BCodeSkelBuilder.scala:510)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.gen(BCodeSkelBuilder.scala:510)
	at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.genPlainClass(BCodeSkelBuilder.scala:110)
@denisrosset
Copy link
Author

Yep indeed, disabling optimizations help -- the tests run perfectly then.

You can close this as duplicate if you feel like it! Thanks for your input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants