Skip to content

Commit 43852bf

Browse files
committed
Throw an exception for NoSymbol.owner
This preserves the former behavior on NoDenotation.
1 parent fdfa308 commit 43852bf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,7 @@ object Symbols {
891891
}
892892

893893
@sharable val NoSymbol: Symbol = new Symbol(NoCoord, 0) {
894+
override def owner(implicit ctx: Context): Symbol = throw new AssertionError("NoSymbol.owner")
894895
override def associatedFile(implicit ctx: Context): AbstractFile = NoSource.file
895896
override def recomputeDenot(lastd: SymDenotation)(implicit ctx: Context): SymDenotation = NoDenotation
896897
}

0 commit comments

Comments
 (0)