Bug 69776 - [1.5] VerifyError: Incompatible object argument for function call
Summary: [1.5] VerifyError: Incompatible object argument for function call
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-09 21:33 EDT by Igor Fedorenko CLA
Modified: 2005-01-11 11:02 EST (History)
0 users

See Also:


Attachments
T.class (984 bytes, application/octet-stream)
2004-07-10 09:58 EDT, Igor Fedorenko CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Fedorenko CLA 2004-07-09 21:33:55 EDT
Cheetah from cvs as of few minutes ago. Sun JDK 1.5.0 beta3 b57. Running the
code below results in 

java.lang.VerifyError: (class: test/cheetah/T, method: main signature:
([Ljava/lang/String;)V) Incompatible object argument for function call
Exception in thread "main"

============================================
package test.cheetah;
import java.util.HashMap;
import java.util.Map;
public class T {
    private static final Map<String, Class> classes = 
        new HashMap<String, Class>();
    public static void main(String[] args) throws Exception {
        final Class<? extends Object> clazz = (Class<? extends Object>) 
                classes.get("test");
        Object o = clazz.newInstance();
    }
}
============================================
Comment 1 Igor Fedorenko CLA 2004-07-10 09:58:38 EDT
Created attachment 13126 [details]
T.class
Comment 2 Philipe Mulet CLA 2004-07-11 07:14:57 EDT
Igor - given the amount of bugs in this area you find, would you consider 
writing a test suite for generics ? 
Comment 3 Philipe Mulet CLA 2004-07-11 08:42:55 EDT
Due to recent evolution in generic cast support which requires all generic 
expression container to perform suitable #computeConversion call (to address 
bug 69542). We are finding the missing places (which did not require this in 
the past).

Added regression test: GenericTypeTest#test241-242.