Skip to content

AssertionError: NoDenotation.owner #3647

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
sir-wabbit opened this issue Dec 10, 2017 · 0 comments
Closed

AssertionError: NoDenotation.owner #3647

sir-wabbit opened this issue Dec 10, 2017 · 0 comments

Comments

@sir-wabbit
Copy link

object App {
  def main(args: Array[String]): Unit = {
    trait FooT {
      type T
      type Bar[A]

      def get(k: Bar[T]): String
    }
    val test: FooT = new FooT {
      type T = String
      type Bar[A] = J[A]
      sealed abstract class J[A]
      final case object JName extends J[T]
      final case object JInt extends J[Int]

      def get(k: J[T]): String = k match {
        case JName => "Age"
      }
    }
  }
}

kills the compiler with:

error when pickling type {...}.this.J
error when pickling type {...}.this.J[A]
error when pickling type {...}.this.J
error when pickling type  = {...}.this.J
error when pickling type FooT{T = String; Bar = {...}.this.J}
error when pickling type {z1 => FooT{T = String; Bar = z1.J}}
error when pickling tree {z1 => FooT{T = String; Bar = z1.J}}
error when pickling tree new Object with FooT{...}(): {z1 => FooT{T = String; Bar = z1.J}}
...
Exception in thread "main" java.lang.AssertionError: NoDenotation.owner
	at dotty.tools.dotc.core.SymDenotations$NoDenotation$.owner(SymDenotations.scala:1874)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.topLevel$1(SymDenotations.scala:928)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.topLevelClass(SymDenotations.scala:931)
	at dotty.tools.dotc.core.tasty.TreePickler.isLocallyDefined(TreePickler.scala:82)
	at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:191)
	at dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:132)
	at dotty.tools.dotc.core.tasty.TreePickler.$anonfun$pickleNewType$1(TreePickler.scala:148)
	at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:32)
	at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:148)
	at dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:132)
	at dotty.tools.dotc.core.tasty.TreePickler.$anonfun$pickleMethodic$1(TreePickler.scala:264)
	at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:32)
	at dotty.tools.dotc.core.tasty.TreePickler.pickleMethodic(TreePickler.scala:263)
...
@odersky odersky closed this as completed in e16271e Jan 2, 2018
odersky added a commit that referenced this issue Jan 2, 2018
Fix #3647: Define topLevelClass for NoDenotation
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

1 participant