Bug 69776

Summary: [1.5] VerifyError: Incompatible object argument for function call
Product: [Eclipse Project] JDT Reporter: Igor Fedorenko <igor>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
T.class none

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.