Bug 74244

Summary: [1.5] boolean.class == Boolean.TYPE should be true
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Apply on HEAD on the class ClassLiteralAccess none

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.