Closed as not planned
Description
Hi,
during an scala update to 3.3.0 in my project I noticed an exception during compilation with coverage support.
I tried to minimize the problem as far as possible. With version 3.2.2 or without the -coverage-out argument the code compiles without any problems.
Compiler version
Scala compiler version 3.3.0 -- Copyright 2002-2023, LAMP/EPFL
Minimized code
class TestClass(i: Int) {
def this(str: String) = this(str.toInt)
}
run with
scalac -coverage-out:. TestClass.scala
Output
java.lang.AssertionError: NoDenotation.owner while running MegaPhase{crossVersionChecks, protectedAccessors, extmethods, uncacheGivenAliases, elimByName, hoistSuperArgs, forwardDepChecks, specializeApplyMethods, tryCatchPatterns, patternMatcher} on TestClass.scala
exception occurred while compiling TestClass.scala
java.lang.AssertionError: NoDenotation.owner while compiling TestClass.scala
Exception in thread "main" java.lang.AssertionError: NoDenotation.owner
at dotty.tools.dotc.core.SymDenotations$NoDenotation$.owner(SymDenotations.scala:2576)
at dotty.tools.dotc.transform.HoistSuperArgs$Hoister.hoistSuperArgsFromCall(HoistSuperArgs.scala:185)
at dotty.tools.dotc.transform.HoistSuperArgs$Hoister.hoistSuperArgsFromConstr(HoistSuperArgs.scala:218)
at dotty.tools.dotc.transform.HoistSuperArgs.$anonfun$7(HoistSuperArgs.scala:230)
at dotty.tools.dotc.core.Decorators$.loop$1(Decorators.scala:94)
at dotty.tools.dotc.core.Decorators$.mapconserve(Decorators.scala:110)
at dotty.tools.dotc.transform.HoistSuperArgs.transformTypeDef(HoistSuperArgs.scala:230)
at dotty.tools.dotc.transform.MegaPhase.goTypeDef(MegaPhase.scala:995)
at dotty.tools.dotc.transform.MegaPhase.goTypeDef(MegaPhase.scala:996)
at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:256)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:425)
at dotty.tools.dotc.transform.MegaPhase.loop$1(MegaPhase.scala:438)
at dotty.tools.dotc.transform.MegaPhase.transformStats(MegaPhase.scala:438)
at dotty.tools.dotc.transform.MegaPhase.mapPackage$1(MegaPhase.scala:379)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:382)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.transformUnit(MegaPhase.scala:454)
at dotty.tools.dotc.transform.MegaPhase.run(MegaPhase.scala:466)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:324)
at scala.collection.immutable.List.map(List.scala:246)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:328)
at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:247)
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:263)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:271)
at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:280)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
at dotty.tools.dotc.Run.compileUnits(Run.scala:280)
at dotty.tools.dotc.Run.compileSources(Run.scala:195)
at dotty.tools.dotc.Run.compile(Run.scala:179)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:35)
at dotty.tools.dotc.Driver.process(Driver.scala:195)
at dotty.tools.dotc.Driver.process(Driver.scala:163)
at dotty.tools.dotc.Driver.process(Driver.scala:175)
at dotty.tools.dotc.Driver.main(Driver.scala:205)
at dotty.tools.MainGenericCompiler$.run$1(MainGenericCompiler.scala:162)
at dotty.tools.MainGenericCompiler$.main(MainGenericCompiler.scala:186)
at dotty.tools.MainGenericCompiler.main(MainGenericCompiler.scala)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at coursier.bootstrap.launcher.a.a(Unknown Source)
at coursier.bootstrap.launcher.Launcher.main(Unknown Source)