Bug 173853 - [recovery] Recovery add an unnecessary default contructor
Summary: [recovery] Recovery add an unnecessary default contructor
Status: VERIFIED FIXED
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: 3.3 M6   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-12 07:20 EST by David Audel CLA
Modified: 2007-03-20 02:26 EDT (History)
0 users

See Also:


Attachments
Proposed fix (33.62 KB, patch)
2007-02-12 09:32 EST, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2007-02-12 07:20:43 EST
Two default constructors are added inside anonymous types when there is a syntax error.

eg.
public class X {
  void foo() {
    #
    new Object() {};
  }
}

The type binding of anonymous type has two default constructor.

This problem can be seen in a DOM AST.
Comment 1 David Audel CLA 2007-02-12 09:32:27 EST
Created attachment 58769 [details]
Proposed fix
Comment 2 David Audel CLA 2007-02-12 09:39:22 EST
Released for 3.3M6.

Test added
  ASTConverterTest2#test0607()

Tests updated
  CompletionParserTest
  CompletionParserTest2
  CompletionRecoveryTest
  DietRecoveryTest
  EnumCompletionParserTest
  EnumDietRecoveryTest
  InnerTypeCompletionTest
  LabelStatementCompletionTest
  NameReferenceCompletionTest
  ReferenceTypeCompletionTest
  SelectionTest
  StatementRecoveryTest
Comment 3 Maxime Daniel CLA 2007-03-20 02:26:31 EDT
Verified for 3.3 M6 using build I20070319-1335.