Skip to content
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

AssertionError: NoDenotation.owner (parser stability) #9283

Closed
sir-wabbit opened this issue Jul 5, 2020 · 0 comments · Fixed by #11258
Closed

AssertionError: NoDenotation.owner (parser stability) #9283

sir-wabbit opened this issue Jul 5, 2020 · 0 comments · Fixed by #11258

Comments

@sir-wabbit
Copy link

sir-wabbit commented Jul 5, 2020

Minimized code

// AE-77a004382f0de9965cb3880b27f302eb1c885c48
object Foo {
    class A
    def f(x: A): Unit = x { } // This error is necessary.
}
case class Foo()
type Foo = Any

Output (click arrow to expand)

-- Error: test.scala:1:0 -------------------------------------------------------
1 |object Foo {
  |^
  |Foo is already defined as object Foo in package <empty>
-- Error: test.scala:6:5 -------------------------------------------------------
6 |type Foo = Any
  |^^^^^^^^^^^^^^
  |Foo is already defined as class Foo in package <empty>
exception occurred while typechecking test.scala
exception occurred while compiling test.scala
java.lang.AssertionError: NoDenotation.owner while compiling test.scala
Exception in thread "main" java.lang.AssertionError: NoDenotation.owner
	at dotty.tools.dotc.core.SymDenotations$NoDenotation$.owner(SymDenotations.scala:2394)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.termRef(SymDenotations.scala:1451)
	at dotty.tools.dotc.typer.ImplicitRunInfo$collectParts$1$.traverse(Implicits.scala:535)
	at dotty.tools.dotc.core.Types$TypeTraverser.apply(Types.scala:5454)
	at dotty.tools.dotc.core.Types$TypeTraverser.apply(Types.scala:5454)
	at dotty.tools.dotc.typer.ProtoTypes$ViewProto.fold(ProtoTypes.scala:434)
	at dotty.tools.dotc.core.Types$TypeAccumulator.foldOver(Types.scala:5417)
	at dotty.tools.dotc.core.Types$TypeTraverser.traverseChildren(Types.scala:5455)
	at dotty.tools.dotc.typer.ImplicitRunInfo$collectParts$1$.traverse(Implicits.scala:544)
	at dotty.tools.dotc.typer.ImplicitRunInfo$collectParts$1$.apply(Implicits.scala:550)
	at dotty.tools.dotc.typer.ImplicitRunInfo.recur$1(Implicits.scala:618)
	at dotty.tools.dotc.typer.ImplicitRunInfo.computeIScope(Implicits.scala:630)
	at dotty.tools.dotc.typer.ImplicitRunInfo.implicitScope$$anonfun$1(Implicits.scala:698)
	at scala.collection.mutable.AnyRefMap.getOrElse(AnyRefMap.scala:155)
	at dotty.tools.dotc.typer.ImplicitRunInfo.implicitScope(Implicits.scala:703)
	at dotty.tools.dotc.Run.implicitScope(Run.scala:32)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.implicitScope(Implicits.scala:1316)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1292)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1301)
	at dotty.tools.dotc.typer.Implicits.op$1(Implicits.scala:963)
	at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:999)
	at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:89)
	at dotty.tools.dotc.typer.Implicits.inferView(Implicits.scala:747)
	at dotty.tools.dotc.typer.Typer.inferView(Typer.scala:89)
	at dotty.tools.dotc.typer.Typer.adaptToSubType$1(Typer.scala:3411)
	at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$4(Typer.scala:3217)
	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3269)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3500)
	at dotty.tools.dotc.typer.Typer.op$3(Typer.scala:2836)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:2837)
	at dotty.tools.dotc.typer.Typer.op$1(Typer.scala:2502)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2511)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2514)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2625)
	at dotty.tools.dotc.typer.Typer.typeSelectOnTerm$1(Typer.scala:545)
	at dotty.tools.dotc.typer.Typer.typedSelect(Typer.scala:569)
	at dotty.tools.dotc.typer.Typer.tryApply$1(Typer.scala:2746)
	at dotty.tools.dotc.typer.Typer.tryInsertApplyOrImplicit$$anonfun$2(Typer.scala:2768)
	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2633)
	at dotty.tools.dotc.typer.Typer.tryInsertApplyOrImplicit(Typer.scala:2777)
	at dotty.tools.dotc.typer.Typer.adaptToArgs$1(Typer.scala:2963)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3492)
	at dotty.tools.dotc.typer.Typer.op$3(Typer.scala:2836)

AE-77a004382f0de9965cb3880b27f302eb1c885c48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants