Skip to content

Commit eb269c8

Browse files
committed
Removed some more .nn
1 parent 99db4d2 commit eb269c8

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

compiler/src/dotty/tools/backend/jvm/PostProcessor.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class PostProcessor(val frontendAccess: PostProcessorFrontendAccess, val bTypes:
7171
val locationAddendum =
7272
if pos1.source.path == pos2.source.path then ""
7373
else s" (defined in ${pos2.source.file.name})"
74-
def nicify(name: String): String = name.replace('/', '.').nn
74+
def nicify(name: String): String = name.replace('/', '.')
7575
if name1 == name2 then
7676
backendReporting.error(
7777
em"${nicify(name1)} and ${nicify(name2)} produce classes that overwrite one another", pos1)

compiler/src/dotty/tools/backend/jvm/PostProcessorFrontendAccess.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ object PostProcessorFrontendAccess {
146146
override def backendReporting: BackendReporting = {
147147
val local = localReporter.get()
148148
if local eq null then directBackendReporting
149-
else local.nn
149+
else local
150150
}
151151

152152
override object directBackendReporting extends BackendReporting {

compiler/src/dotty/tools/dotc/cc/Setup.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ class Setup extends PreRecheck, SymTransformer, SetupAPI:
445445
CapturingType(parent2, ann.tree.toCaptureSet)
446446
catch case ex: IllegalCaptureRef =>
447447
if !tptToCheck.isEmpty then
448-
report.error(em"Illegal capture reference: ${ex.getMessage.nn}", tptToCheck.srcPos)
448+
report.error(em"Illegal capture reference: ${ex.getMessage}", tptToCheck.srcPos)
449449
parent2
450450
else if ann.symbol == defn.UncheckedCapturesAnnot then
451451
makeUnchecked(apply(parent))
@@ -938,7 +938,7 @@ class Setup extends PreRecheck, SymTransformer, SetupAPI:
938938
val refs =
939939
try refTree.toCaptureRefs
940940
catch case ex: IllegalCaptureRef =>
941-
report.error(em"Illegal capture reference: ${ex.getMessage.nn}", refTree.srcPos)
941+
report.error(em"Illegal capture reference: ${ex.getMessage}", refTree.srcPos)
942942
Nil
943943
for ref <- refs do
944944
def pos =

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ object SymbolLoaders {
158158
if (!ok)
159159
report.warning(i"""$what ${tree.name} is in the wrong directory.
160160
|It was declared to be in package ${path.reverse.mkString(".")}
161-
|But it is found in directory ${filePath.reverse.mkString(File.separator.nn)}""",
161+
|But it is found in directory ${filePath.reverse.mkString(File.separator)}""",
162162
tree.srcPos.focus)
163163
ok
164164
}

compiler/src/dotty/tools/dotc/plugins/Plugins.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ trait Plugins {
3838
// Explicit parameterization of recover to avoid -Xlint warning about inferred Any
3939
errors foreach (_.recover[Any] {
4040
// legacy behavior ignores altogether, so at least warn devs
41-
case e: MissingPluginException => report.warning(e.getMessage.nn)
42-
case e: Exception => report.inform(e.getMessage.nn)
41+
case e: MissingPluginException => report.warning(e.getMessage)
42+
case e: Exception => report.inform(e.getMessage)
4343
})
4444

4545
goods map (_.get)

compiler/src/dotty/tools/dotc/sbt/package.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ extension (sym: Symbol)
3939
// names in the global chars array. But we would need to restructure
4040
// ExtractDependencies caches to avoid expensive `toString` on
4141
// each member reference.
42-
termName(sym.owner.fullName.mangledString.replace(".", ";").nn ++ ";init;")
42+
termName(sym.owner.fullName.mangledString.replace(".", ";") ++ ";init;")
4343
else
4444
sym.name.stripModuleClassSuffix

compiler/src/dotty/tools/dotc/transform/CheckUnused.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ object CheckUnused:
840840
val ok = fun.symbol.info match
841841
case PolyType(tycon, MethodTpe(_, _, AppliedType(_, tprefs))) =>
842842
tprefs.collect:
843-
case ref: TypeParamRef => termName(ref.binder.paramNames(ref.paramNum).toString.toLowerCase.nn)
843+
case ref: TypeParamRef => termName(ref.binder.paramNames(ref.paramNum).toString.toLowerCase)
844844
case _ => Nil
845845
allowVariableBindings(ok, args)
846846
else if fun.symbol == defn.TypeTest_unapply then

compiler/src/dotty/tools/dotc/transform/InstrumentCoverage.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class InstrumentCoverage extends MacroTransform with IdentityDenotTransformer:
122122
line = pos.line + 1,
123123
desc = sourceFile.content.slice(pos.start, pos.end).mkString,
124124
symbolName = tree.symbol.name.toSimpleName.show,
125-
treeName = tree.getClass.getSimpleName.nn,
125+
treeName = tree.getClass.getSimpleName,
126126
branch
127127
)
128128
ctx.base.coverage.nn.addStatement(statement)

compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ object SourceCode {
14701470
namesIndex(name0) = index + 1
14711471
val name =
14721472
if index == 1 then name0
1473-
else s"`$name0${index.toString.toCharArray.nn.map {x => (x - '0' + '₀').toChar}.mkString}`"
1473+
else s"`$name0${index.toString.toCharArray.map {x => (x - '0' + '₀').toChar}.mkString}`"
14741474
names(sym) = name
14751475
Some(name)
14761476
}

0 commit comments

Comments
 (0)