Summary: | "Incompatible argument to function" at vararg function | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Ulrik Restorp <ulrik.restorp> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P3 | CC: | martinae | ||||
Version: | 3.1 | ||||||
Target Milestone: | 3.1 M5 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Ulrik Restorp
2005-01-24 10:02:47 EST
Reproduced. I will investigate. We don't wrap the array of byte into an array of Object. public static void main(String[] args); 0 new X [2] 3 dup 4 invokespecial X.<init>()V [16] 7 iconst_5 8 newarray byte [8] 10 invokespecial X.test([Ljava/lang/Object;)V [20] 13 return iconst5 and newarray byte should be replace with something like: iconst_1 anewarray java/lang/Object dup iconst_0 iconst_5 newarray byte aastore Created attachment 17392 [details]
Apply on HEAD
The bug was coming from the fact that we didn't check the compatibility of the last argument in case it was an array. We simply check the dimensions. Philippe, could you please review the patch? Thanks. Looks good to me Fixed and released in HEAD. Regression test added in VarargsTest.test023. *** Bug 83183 has been marked as a duplicate of this bug. *** Verified in I20050215-2300 |