File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
core/src/main/scala/com/typesafe/tools/mima/core
reporter/src/main/scala/com/typesafe/tools/mima/lib/analyze Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,13 @@ abstract class ClassInfo(val owner: PackageInfo) extends HasDeclarationName with
160
160
else Nil
161
161
}
162
162
163
+ /** The subset of concrete methods of this trait that are abstract at the JVM level.
164
+ * This corresponds to the pre-Scala-2.12 trait encoding where all `concreteMethods`
165
+ * are `emulatedConcreteMethods`. In 2.12 most concrete trait methods are translated
166
+ * to concrete interface methods. */
167
+ lazy val emulatedConcreteMethods : List [MemberInfo ] =
168
+ concreteMethods.filter(_.isDeferred)
169
+
163
170
/** The deferred methods of this trait */
164
171
lazy val deferredMethods : List [MemberInfo ] = {
165
172
val concreteSet = concreteMethods.toSet
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ private[analyze] class TraitAnalyzer extends Analyzer {
130
130
override def analyzeNewClassMethods (oldclazz : ClassInfo , newclazz : ClassInfo ): List [Problem ] = {
131
131
val res = collection.mutable.ListBuffer .empty[Problem ]
132
132
133
- for (newmeth <- newclazz.concreteMethods if newmeth.isDeferred && ! oldclazz.hasStaticImpl(newmeth)) {
133
+ for (newmeth <- newclazz.emulatedConcreteMethods if ! oldclazz.hasStaticImpl(newmeth)) {
134
134
if (! oldclazz.lookupMethods(newmeth.bytecodeName).exists(_.sig == newmeth.sig)) {
135
135
// this means that the method is brand new and therefore the implementation
136
136
// has to be injected
You can’t perform that action at this time.
0 commit comments