Bug 82859

Summary: [1.5] void.class is incompatible with Void.TYPE
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Apply on HEAD none

Description Olivier Thomann CLA 2005-01-14 13:04:15 EST
In 1.5 mode, this code doesn't compile. It does in 1.4 mode.

public class X {
	public static void main(String argv[]) {
		System.out.println(void.class == Void.TYPE);
	}
}

Expected answer is: true.
Comment 1 Olivier Thomann CLA 2005-01-14 13:05:44 EST
We report:

1. ERROR in c:\tests_sources\X.java
 (at line 3)
	System.out.println(void.class == Void.TYPE);
	                   ^^^^^^^^^^^^^^^^^^^^^^^
Incompatible operand types Class<void> and Class<Void>

In 1.4 we compile fine and it returns true.
Comment 2 Olivier Thomann CLA 2005-01-14 13:06:20 EST
Created attachment 17169 [details]
Apply on HEAD
Comment 3 Olivier Thomann CLA 2005-01-20 13:38:33 EST
Fixed and released in HEAD.
Regression test added in AutoBoxingTest.test082
Comment 4 David Audel CLA 2005-02-16 12:15:23 EST
Verified in I20050215-2300