Skip to content

Commit 0038e4c

Browse files
committed
Rewrite
1 parent e7c260d commit 0038e4c

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
@@ -3302,6 +3302,8 @@ object UnusedSymbol:
33023302
def implicitParams(using Context): UnusedSymbol = UnusedSymbol(i"unused implicit parameter")
33033303
def privateMembers(using Context): UnusedSymbol = UnusedSymbol(i"unused private member")
33043304
def patVars(using Context): UnusedSymbol = UnusedSymbol(i"unused pattern variable")
3305+
def unsetLocals(using Context): UnusedSymbol = UnusedSymbol(i"unset local variable, consider using an immutable val instead")
3306+
def unsetPrivates(using Context): UnusedSymbol = UnusedSymbol(i"unset private variable, consider using an immutable val instead")
33053307

33063308
class NonNamedArgumentInJavaAnnotation(using Context) extends SyntaxMsg(NonNamedArgumentInJavaAnnotationID):
33073309

0 commit comments

Comments
 (0)