Bug 82859 - [1.5] void.class is incompatible with Void.TYPE
Summary: [1.5] void.class is incompatible with Void.TYPE
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-14 13:04 EST by Olivier Thomann CLA
Modified: 2005-02-16 12:15 EST (History)
0 users

See Also:


Attachments
Apply on HEAD (1.38 KB, patch)
2005-01-14 13:06 EST, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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