Community
Participate
Working Groups
This program doesn't compile: public class MyClass { public static void main(String []argv) { new MyClass().printNames(new Object[]{"a","b","c"}); new MyClass().printNames("a","b","c"); } } public aspect A { private interface HasName {} declare parents: (MyClass) implements HasName; public void HasName.printNames(Object... names) { System.out.println(names[0]); } } which suggests the varargs marker isn't copied to the method placed in the affected type.
I'm just testing the fix for this now. As suspected the flag indicating varargs wasn't being copied around correctly - neither from MethodBindings to ResolvedMembers or persisted to disk when ResolvedMembers are (de)serialized. What slightly concerns me is that ACC_VARARGS is actually the same 'bit' as ACC_TRANSIENT. They are both 0x00000080 - I expect they are meant to be used under different circumstances and its possible we are abusing them ... The eclipse team seem to use a different 'bit' (0x8000) - we might need to do the same...
fix checked in. waiting on build.
fix available.