Bug 74244 - [1.5] boolean.class == Boolean.TYPE should be true
Summary: [1.5] boolean.class == Boolean.TYPE should be true
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-19 19:34 EDT by Olivier Thomann CLA
Modified: 2004-09-24 06:13 EDT (History)
0 users

See Also:


Attachments
Apply on HEAD on the class ClassLiteralAccess (2.25 KB, patch)
2004-09-19 20:17 EDT, 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 2004-09-19 19:34:59 EDT
Using latest, the following code returns:

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

The test case is:
public class X {
	public static void main(String argv[]) {
		System.out.println(boolean.class == Boolean.TYPE);
	}
}

The result should be: true.
Comment 1 Olivier Thomann CLA 2004-09-19 20:17:31 EDT
Created attachment 14630 [details]
Apply on HEAD on the class ClassLiteralAccess

Pössible patch.
Comment 2 Philipe Mulet CLA 2004-09-20 05:50:26 EDT
Went along the same line, added Scope.boxing/unboxing primitives.
Fixed in latest, added regression test: GenericTypeTest#test299
Comment 3 Frederic Fusier CLA 2004-09-24 06:13:42 EDT
Verified for 3.1 M2 with build I200409231635.