-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Compiler Crashes Attempting To Compile ZIO Flow On 3.0.0-RC1 #11725
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
Comments
Minimized: sealed trait Expr[+A] extends ExprTuple[A]
case class Lit[A](value: A) extends Expr[A]
trait ExprTuple[+A] {
def _1(implicit ev: ExprTuple.Has2[A]): Expr[ev._1] = ???
def _2(implicit ev: ExprTuple.Has2[A]): Expr[ev._2] = ???
}
object ExprTuple {
trait Has2[-A] { type _1; type _2 }
object Has2 {
type Aux[-A, A1, A2] = Has2[A] { type _1 = A1; type _2 = A2 }
}
implicit def tuple2[A, B]: Has2.Aux[(A, B), A, B] = ???
} Compiler Output (3.0.0-RC1)error when pickling tree Lit.this._1
error when pickling tree case 0 => Lit.this._1
error when pickling tree n match
{
case 0 => Lit.this._1
case _ => throw new IndexOutOfBoundsException(n.toString())
}
error when pickling tree override def productElement(n: Int): Any =
n match
{
case 0 => this._1
case _ => throw new IndexOutOfBoundsException(n.toString())
}
error when pickling tree [A >: Nothing <: Any](value: A) extends Object(), Expr[Lit.this.A], _root_.scala
.
Product, _root_.scala.Serializable {
override def hashCode(): Int = scala.runtime.ScalaRunTime._hashCode(this)
override def equals(x$0: Any): Boolean =
this.eq(x$0.$asInstanceOf$[Object]).||(
x$0 match
{
case x$0 @ _:Lit[A] @unchecked =>
this.value.==(x$0.value).&&(x$0.canEqual(this))
case _ => false
}
)
override def toString(): String = scala.runtime.ScalaRunTime._toString(this)
override def canEqual(that: Any): Boolean =
that.isInstanceOf[Lit[A] @unchecked]
override def productArity: Int = 1
override def productPrefix: String = "Lit"
override def productElement(n: Int): Any =
n match
{
case 0 => this._1
case _ => throw new IndexOutOfBoundsException(n.toString())
}
override def productElementName(n: Int): String =
n match
{
case 0 => "value"
case _ => throw new IndexOutOfBoundsException(n.toString())
}
A
val value: A
def copy[A](value: A): Lit[A] = new Lit[A](value)
def copy$default$1[A]: A =
Lit.this.value:(Lit.this.value : A) @uncheckedVariance
def _1: A = this.value
}
error when pickling tree @scala.annotation.internal.SourceFile("Expr.scala") case class Lit[
A >: Nothing <: Any
](value: A) extends Object(), Expr[Lit.this.A], _root_.scala.Product, _root_.
scala
.Serializable {
override def hashCode(): Int = scala.runtime.ScalaRunTime._hashCode(this)
override def equals(x$0: Any): Boolean =
this.eq(x$0.$asInstanceOf$[Object]).||(
x$0 match
{
case x$0 @ _:Lit[A] @unchecked =>
this.value.==(x$0.value).&&(x$0.canEqual(this))
case _ => false
}
)
override def toString(): String = scala.runtime.ScalaRunTime._toString(this)
override def canEqual(that: Any): Boolean =
that.isInstanceOf[Lit[A] @unchecked]
override def productArity: Int = 1
override def productPrefix: String = "Lit"
override def productElement(n: Int): Any =
n match
{
case 0 => this._1
case _ => throw new IndexOutOfBoundsException(n.toString())
}
override def productElementName(n: Int): String =
n match
{
case 0 => "value"
case _ => throw new IndexOutOfBoundsException(n.toString())
}
A
val value: A
def copy[A](value: A): Lit[A] = new Lit[A](value)
def copy$default$1[A]: A =
Lit.this.value:(Lit.this.value : A) @uncheckedVariance
def _1: A = this.value
}
error when pickling tree package <empty> {
@scala.annotation.internal.SourceFile("Expr.scala") case class Lit[
A >: Nothing <: Any
](value: A) extends Object(), Expr[Lit.this.A], _root_.scala.Product, _root_.
scala
.Serializable {
override def hashCode(): Int = scala.runtime.ScalaRunTime._hashCode(this)
override def equals(x$0: Any): Boolean =
this.eq(x$0.$asInstanceOf$[Object]).||(
x$0 match
{
case x$0 @ _:Lit[A] @unchecked =>
this.value.==(x$0.value).&&(x$0.canEqual(this))
case _ => false
}
)
override def toString(): String = scala.runtime.ScalaRunTime._toString(this)
override def canEqual(that: Any): Boolean =
that.isInstanceOf[Lit[A] @unchecked]
override def productArity: Int = 1
override def productPrefix: String = "Lit"
override def productElement(n: Int): Any =
n match
{
case 0 => this._1
case _ => throw new IndexOutOfBoundsException(n.toString())
}
override def productElementName(n: Int): String =
n match
{
case 0 => "value"
case _ => throw new IndexOutOfBoundsException(n.toString())
}
A
val value: A
def copy[A](value: A): Lit[A] = new Lit[A](value)
def copy$default$1[A]: A =
Lit.this.value:(Lit.this.value : A) @uncheckedVariance
def _1: A = this.value
}
final lazy module val Lit: Lit$ = new Lit$()
@scala.annotation.internal.SourceFile("Expr.scala") final module class Lit$()
extends
AnyRef(), scala.deriving.Mirror.Product { this: Lit.type =>
private def writeReplace(): AnyRef =
new scala.runtime.ModuleSerializationProxy(classOf[Lit.type])
def apply[A](value: A): Lit[A] = new Lit[A](value)
def unapply[A](x$1: Lit[A]): Lit[A] = x$1
override def toString: String = "Lit"
type MirroredMonoType = Lit[? <: AnyKind]
def fromProduct(x$0: Product): Lit.MirroredMonoType =
new Lit[Any](x$0.productElement(0))
}
}
exception occurred while compiling Expr.scala
java.lang.AssertionError: NoDenotation.owner while compiling Expr.scala
Exception in thread "main" java.lang.AssertionError: NoDenotation.owner
at dotty.tools.dotc.core.SymDenotations$NoDenotation$.owner(SymDenotations.scala:2394)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$2(TreePickler.scala:422)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:69)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:423)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$13(TreePickler.scala:506)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:69)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:506)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$41$$anonfun$1(TreePickler.scala:502)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$12(TreePickler.scala:502)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:69)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:503)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTreeUnlessEmpty(TreePickler.scala:330)
at dotty.tools.dotc.core.tasty.TreePickler.pickleDef$$anonfun$1(TreePickler.scala:345)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:69)
at dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:347)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:566)
at dotty.tools.dotc.core.tasty.TreePickler.pickleStats$$anonfun$2(TreePickler.scala:371)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.core.tasty.TreePickler.pickleStats(TreePickler.scala:371)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$26(TreePickler.scala:592)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:69)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:593)
at dotty.tools.dotc.core.tasty.TreePickler.pickleDef$$anonfun$1(TreePickler.scala:342)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:69)
at dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:347)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:568)
at dotty.tools.dotc.core.tasty.TreePickler.pickleStats$$anonfun$2(TreePickler.scala:371)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.core.tasty.TreePickler.pickleStats(TreePickler.scala:371)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$29(TreePickler.scala:608)
at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:69)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:608)
at dotty.tools.dotc.core.tasty.TreePickler.pickle$$anonfun$1(TreePickler.scala:778)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:778)
at dotty.tools.dotc.transform.Pickler.run$$anonfun$3$$anonfun$2(Pickler.scala:69)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.transform.Pickler.run$$anonfun$1(Pickler.scala:106)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.transform.Pickler.run(Pickler.scala:106)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:303)
at scala.collection.immutable.List.map(List.scala:246)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:304)
at dotty.tools.dotc.transform.Pickler.runOn(Pickler.scala:111)
at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:205)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
at dotty.tools.dotc.Run.runPhases$5(Run.scala:215)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:223)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
at dotty.tools.dotc.Run.compileUnits(Run.scala:230)
at dotty.tools.dotc.Run.compileSources(Run.scala:166)
at dotty.tools.dotc.Run.compile(Run.scala:150)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:39)
at dotty.tools.dotc.Driver.process(Driver.scala:186)
at dotty.tools.dotc.Driver.process(Driver.scala:155)
at dotty.tools.dotc.Driver.process(Driver.scala:167)
at dotty.tools.dotc.Driver.main(Driver.scala:194)
at dotty.tools.dotc.Main.main(Main.scala) |
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Mar 14, 2021
michelou
pushed a commit
to michelou/scala3
that referenced
this issue
Mar 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The issue can be seen in this commit - https://github.com/zio/zio-flow/tree/a28bd7cfb777bd2a8d50c80a80b4686e1d1d9fd2
I've not had a chance to create a minimal repro yet. I'll try to do that and add it later.
The error message is unfortunately very long.
The text was updated successfully, but these errors were encountered: