Bug 185298 - Wrong syntax error recovery
Summary: Wrong syntax error recovery
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 192683 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-05-03 04:31 EDT by David Audel CLA
Modified: 2023-12-18 06:32 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2007-05-03 04:31:14 EDT
build I20070502-0010

public class X  {
  #
  void foo(){
    {
      new X1(){};
    }
    X2 o = new X2() {};
  }
}

The error diagnosis is:
Syntax error on token "}", delete this token
Syntax error on token "Invalid Character", delete this token
Syntax error, insert ";" to complete LocalVariableDeclarationStatement
Syntax error, insert "}" to complete ClassBody

But the only valid error message is:
Syntax error on token "Invalid Character", delete this token
Comment 1 David Audel CLA 2007-05-21 09:59:49 EDT
bug 188096 could be a duplicate of this bug.
Comment 2 David Audel CLA 2007-05-22 10:53:35 EDT
bug 188096 is not a duplicate of this bug.
Comment 3 David Audel CLA 2007-06-14 11:35:06 EDT
*** Bug 192683 has been marked as a duplicate of this bug. ***
Comment 4 David Audel CLA 2007-06-14 11:38:34 EDT
From bug Bug 192683: The bug have another symptom in code assist

public class X  {
  void foo(){
    {
      new X1(){};
    }
    X2 o = new X2() {};
  }
  Run| // do code assist at |
}

In this case code assist should propose Runnable.
Comment 5 Dani Megert CLA 2007-06-15 02:35:18 EDT
Jéreome,

as this breaks code assist and also makes problem reporting going wild, this looks like a good 3.3.1 candidate.
Comment 6 Jerome Lanneluc CLA 2007-06-15 06:32:56 EDT
Dani, we talked about that with David and Philippe. It appears that this code is very sensitive. If we fix this problem, we might introduce other problems without even noticing. 

Also this is not a regression in 3.3 (it didn't work in 3.2). So we should target a fix for 3.4 only.
Comment 7 Jerome Lanneluc CLA 2008-05-07 07:33:20 EDT
Deferring post 3.4
Comment 8 Eclipse Genie CLA 2020-01-05 17:38:43 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 9 Eclipse Genie CLA 2021-12-27 11:08:53 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 10 Eclipse Genie CLA 2023-12-18 06:32:33 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.