Bug 110906 - Varargs doesnt work for ITD'd methods
Summary: Varargs doesnt work for ITD'd methods
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.0 M4   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-28 03:15 EDT by Andrew Clement CLA
Modified: 2005-10-04 12:20 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2005-09-28 03:15:10 EDT
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.
Comment 1 Andrew Clement CLA 2005-10-04 08:54:04 EDT
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...
Comment 2 Andrew Clement CLA 2005-10-04 09:43:01 EDT
fix checked in. waiting on build.
Comment 3 Andrew Clement CLA 2005-10-04 12:20:52 EDT
fix available.