You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: mocking up superclass for module class<root>
java.lang.AssertionError: assertion failed: Cannot create ClassBType from NoSymbol
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
at dotty.tools.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:51)
at dotty.tools.backend.jvm.BTypesFromSymbols.buildNestedInfo(BTypesFromSymbols.scala:218)
at dotty.tools.backend.jvm.BTypesFromSymbols.setClassInfo(BTypesFromSymbols.scala:176)
at dotty.tools.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol$$anonfun$1(BTypesFromSymbols.scala:64)
at scala.collection.mutable.HashMap.getOrElse(HashMap.scala:436)
at dotty.tools.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:65)
at dotty.tools.backend.jvm.BCodeHelpers$BCInnerClassGen.getClassBType(BCodeHelpers.scala:177)
at dotty.tools.backend.jvm.BCodeHelpers$BCInnerClassGen.getClassBType$(BCodeHelpers.scala:129)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.getClassBType(BCodeSkelBuilder.scala:74)
at dotty.tools.backend.jvm.BCodeHelpers.primitiveOrClassToBType$1$$anonfun$1(BCodeHelpers.scala:714)
at scala.collection.immutable.HashMap.getOrElse(HashMap.scala:683)
at dotty.tools.backend.jvm.BCodeHelpers.primitiveOrClassToBType$1(BCodeHelpers.scala:714)
at dotty.tools.backend.jvm.BCodeHelpers.dotty$tools$backend$jvm$BCodeHelpers$$typeToTypeKind(BCodeHelpers.scala:733)
at dotty.tools.backend.jvm.BCodeHelpers$BCInnerClassGen.toTypeKind(BCodeHelpers.scala:201)
at dotty.tools.backend.jvm.BCodeHelpers$BCInnerClassGen.toTypeKind$(BCodeHelpers.scala:129)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.toTypeKind(BCodeSkelBuilder.scala:74)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.symInfoTK(BCodeSkelBuilder.scala:103)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.addClassFields$$anonfun$2(BCodeSkelBuilder.scala:352)
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.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.addClassFields(BCodeSkelBuilder.scala:358)
at dotty.tools.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.genPlainClass(BCodeSkelBuilder.scala:232)
at dotty.tools.backend.jvm.CodeGen.genClass(CodeGen.scala:138)
at dotty.tools.backend.jvm.CodeGen.genClassDef$1(CodeGen.scala:55)
at dotty.tools.backend.jvm.CodeGen.genClassDefs$1(CodeGen.scala:101)
at dotty.tools.backend.jvm.CodeGen.genClassDefs$1$$anonfun$1(CodeGen.scala:99)
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.backend.jvm.CodeGen.genClassDefs$1(CodeGen.scala:99)
at dotty.tools.backend.jvm.CodeGen.genUnit(CodeGen.scala:104)
at dotty.tools.backend.jvm.GenBCode.run(GenBCode.scala:76)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:327)
at scala.collection.immutable.List.map(List.scala:246)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:331)
at dotty.tools.backend.jvm.GenBCode.runOn(GenBCode.scala:87)
at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:246)
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:1321)
at dotty.tools.dotc.Run.runPhases$1(Run.scala:262)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:270)
at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:279)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
at dotty.tools.dotc.Run.compileUnits(Run.scala:279)
at dotty.tools.dotc.Run.compileUnits(Run.scala:200)
at dotty.tools.repl.ReplCompiler.compile(ReplCompiler.scala:87)
at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:307)
at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:269)
at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:169)
at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:172)
at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:211)
at dotty.tools.repl.ReplDriver.runBody$$anonfun$1(ReplDriver.scala:185)
at dotty.tools.runner.ScalaClassLoader$.asContext(ScalaClassLoader.scala:80)
at dotty.tools.repl.ReplDriver.runBody(ReplDriver.scala:185)
at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:172)
at dotty.tools.repl.ReplDriver.tryRunning(ReplDriver.scala:134)
at dotty.tools.repl.Main$.main(Main.scala:7)
at dotty.tools.repl.Main.main(Main.scala)
Errorwhile emitting rs$line$1
assertion failed: Cannot create ClassBType from NoSymbol1 error foun
Also code completions on _root_.<TAB> in REPL don't work
The text was updated successfully, but these errors were encountered:
This issue was picked for the Issue Spree No. 32 of 20 June 2023 which takes place in 7 days. @Linyxus, @nmcb, @jan-pieter, @TheElectronWill will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here.
Did someone laugh because the message says, "mocking"?
Also compare
Welcome to Scala 3.3.0 (20.0.1, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> val _root_ = ""
val _root_: String = ""
scala> _root_.length
-- [E008] Not Found Error: ---------------------------------------------------------------------------------------------
1 |_root_.length
|^^^^^^^^^^^^^
|value length is not a member of <root>
1 error found
and
Welcome to Scala 2.13.11 (OpenJDK 64-Bit Server VM, Java 20.0.1).
Type in expressions for evaluation. Or try :help.
scala> val _root_ = ""
val _root_: String = ""
scala> _root_.length
^
error: object length is not a member of package <root>
^
warning: _root_ in root position of qualifier refers to the root package, not value _root_, which is in scope
scala> _root_
^
error: reference to _root_ is ambiguous;
it is both defined in <none> and imported subsequently by
import _root_
References #18020, didn't actually fix that, because it addressed
aspects of using `_root_` in definitions. Adding more details to that
ticket.
Fixes#17757Fixes#18050
Includes the code in scala/bug#12508
Compiler version
3.3.2-RC1-bin-20230601-8814760-NIGHTLY - prints compiler stack trace, keeps REPL alive
3.3.1-RC1 - prints compiler stack trace, keeps REPL alive
3.3.0 - crashes REPL
Minimized code
scala> _root_
Output (click arrow to expand)
Also code completions on
_root_.<TAB>
in REPL don't workThe text was updated successfully, but these errors were encountered: