Bug 85125 - When bracket is placed after MethodDeclarator, build fails.
Summary: When bracket is placed after MethodDeclarator, build fails.
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-14 02:48 EST by Eiji Morito CLA
Modified: 2005-02-16 12:08 EST (History)
0 users

See Also:


Attachments
Possible patch (1.89 KB, patch)
2005-02-14 09:54 EST, Philipe Mulet CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eiji Morito CLA 2005-02-14 02:48:30 EST
On the following method declaration, "Type mismatch" error is reported on build.

public String getTexts(int i) [] {
	String[] texts = new String[1];
	return texts; 
}
Comment 1 Philipe Mulet CLA 2005-02-14 07:47:55 EST
Parser incorrectly produces:

public int[] getTexts(int i) {
  String[] texts = new String[1];
  return texts;
}
Comment 2 Philipe Mulet CLA 2005-02-14 09:54:22 EST
Created attachment 17912 [details]
Possible patch 

Removed base type support. Normally the type reference is already present.
Comment 3 Olivier Thomann CLA 2005-02-14 12:25:36 EST
Fixed and released in HEAD.
Regression tests added in DocumentParserElementTest.test001 and ArrayTest.test007
Comment 4 Frederic Fusier CLA 2005-02-16 12:08:25 EST
Verified with 3.1 M5 candidate (I20040215-2300)