Skip to content

Commit c2f78da

Browse files
committed
Remove unused parameters from scalac port
1 parent 6ecd7b0 commit c2f78da

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
557557
if (erasedTypeSym.isPrimitiveValueClass) {
558558
None
559559
} else {
560-
val jsOpt = Erasure.javaSig(sym, memberTpe, _ => ())
560+
val jsOpt = Erasure.javaSig(sym, memberTpe)
561561
if (ctx.settings.XverifySignatures.value) {
562562
jsOpt.foreach(verifySignature(sym, _))
563563
}

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

+8-9
Original file line numberDiff line numberDiff line change
@@ -767,11 +767,11 @@ object Erasure {
767767
)
768768
}
769769

770-
final def javaSig(sym0: Symbol, info: Type, markClassUsed: Symbol => Unit)(implicit ctx: Context): Option[String] =
771-
ctx.atPhase(ctx.erasurePhase) { implicit ctx => javaSig0(sym0, info, markClassUsed) }
770+
final def javaSig(sym0: Symbol, info: Type)(implicit ctx: Context): Option[String] =
771+
ctx.atPhase(ctx.erasurePhase) { implicit ctx => javaSig0(sym0, info) }
772772

773773
@noinline
774-
private final def javaSig0(sym0: Symbol, info: Type, markClassUsed: Symbol => Unit)(implicit ctx: Context): Option[String] = {
774+
private final def javaSig0(sym0: Symbol, info: Type)(implicit ctx: Context): Option[String] = {
775775
val builder = new StringBuilder(64)
776776
val isTraitSignature = sym0.enclosingClass.is(Flags.Trait)
777777

@@ -859,7 +859,7 @@ object Erasure {
859859
}
860860

861861
@noinline
862-
def jsig(tp0: Type, existentiallyBound: List[Symbol] = Nil, toplevel: Boolean = false, primitiveOK: Boolean = true): Unit = {
862+
def jsig(tp0: Type, toplevel: Boolean = false, primitiveOK: Boolean = true): Unit = {
863863

864864
val tp = tp0.dealias
865865
tp match {
@@ -889,11 +889,10 @@ object Erasure {
889889
boxedSig(tp)
890890
}
891891
def classSig: Unit = {
892-
markClassUsed(sym)
893892
val preRebound = pre.baseType(sym.owner) // #2585
894893
if (needsJavaSig(preRebound, Nil)) {
895894
val i = builder.length()
896-
jsig(preRebound, existentiallyBound)
895+
jsig(preRebound)
897896
if (builder.charAt(i) == 'L') {
898897
builder.delete(builder.length() - 1, builder.length())// delete ';'
899898
// If the prefix is a module, drop the '$'. Classes (or modules) nested in modules
@@ -951,14 +950,14 @@ object Erasure {
951950
if (unboxedSeen.isPrimitiveValueType && !primitiveOK)
952951
classSig
953952
else
954-
jsig(unboxedSeen, existentiallyBound, toplevel, primitiveOK)
953+
jsig(unboxedSeen, toplevel, primitiveOK)
955954
}
956955
else if (tp.isPhantom)
957956
jsig(defn.ErasedPhantomType)
958957
else if (sym.isClass)
959958
classSig
960959
else
961-
jsig(erasure(tp), existentiallyBound, toplevel, primitiveOK)
960+
jsig(erasure(tp), toplevel, primitiveOK)
962961

963962
case ExprType(restpe) if toplevel =>
964963
builder.append("()")
@@ -1009,7 +1008,7 @@ object Erasure {
10091008
superSig(ci.typeSymbol, ci.parents)
10101009

10111010
case AnnotatedType(atp, _) =>
1012-
jsig(atp, existentiallyBound, toplevel, primitiveOK)
1011+
jsig(atp, toplevel, primitiveOK)
10131012

10141013
case hktl: HKTypeLambda =>
10151014
jsig(hktl.finalResultType)

0 commit comments

Comments
 (0)