mima icon indicating copy to clipboard operation
mima copied to clipboard

False positive moving methods within sealed abstract class hierarchy

Open adriaanm opened this issue 7 years ago • 3 comments
trafficstars

Needs clarification: https://github.com/typelevel/cats/pull/2335#discussion_r205950655

"Only sealed abstract classes that provide implicit instances to companion objects are allowed here, since they don't affect usage outside of the file."

adriaanm avatar Aug 03 '18 09:08 adriaanm

When concrete methods are being moved between abstract sealed classes whose usage is in a single inheritance hierarchy, the change should be deemed binary compatible. E.g.


sealed abstract class A {def a = 1 }
sealed abstract class B extends A
class C extends B //only usage of A and B

If you move def a = 1 to B it should be deemed as binary compatible.

kailuowang avatar Aug 03 '18 10:08 kailuowang

Thanks!

adriaanm avatar Aug 03 '18 10:08 adriaanm

Another piece of the "Scala working mode" epic.

https://github.com/lightbend/migration-manager/issues/34.

dwijnand avatar Aug 03 '18 10:08 dwijnand