Skip to content

ICE: java.lang.AssertionError: assertion failed: no member this.i1 . ==, members = Scope{.... #12432

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
chengniansun opened this issue May 12, 2021 · 1 comment · Fixed by #14888

Comments

@chengniansun
Copy link

Compiler Version

Scala compiler version 3.0.1-RC1-bin-SNAPSHOT-git-4410752 -- Copyright 2002-2021, LAMP/EPFL

System Information

Linux 5.4.0-66-generic x86_64 GNU/Linux

Minimized Code

case class i1 ( i1 : annotation )

Output (click arrow to expand)

error while transforming (i1: annotation) extends Object(), _root_.scala.Product, _root_.scala.Serializable {
  val i1: annotation
  def copy(i1: annotation): i1 = new i1(i1)
  def copy$default$1: annotation @uncheckedVariance = i1.this.i1
  def _1: annotation = this.i1
}
error while transforming @scala.annotation.internal.SourceFile("mutant.scala") case class i1(i1: annotation) extends Object(), _root_.scala.Product, _root_.scala.Serializable {
  val i1: annotation
  def copy(i1: annotation): i1 = new i1(i1)
  def copy$default$1: annotation @uncheckedVariance = i1.this.i1
  def _1: annotation = this.i1
}
error while transforming package <empty> {
  @scala.annotation.internal.SourceFile("mutant.scala") case class i1(i1: annotation) extends Object(), _root_.scala.Product, _root_.scala.Serializable {
    val i1: annotation
    def copy(i1: annotation): i1 = new i1(i1)
    def copy$default$1: annotation @uncheckedVariance = i1.this.i1
    def _1: annotation = this.i1
  }
  final lazy module val i1: i1$ = new i1$()
  final module class i1$() extends AnyRef() { this: i1.type =>
    def apply(i1: annotation): i1 = new i1(i1)
    def unapply(x$1: i1): i1 = x$1
    override def toString: String = "i1"
  }
}
exception occurred while compiling mutant.scala
java.lang.AssertionError: assertion failed: no member this.i1 . ==, members = Scope{
  class switch?
  final lazy module object switch?
  final module object switch$?
  class implicitAmbiguous?
  final lazy module object implicitAmbiguous?
  final module object implicitAmbiguous$?
  trait ClassfileAnnotation?
  final lazy module object ClassfileAnnotation?
  final module object ClassfileAnnotation$: <notype>
  trait TypeConstraint?
  final lazy module object TypeConstraint?
  final module object TypeConstraint$: <notype>
  class unspecialized?
  final lazy module object unspecialized?
  final module object unspecialized$?
  class varargs?
  final lazy module object varargs?
  final module object varargs$?
  class unused?
  final lazy module object unused?
  final module object unused$?
  class implicitNotFound?
  final lazy module object implicitNotFound?
  final module object implicitNotFound$?
  private[scala] class migration?
  final lazy module object migration?
  final module object migration$?
  class strictfp?
  final lazy module object strictfp?
  final module object strictfp$?
  class compileTimeOnly?
  final lazy module object compileTimeOnly?
  final module object compileTimeOnly$?
  abstract class Annotation extends Object {} at (scala.annotation : annotation.type)
  final lazy module object Annotation?
  final module object Annotation$: <notype>
  class nowarn?
  final lazy module object nowarn?
  final module object nowarn$?
  abstract trait StaticAnnotation extends scala.annotation.Annotation {} at (scala.annotation : annotation.type)
  final lazy module object StaticAnnotation?
  final module object StaticAnnotation$: <notype>
  trait ConstantAnnotation?
  final lazy module object ConstantAnnotation?
  final module object ConstantAnnotation$: <notype>
  class tailrec?
  final lazy module object tailrec?
  final module object tailrec$?
  class showAsInfix?
  final lazy module object showAsInfix?
  final module object showAsInfix$?
  class elidable?
  final lazy module object elidable?
  final module object elidable$?
  class threadUnsafe?
  final lazy module object threadUnsafe?
  final module object threadUnsafe$?
  class alpha?
  final lazy module object alpha?
  final module object alpha$?
  trait RefiningAnnotation?
  final lazy module object RefiningAnnotation?
  final module object RefiningAnnotation$: <notype>
  class experimental?
  final lazy module object experimental?
  final module object experimental$?
  class targetName?
  final lazy module object targetName?
  final module object targetName$?
  class static?
  final lazy module object static?
  final module object static$?
  class transparentTrait?
  final lazy module object transparentTrait?
  final module object transparentTrait$?
  class constructorOnly?
  final lazy module object constructorOnly?
  final module object constructorOnly$?
  final lazy module object unchecked: scala.annotation.unchecked
  final module object unchecked extends  {this: scala.annotation.unchecked.type =>} at (scala.annotation : annotation.type)
  final lazy module object meta: scala.annotation.meta
  final module object meta extends  {this: scala.annotation.meta.type =>} at (scala.annotation : annotation.type)
  final lazy module object internal: scala.annotation.internal
  final module object internal extends  {this: scala.annotation.internal.type =>} at (scala.annotation : annotation.type)
} while compiling mutant.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: no member this.i1 . ==, members = Scope{
  class switch?
  final lazy module object switch?
  final module object switch$?
  class implicitAmbiguous?
  final lazy module object implicitAmbiguous?
  final module object implicitAmbiguous$?
  trait ClassfileAnnotation?
  final lazy module object ClassfileAnnotation?
  final module object ClassfileAnnotation$: <notype>
  trait TypeConstraint?
  final lazy module object TypeConstraint?
  final module object TypeConstraint$: <notype>
  class unspecialized?
  final lazy module object unspecialized?
  final module object unspecialized$?
  class varargs?
  final lazy module object varargs?
  final module object varargs$?
  class unused?
  final lazy module object unused?
  final module object unused$?
  class implicitNotFound?
  final lazy module object implicitNotFound?
  final module object implicitNotFound$?
  private[scala] class migration?
  final lazy module object migration?
  final module object migration$?
  class strictfp?
  final lazy module object strictfp?
  final module object strictfp$?
  class compileTimeOnly?
  final lazy module object compileTimeOnly?
  final module object compileTimeOnly$?
  abstract class Annotation extends Object {} at (scala.annotation : annotation.type)
  final lazy module object Annotation?
  final module object Annotation$: <notype>
  class nowarn?
  final lazy module object nowarn?
  final module object nowarn$?
  abstract trait StaticAnnotation extends scala.annotation.Annotation {} at (scala.annotation : annotation.type)
  final lazy module object StaticAnnotation?
  final module object StaticAnnotation$: <notype>
  trait ConstantAnnotation?
  final lazy module object ConstantAnnotation?
  final module object ConstantAnnotation$: <notype>
  class tailrec?
  final lazy module object tailrec?
  final module object tailrec$?
  class showAsInfix?
  final lazy module object showAsInfix?
  final module object showAsInfix$?
  class elidable?
  final lazy module object elidable?
  final module object elidable$?
  class threadUnsafe?
  final lazy module object threadUnsafe?
  final module object threadUnsafe$?
  class alpha?
  final lazy module object alpha?
  final module object alpha$?
  trait RefiningAnnotation?
  final lazy module object RefiningAnnotation?
  final module object RefiningAnnotation$: <notype>
  class experimental?
  final lazy module object experimental?
  final module object experimental$?
  class targetName?
  final lazy module object targetName?
  final module object targetName$?
  class static?
  final lazy module object static?
  final module object static$?
  class transparentTrait?
  final lazy module object transparentTrait?
  final module object transparentTrait$?
  class constructorOnly?
  final lazy module object constructorOnly?
  final module object constructorOnly$?
  final lazy module object unchecked: scala.annotation.unchecked
  final module object unchecked extends  {this: scala.annotation.unchecked.type =>} at (scala.annotation : annotation.type)
  final lazy module object meta: scala.annotation.meta
  final module object meta extends  {this: scala.annotation.meta.type =>} at (scala.annotation : annotation.type)
  final lazy module object internal: scala.annotation.internal
  final module object internal extends  {this: scala.annotation.internal.type =>} at (scala.annotation : annotation.type)
}
	at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
	at dotty.tools.dotc.ast.Trees$Instance.applyOverloaded(Trees.scala:1675)
	at dotty.tools.dotc.ast.tpd$TreeOps$.equal$extension(tpd.scala:962)
	at dotty.tools.dotc.transform.SyntheticMembers.$anonfun$12(SyntheticMembers.scala:255)
	at scala.collection.immutable.List.map(List.scala:246)
	at dotty.tools.dotc.transform.SyntheticMembers.equalsBody$1(SyntheticMembers.scala:255)
	at dotty.tools.dotc.transform.SyntheticMembers.syntheticRHS$1(SyntheticMembers.scala:146)
	at dotty.tools.dotc.transform.SyntheticMembers.syntheticDef$3$$anonfun$2$$anonfun$1(SyntheticMembers.scala:155)
	at dotty.tools.dotc.transform.SyntheticMembers.synthesizeDef$$anonfun$1(SyntheticMembers.scala:85)
	at dotty.tools.dotc.ast.tpd$.DefDef(tpd.scala:285)
	at dotty.tools.dotc.transform.SyntheticMembers.synthesizeDef(SyntheticMembers.scala:85)
	at dotty.tools.dotc.transform.SyntheticMembers.syntheticDef$1(SyntheticMembers.scala:155)
	at dotty.tools.dotc.transform.SyntheticMembers.syntheticDefIfMissing$1(SyntheticMembers.scala:110)
	at dotty.tools.dotc.transform.SyntheticMembers.caseAndValueMethods$$anonfun$1(SyntheticMembers.scala:383)
	at scala.collection.immutable.List.flatMap(List.scala:293)
	at dotty.tools.dotc.transform.SyntheticMembers.caseAndValueMethods(SyntheticMembers.scala:383)
	at dotty.tools.dotc.transform.SyntheticMembers.addSyntheticMembers(SyntheticMembers.scala:604)
	at dotty.tools.dotc.transform.PostTyper$PostTyperTransformer.transform$$anonfun$4(PostTyper.scala:344)
	at dotty.tools.dotc.transform.PostTyper$PostTyperTransformer.withNoCheckNews(PostTyper.scala:98)
	at dotty.tools.dotc.transform.PostTyper$PostTyperTransformer.transform(PostTyper.scala:345)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1410)
	at dotty.tools.dotc.transform.MacroTransform$Transformer.transform(MacroTransform.scala:51)
	at dotty.tools.dotc.transform.PostTyper$PostTyperTransformer.transform(PostTyper.scala:370)
	at dotty.tools.dotc.transform.MacroTransform$Transformer.transformStat$1(MacroTransform.scala:39)
	at dotty.tools.dotc.transform.MacroTransform$Transformer.transformStats$$anonfun$1(MacroTransform.scala:42)
	at dotty.tools.dotc.core.Decorators$ListDecorator$.loop$1(Decorators.scala:92)
	at dotty.tools.dotc.core.Decorators$ListDecorator$.mapconserve$extension(Decorators.scala:108)
	at dotty.tools.dotc.transform.MacroTransform$Transformer.transformStats(MacroTransform.scala:42)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1421)
	at dotty.tools.dotc.transform.MacroTransform$Transformer.transform(MacroTransform.scala:51)
	at dotty.tools.dotc.transform.PostTyper$PostTyperTransformer.transform(PostTyper.scala:435)
	at dotty.tools.dotc.transform.MacroTransform.run(MacroTransform.scala:21)
	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.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:216)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:224)
	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:231)
	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:199)
	at dotty.tools.dotc.Driver.process(Driver.scala:167)
	at dotty.tools.dotc.Driver.process(Driver.scala:179)
	at dotty.tools.dotc.Driver.main(Driver.scala:209)
	at dotty.tools.dotc.Main.main(Main.scala)
@griggt
Copy link
Contributor

griggt commented May 14, 2021

Possible duplicate of #9289

odersky added a commit to dotty-staging/dotty that referenced this issue May 23, 2021
odersky added a commit to dotty-staging/dotty that referenced this issue Apr 8, 2022
odersky added a commit to dotty-staging/dotty that referenced this issue Apr 8, 2022
michelou pushed a commit to michelou/scala3 that referenced this issue Apr 25, 2022
@Kordyjan Kordyjan added this to the 3.2.0 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants