You are not logged in

This one was rather tricky. The second method is actually the addAll method inherited from Collection. We adjust the "declaring class" to Set for improved bytecode binary compatibility, in the same way that javac does. However, we did this in a way that confused Kawa's overload resolution. The fix was to use two different Method objects for the two different purposes (overload resolution/type-checking vs code-generation).

When compiling the attached file, Kawa issues a warning saying there is more than one applicable method for set `addAll`. Here the relevant part of the file:

In my opinion, this is a bug since there is only one
definition for `addAll` in `java.util.Set`. The report warning shows twice the same signature, at least in its String form. Here the full compile log: