Bug 85125

Summary: When bracket is placed after MethodDeclarator, build fails.
Product: [Eclipse Project] JDT Reporter: Eiji Morito <eiji.morito>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Possible patch none

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)