Bug 53831 - compiler problem with assert keyword
Summary: compiler problem with assert keyword
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.0 M8   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-04 21:53 EST by Jim des Rivieres CLA
Modified: 2004-03-22 12:24 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim des Rivieres CLA 2004-03-04 21:53:00 EST
Build 20040226

Here a baffling error:
   "Syntax error on token "assert", assert expected."

package org.eclipse.jdt.core.dom;
public class Main {
	public static void main(String[] args) {
		assert true; // syntax error
	}
}


I get this error when compiling in 1.4 mode with source=1.4, class 
files=1.4, "assert" as identifier=error.
Comment 1 Jim des Rivieres CLA 2004-03-05 11:00:02 EST
I was being fooled. The project with the code had non-default compiler setting 
and was still in 1.3 source more. I had only changed the global default 
setting. Never mind.