Skip to content

Commit

Permalink
Ignore when first constructor parameter is dropped from Signature
Browse files Browse the repository at this point in the history
Before Scala 2.12.9/2.13.1, the `Signature` attribute of an inner class
constructor would also contain the first, synthetic parameter.

This was fixed in scala/scala#7975, which course leads
to mima warnings about inconsistent signatures. Since the descriptor remains
the same, and the previous signature was wrong anyway (so anything relying on
it can not have worked in the first place) this specific change can be safely
ignored

Tested with Akka HTTP, akka/akka-http#2655 (comment)
  • Loading branch information
raboof committed Aug 21, 2019
1 parent fc2b616 commit b8951d1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ private[analyze] abstract class BaseMethodChecker extends Checker[MethodInfo, Cl
}

private def methSigCheck(oldmeth: MethodInfo, newMeth: MethodInfo): Boolean = {
oldmeth.signature == newMeth.signature || (
newMeth.bytecodeName == MemberInfo.ConstructorName && newMeth.signature.isEmpty
)
oldmeth.signature == newMeth.signature ||
(newMeth.bytecodeName == MemberInfo.ConstructorName &&
(newMeth.signature.isEmpty || (oldmeth.signature.endsWith(newMeth.signature.drop(2))))
)
}

private def uniques(methods: List[MethodInfo]): List[MethodInfo] =
Expand Down

0 comments on commit b8951d1

Please sign in to comment.