Bug 75986

Summary: Problem in java code sintax parsing
Product: [Eclipse Project] JDT Reporter: Stefano <stefanocolla>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Stefano CLA 2004-10-09 10:06:38 EDT
If i write lines like these

        int a =0;
	int b = 0;
	int c=0;
	
	a=b=c;

in the task list appear

2	Syntax error on token ";", , expected

on the like "int c=0;"

In Eclipse 3.0 it's all Ok!
Comment 1 Frederic Fusier CLA 2004-10-09 10:23:36 EDT
Compilor error message is the same with 3.0 and 3.1 when you this lines directly
in a class declaration: this is an invalid syntax.
You should have at least put statemement a=b=c; into an initializer:
public class A {
	int a =0;
	int b = 0;
	int c=0;
	{ a=b=c; }
}
or in a method declaration:
public class A {
	int a =0;
	int b = 0;
	int c=0;
	void foo() {
		a=b=c;
	}
}