Skip to content

NoDenotation.owner while running MegaPhase during compile with coverage #17745

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
tchlr opened this issue Jun 1, 2023 · 2 comments
Closed

NoDenotation.owner while running MegaPhase during compile with coverage #17745

tchlr opened this issue Jun 1, 2023 · 2 comments
Labels
area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html itype:bug itype:crash stat:duplicate

Comments

@tchlr
Copy link

tchlr commented Jun 1, 2023

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)
@tchlr tchlr added itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 1, 2023
@TheElectronWill TheElectronWill added area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 1, 2023
@TheElectronWill
Copy link
Contributor

Thank you for reporting! This looks like a duplicate of #17625

@reid-spencer
Copy link

I just closed #17625 because 3.3.1-RC1 fixes the issue for me. It is likely fixed here, too, because this issue has the same symptom.

@dwijnand dwijnand closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:coverage Code coverage, see https://dotty.epfl.ch/docs/internals/coverage.html itype:bug itype:crash stat:duplicate
Projects
None yet
Development

No branches or pull requests

5 participants