Bug 13059

Summary: incorrect (?) code compiles
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Adam Kiezun CLA 2002-04-09 06:59:17 EDT
class L{
	String g= "f" + + + System.currentTimeMillis();
};

this compiles
but this fails:
class L{
	String g= "f" + + + new Long(System.currentTimeMillis());
};
Comment 1 Philipe Mulet CLA 2002-04-09 10:42:19 EDT
Actually, the first is ugly but correct code. 

int i = + + + 10;  <==> int i = + (+ (+ 10));

Therefore the first statement in your testcase is actually ok, since the 
operand of the unary '+' operator must be numeric.