Closed
Description
[Low priority]
In this example,
object test {
type X = { val m: BadType }
}
the BadType
is correctly rejected, but then typechecking continues and throws an uncaught exception:
[error] tests/neg/NoDenotationOwner.scala:2: error: not found: type BadType
[error] type X = { val m: BadType }
[error] ^
[info] exception occured while typechecking tests/neg/NoDenotationOwner.scala
[error] Exception in thread "main" java.lang.AssertionError: NoDenotation.owner
[error] at dotty.tools.dotc.core.SymDenotations$NoDenotation$.owner(SymDenotations.scala:1228)
[error] at dotty.tools.dotc.typer.Typer$$anonfun$typedRefinedTypeTree$1$$anonfun$dotty$tools$dotc$typer$Typer$$anonfun$$addRefinement$1$2.apply(Typer.scala:671)
[error] at dotty.tools.dotc.typer.Typer$$anonfun$typedRefinedTypeTree$1$$anonfun$dotty$tools$dotc$typer$Typer$$anonfun$$addRefinement$1$2.apply(Typer.scala:669)
[error] at dotty.tools.dotc.ast.Trees$Instance$$anon$1.traverse(Trees.scala:889)
...