Skip to content

"ClassBType.info not yet assigned" error with Scala 2.13.0-RC1 #11524

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
xuwei-k opened this issue May 10, 2019 · 7 comments
Closed

"ClassBType.info not yet assigned" error with Scala 2.13.0-RC1 #11524

xuwei-k opened this issue May 10, 2019 · 7 comments
Milestone

Comments

@xuwei-k
Copy link

xuwei-k commented May 10, 2019

[error] Error while emitting CofreeTest.scala
[error] <error> (of class scala.reflect.internal.Types$ErrorType$)
[error] Error while emitting CofreeTest.scala
[error] assertion failed: ClassBType.info not yet assigned: Lscalaz/CofreeTest$LazyDefns$1$1;
[warn] 402 warnings found
[error] two errors found
[error] (testsJVM / Test / compileIncremental) Compilation failed
@SethTisue SethTisue added this to the 2.13.0-RC2 milestone May 10, 2019
@lrytz
Copy link
Member

lrytz commented May 10, 2019

Can reproduce locally

@lrytz
Copy link
Member

lrytz commented May 10, 2019

This seems to be an interaction with scala/scala#6050.

I just attached the debugger to the 2.13.0-RC1 compiler when running. Here's the tree that reaches the backend. Note the error type, which is causing the warning https://github.com/scala/scala/blob/v2.13.0-RC1/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala#L185.

object CofreeTest extends Object {
  final <static> <artifact> def $anonfun$new$1(lazyDefns$1$1: scalaz.CofreeTest$LazyDefns$1$1): scalaz.Order = lazyDefns$1$1.<rec$1: error>();
  def <init>(): scalaz.CofreeTest.type = {
    CofreeTest.super.<init>();
    scala.Predef.implicitly({
      final <synthetic> val lazyDefns$1: scalaz.CofreeTest$LazyDefns$1$1 = new scalaz.CofreeTest$LazyDefns$1$1();
      scalaz.this.Cofree.cofreeOrder(scalaz.std.anyVal.intInstance().$asInstanceOf[scalaz.Order](), {
        $anonfun(lazyDefns$1)
      })
    });
    ()
  }
}

The by-name implicit is https://github.com/xuwei-k/scalaz/blob/2201a647b81100df72ff74ab1d150e005339adf6/core/src/main/scala-2.13+/scalaz/CofreeInstancesVersionSpecific.scala#L14

To reproduce

A minimization would be helpful.. But @milessabin maybe you can take a look anyway?

@adriaanm adriaanm modified the milestones: 2.13.0-RC2, 2.13.1 May 10, 2019
@milessabin
Copy link

I'll try and find time in the next day or two. @xuwei-k a minimization would be really helpful.

@joroKr21
Copy link
Member

Another instance in kittens: #11591

@milessabin
Copy link

Continuing this on #11591.

@milessabin
Copy link

#11591 fixed in scala/scala#8201.

@xuwei-k it'd be great if you could confirm that this also fixes your issue ... most likely it will turn the compiler crash into vanilla implicit resolution failure.

@xuwei-k
Copy link
Author

xuwei-k commented Jul 24, 2019

confirmed! thanks!

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

No branches or pull requests

6 participants