- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.1k
Closed
Description
Related to #18251
Compiler version
v3.7.2-RC2
Minimized code
trait Foo extends reflect.Selectable
val foo = new Foo:
  object pin:
    val x = 1
export foo.pin.*Output (click arrow to expand)
    java.lang.AssertionError: NoDenotation.owner
    	at dotty.tools.dotc.core.SymDenotations$NoDenotation$.owner(SymDenotations.scala:2609)
    	at dotty.tools.dotc.core.SymDenotations$SymDenotation.isEffectivelyFinal(SymDenotations.scala:1188)
    	at dotty.tools.dotc.core.CheckRealizable.realizability(CheckRealizable.scala:97)
    	at dotty.tools.dotc.core.CheckRealizable$.realizability(CheckRealizable.scala:47)
    	at dotty.tools.dotc.typer.Checking$.checkRealizable(Checking.scala:205)
    	at dotty.tools.dotc.typer.Checking.checkLegalImportOrExportPath(Checking.scala:972)
    	at dotty.tools.dotc.typer.Checking.checkLegalExportPath(Checking.scala:997)
    	at dotty.tools.dotc.typer.Checking.checkLegalExportPath$(Checking.scala:858)
    	at dotty.tools.dotc.typer.Typer.checkLegalExportPath(Typer.scala:119)
    	at dotty.tools.dotc.typer.Namer$ClassCompleter.exportForwarders(Namer.scala:1124)
    	at dotty.tools.dotc.typer.Namer$ClassCompleter.processExport$1(Namer.scala:1425)
    	at dotty.tools.dotc.typer.Namer$ClassCompleter.process$1(Namer.scala:1447)
    	at dotty.tools.dotc.typer.Namer$ClassCompleter.processExports(Namer.scala:1468)
    	at dotty.tools.dotc.typer.Namer$ClassCompleter.completeInCreationContext(Namer.scala:1670)
    	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:828)
    	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:174)
    	at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:188)
    	at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:190)
    	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.computeMembersNamed(SymDenotations.scala:2145)
    	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.membersNamed(SymDenotations.scala:2115)
    	at dotty.tools.dotc.core.SymDenotations$ClassDenotation.findMember(SymDenotations.scala:2166)
    	at dotty.tools.dotc.core.Types$Type.go$1(Types.scala:740)
    	at dotty.tools.dotc.core.Types$Type.findMember(Types.scala:919)
    	at dotty.tools.dotc.typer.TypeAssigner.selectionType(TypeAssigner.scala:158)
    	at dotty.tools.dotc.typer.TypeAssigner.selectionType$(TypeAssigner.scala:16)
    	at dotty.tools.dotc.typer.Typer.selectionType(Typer.scala:119)
    	at dotty.tools.dotc.typer.Typer.typedSelectWithAdapt(Typer.scala:697)
    	at dotty.tools.dotc.typer.Typer.typeSelectOnTerm$1(Typer.scala:806)
    	at dotty.tools.dotc.typer.Typer.typedSelect(Typer.scala:843)
    	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3120)
    	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3231)
    	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3302)
    	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3306)
    	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3417)
    	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:995)
    	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1191)
    	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:400)
    	at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:119)
    	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3151)
    	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3232)
    	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3302)
    	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3306)
    	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3417)
    	at dotty.tools.dotc.typer.Typer.typedValDef(Typer.scala:2520)
    	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3124)
    	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3231)
    	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3302)
    	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3306)
    	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3328)
    	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3374)
    	at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:2914)
    	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3184)
    	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3232)
    	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3302)
    	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3306)
    	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3417)
    	at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$1(TyperPhase.scala:45)
    	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
    	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
    	at dotty.tools.dotc.core.Phases$Phase.monitor(Phases.scala:467)
    	at dotty.tools.dotc.typer.TyperPhase.typeCheck(TyperPhase.scala:51)
    	at dotty.tools.dotc.typer.TyperPhase.$anonfun$4(TyperPhase.scala:97)
    	at scala.collection.Iterator$$anon$6.hasNext(Iterator.scala:479)
    	at scala.collection.Iterator$$anon$9.hasNext(Iterator.scala:583)
    	at scala.collection.immutable.List.prependedAll(List.scala:152)
    	at scala.collection.immutable.List$.from(List.scala:685)
    	at scala.collection.immutable.List$.from(List.scala:682)
    	at scala.collection.IterableOps$WithFilter.map(Iterable.scala:900)
    	at dotty.tools.dotc.typer.TyperPhase.runOn(TyperPhase.scala:96)
    	at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:315)
    	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:1324)
    	at dotty.tools.dotc.Run.runPhases$1(Run.scala:308)
    	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:348)
    	at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:357)
    	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:69)
    	at dotty.tools.dotc.Run.compileUnits(Run.scala:357)
    	at dotty.tools.dotc.Run.compileSources(Run.scala:261)
    	at dotty.tools.dotc.Run.compile(Run.scala:246)
    	at dotty.tools.dotc.Driver.doCompile(Driver.scala:37)
    	at dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:141)
    	at dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22)
    	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
    	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:196)
    	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
    	at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:252)
    	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:186)
    	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:166)
    	at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:241)
    	at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:166)
    	at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:214)
    	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:542)
    	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:542)
    	at sbt.internal.inc.Incremental$.$anonfun$apply$3(Incremental.scala:182)
    	at sbt.internal.inc.Incremental$.$anonfun$apply$3$adapted(Incremental.scala:180)
    	at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:458)
    	at sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:117)
    	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
    	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
    	at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:263)
    	at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:413)
    	at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:500)
    	at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:400)
    	at sbt.internal.inc.Incremental$.apply(Incremental.scala:208)
    	at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:542)
    	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:496)
    	at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
    	at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:433)
    	at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
    	at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2443)
    	at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2393)
    	at sbt.internal.server.BspCompileTask$.$anonfun$compute$1(BspCompileTask.scala:41)
    	at sbt.internal.io.Retry$.apply(Retry.scala:47)
    	at sbt.internal.io.Retry$.apply(Retry.scala:29)
    	at sbt.internal.io.Retry$.apply(Retry.scala:24)
    	at sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:41)
    	at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2391)
    	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
    	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
    	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
    	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
    	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
    	at sbt.Execute.work(Execute.scala:292)
    	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
    	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
    	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.lang.Thread.run(Thread.java:840)