Skip to content

Commit

Permalink
Respect prefix when checking if selector selects
Browse files Browse the repository at this point in the history
Prefer context functions for brevity. Avoid intermediate collections.
  • Loading branch information
som-snytt committed Jul 13, 2024
1 parent 25ad99c commit aa1526f
Show file tree
Hide file tree
Showing 6 changed files with 280 additions and 300 deletions.
15 changes: 7 additions & 8 deletions compiler/src/dotty/tools/dotc/reporting/messages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3280,11 +3280,10 @@ extends Message(UnusedSymbolID) {
override def explain(using Context) = ""
}

object UnusedSymbol {
def imports(using Context): UnusedSymbol = new UnusedSymbol(i"unused import")
def localDefs(using Context): UnusedSymbol = new UnusedSymbol(i"unused local definition")
def explicitParams(using Context): UnusedSymbol = new UnusedSymbol(i"unused explicit parameter")
def implicitParams(using Context): UnusedSymbol = new UnusedSymbol(i"unused implicit parameter")
def privateMembers(using Context): UnusedSymbol = new UnusedSymbol(i"unused private member")
def patVars(using Context): UnusedSymbol = new UnusedSymbol(i"unused pattern variable")
}
object UnusedSymbol:
def imports(using Context): UnusedSymbol = UnusedSymbol(i"unused import")
def localDefs(using Context): UnusedSymbol = UnusedSymbol(i"unused local definition")
def explicitParams(using Context): UnusedSymbol = UnusedSymbol(i"unused explicit parameter")
def implicitParams(using Context): UnusedSymbol = UnusedSymbol(i"unused implicit parameter")
def privateMembers(using Context): UnusedSymbol = UnusedSymbol(i"unused private member")
def patVars(using Context): UnusedSymbol = UnusedSymbol(i"unused pattern variable")
Loading

0 comments on commit aa1526f

Please sign in to comment.