Skip to content

Commit 25fdafa

Browse files
committed
refactor names and remove dead code
1 parent f82a8c7 commit 25fdafa

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ class Definitions {
750750
@tu lazy val RefiningAnnotationClass: ClassSymbol = ctx.requiredClass("scala.annotation.RefiningAnnotation")
751751

752752
// Annotation classes
753-
@tu lazy val ScalaAnnotationInternal: ClassSymbol = ctx.requiredClass("scala.annotation.internal")
754753
@tu lazy val AliasAnnot: ClassSymbol = ctx.requiredClass("scala.annotation.internal.Alias")
755754
@tu lazy val AnnotationDefaultAnnot: ClassSymbol = ctx.requiredClass("scala.annotation.internal.AnnotationDefault")
756755
@tu lazy val BodyAnnot: ClassSymbol = ctx.requiredClass("scala.annotation.internal.Body")

compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ExtractSemanticDB extends Phase with
5353
/** The index of a local symbol */
5454
private val locals = mutable.HashMap[Symbol, Int]()
5555

56-
/** The bodies of synthetic localså */
56+
/** The bodies of synthetic locals */
5757
private val localBodies = mutable.HashMap[Symbol, Tree]()
5858

5959
/** The local symbol(s) starting at given offset */

compiler/src/dotty/tools/dotc/semanticdb/Scala3.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ object Scala3 with
142142

143143
end LocalSymbol
144144

145-
private inline def (char: Char) `is/.#])` = (char: @switch) match
145+
private inline def (char: Char) isGlobalTerminal = (char: @switch) match
146146
case '/' | '.' | '#' | ']' | ')' => true
147147
case _ => false
148148

@@ -152,8 +152,8 @@ object Scala3 with
152152
def isRootPackage: Boolean = RootPackage == symbol
153153
def isEmptyPackage: Boolean = EmptyPackage == symbol
154154

155-
def isGlobal: Boolean = !symbol.isEmpty && !symbol.isMulti && symbol.last.`is/.#])`
156-
def isLocal: Boolean = !symbol.isEmpty && !symbol.isMulti && !symbol.last.`is/.#])`
155+
def isGlobal: Boolean = !symbol.isEmpty && !symbol.isMulti && symbol.last.isGlobalTerminal
156+
def isLocal: Boolean = !symbol.isEmpty && !symbol.isMulti && !symbol.last.isGlobalTerminal
157157
def isMulti: Boolean = symbol startsWith ";"
158158

159159
def isConstructor: Boolean = ctor matches symbol

0 commit comments

Comments
 (0)