Skip to content

Commit

Permalink
Avoid EmptyScope.cloneScope crashing, eg on missing references
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Nov 18, 2022
1 parent 298ff3f commit f8273c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Scopes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ object Scopes {
override def size: Int = 0
override def nestingLevel: Int = 0
override def toList(using Context): List[Symbol] = Nil
override def cloneScope(using Context): MutableScope = unsupported("cloneScope")
override def cloneScope(using Context): MutableScope = newScope(nestingLevel)
override def lookupEntry(name: Name)(using Context): ScopeEntry | Null = null
override def lookupNextEntry(entry: ScopeEntry)(using Context): ScopeEntry | Null = null
}
Expand Down

0 comments on commit f8273c8

Please sign in to comment.