Closed Sciss closed 5 years ago
That's a good one. At runtime, the signature of OptionPane doesn't actually change, only the encoded type parameters. Great catch!
Indeed, great catch!
The issue here is that MiMa currently only considers binary incompatibilities as defined in http://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html, i.e., MiMa only reports incompatibilities that can lead to a LinkageError. Clearly, the Java definition is not good enough in this case.
Also a type constructor parameter was added. I'm surprised this doesn't result in a warning, too.
The type constructor A
is erased to Any
, hence the signature of OptionPane
was not affected by the change. Implying that the evolution of OptionPane
is indeed binary compatible (you can read here for more details about this point).
I have a change from
to
This is not recognised as a binary incompatibility. Obviously code compiled against the first version will produce a
MatchError
when run against the second version, because the tuple extraction doesn't work any more.Also a type constructor parameter was added. I'm surprised this doesn't result in a warning, too.