Skip to content

Commit 3f6af19

Browse files
committed
Remove unused parameters from scalac port
1 parent 797a941 commit 3f6af19

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
569569
if (erasedTypeSym.isPrimitiveValueClass) {
570570
None
571571
} else {
572-
val jsOpt = Erasure.javaSig(sym, memberTpe, _ => ())
572+
val jsOpt = Erasure.javaSig(sym, memberTpe)
573573
if (ctx.settings.XverifySignatures.value) {
574574
jsOpt.foreach(verifySignature(sym, _))
575575
}

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -768,11 +768,11 @@ object Erasure {
768768
)
769769
}
770770

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

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

@@ -860,7 +860,7 @@ object Erasure {
860860
}
861861

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

865865
val tp = tp0.dealias
866866
tp match {
@@ -890,11 +890,10 @@ object Erasure {
890890
boxedSig(tp)
891891
}
892892
def classSig: Unit = {
893-
markClassUsed(sym)
894893
val preRebound = pre.baseType(sym.owner) // #2585
895894
if (needsJavaSig(preRebound, Nil)) {
896895
val i = builder.length()
897-
jsig(preRebound, existentiallyBound)
896+
jsig(preRebound)
898897
if (builder.charAt(i) == 'L') {
899898
builder.delete(builder.length() - 1, builder.length())// delete ';'
900899
// If the prefix is a module, drop the '$'. Classes (or modules) nested in modules
@@ -952,14 +951,14 @@ object Erasure {
952951
if (unboxedSeen.isPrimitiveValueType && !primitiveOK)
953952
classSig
954953
else
955-
jsig(unboxedSeen, existentiallyBound, toplevel, primitiveOK)
954+
jsig(unboxedSeen, toplevel, primitiveOK)
956955
}
957956
else if (tp.isPhantom)
958957
jsig(defn.ErasedPhantomType)
959958
else if (sym.isClass)
960959
classSig
961960
else
962-
jsig(erasure(tp), existentiallyBound, toplevel, primitiveOK)
961+
jsig(erasure(tp), toplevel, primitiveOK)
963962

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

10121011
case AnnotatedType(atp, _) =>
1013-
jsig(atp, existentiallyBound, toplevel, primitiveOK)
1012+
jsig(atp, toplevel, primitiveOK)
10141013

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

0 commit comments

Comments
 (0)