Skip to content

Commit

Permalink
Avoid EmptyScope.cloneScope crashing, eg on missing references (#16314)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand authored Nov 18, 2022
2 parents 298ff3f + f8273c8 commit e09175e
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 e09175e

Please sign in to comment.