Skip to content

Commit 7fa157e

Browse files
committed
Rewrite
1 parent 68f09ef commit 7fa157e

File tree

10 files changed

+558
-712
lines changed

10 files changed

+558
-712
lines changed

compiler/src/dotty/tools/dotc/Compiler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Compiler {
3333
protected def frontendPhases: List[List[Phase]] =
3434
List(new Parser) :: // Compiler frontend: scanner, parser
3535
List(new TyperPhase) :: // Compiler frontend: namer, typer
36-
List(new CheckUnused.PostTyper, new CheckShadowing) :: // Check for unused, shadowed elements
36+
List(/*LintPreparation(),*/ CheckUnused.PostTyper()/*, CheckShadowing()*/) :: // Check for unused, shadowed elements
3737
List(new YCheckPositions) :: // YCheck positions
3838
List(new sbt.ExtractDependencies) :: // Sends information on classes' dependencies to sbt via callbacks
3939
List(new semanticdb.ExtractSemanticDB.ExtractSemanticInfo) :: // Extract info into .semanticdb files
@@ -51,7 +51,7 @@ class Compiler {
5151
List(new Staging) :: // Check staging levels and heal staged types
5252
List(new Splicing) :: // Replace level 1 splices with holes
5353
List(new PickleQuotes) :: // Turn quoted trees into explicit run-time data structures
54-
List(new CheckUnused.PostInlining) :: // Check for unused elements
54+
List(/*LintPreparation(),*/ CheckUnused.PostInlining()) :: // Check for unused elements
5555
Nil
5656

5757
/** Phases dealing with the transformation from pickled trees to backend trees */

compiler/src/dotty/tools/dotc/reporting/messages.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3305,6 +3305,8 @@ object UnusedSymbol:
33053305
def implicitParams(using Context): UnusedSymbol = UnusedSymbol(i"unused implicit parameter")
33063306
def privateMembers(using Context): UnusedSymbol = UnusedSymbol(i"unused private member")
33073307
def patVars(using Context): UnusedSymbol = UnusedSymbol(i"unused pattern variable")
3308+
def unsetLocals(using Context): UnusedSymbol = UnusedSymbol(i"unset local variable, consider using an immutable val instead")
3309+
def unsetPrivates(using Context): UnusedSymbol = UnusedSymbol(i"unset private variable, consider using an immutable val instead")
33083310

33093311
class NonNamedArgumentInJavaAnnotation(using Context) extends SyntaxMsg(NonNamedArgumentInJavaAnnotationID):
33103312

0 commit comments

Comments
 (0)