Bug 75986 - Problem in java code sintax parsing
Summary: Problem in java code sintax parsing
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-09 10:06 EDT by Stefano CLA
Modified: 2004-10-09 10:23 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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;
	}
}