Bug 8531 - VerifyError in code containing assertions
Summary: VerifyError in code containing assertions
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-26 07:45 EST by Philipe Mulet CLA
Modified: 2002-02-11 04:52 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2002-01-26 07:45:52 EST
Build 20020124

The following 2 code sample will lead to verification error when run.


public class X {
  public static void main(String[] args){
    try {
      assert false : 0L; 
    } catch(AssertionError e){
    }
    try {
      assert false : new X();
    } catch(AssertionError e){
    }
  }
}
Comment 1 Philipe Mulet CLA 2002-01-26 07:48:05 EST
First issue is due to the fact the literal 0L constant value is incorrectly Int
(0) and not Long(0), this is fooling the choice of the proper assertion error 
constructor signature.

The second is due to the fact no signature is found for an object type when its 
type isn't exactly Object, String or null.

Both are now fixed