View | Details | Raw Unified | Return to bug 173992
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (+10 lines)
Lines 3292-3297 Link Here
3292
		reference.sourceEnd);
3292
		reference.sourceEnd);
3293
}
3293
}
3294
public void invalidType(ASTNode location, TypeBinding type) {
3294
public void invalidType(ASTNode location, TypeBinding type) {
3295
	if (type instanceof ReferenceBinding) {
3296
		if (isRecoveredName(((ReferenceBinding)type).compoundName)) return;
3297
	}
3298
	else if (type instanceof ArrayBinding) {
3299
		TypeBinding leafType = ((ArrayBinding)type).leafComponentType;
3300
		if (leafType instanceof ReferenceBinding) {
3301
			if (isRecoveredName(((ReferenceBinding)leafType).compoundName)) return;
3302
		}
3303
	}
3304
	
3295
	int id = IProblem.UndefinedType; // default
3305
	int id = IProblem.UndefinedType; // default
3296
	switch (type.problemId()) {
3306
	switch (type.problemId()) {
3297
		case ProblemReasons.NotFound :
3307
		case ProblemReasons.NotFound :
(-)grammar/java.g (+1 lines)
Lines 654-659 Link Here
654
/.$putCase consumeFormalParameter(true); $break ./
654
/.$putCase consumeFormalParameter(true); $break ./
655
/:$readableName FormalParameter:/
655
/:$readableName FormalParameter:/
656
/:$compliance 1.5:/
656
/:$compliance 1.5:/
657
/:$recovery_template Identifier Identifier:/
657
658
658
ClassTypeList -> ClassTypeElt
659
ClassTypeList -> ClassTypeElt
659
ClassTypeList ::= ClassTypeList ',' ClassTypeElt
660
ClassTypeList ::= ClassTypeList ',' ClassTypeElt
(-)src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java (+42 lines)
Lines 707-710 Link Here
707
		options // custom options
707
		options // custom options
708
	);
708
	);
709
}
709
}
710
711
/*
712
 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=173992
713
 */
714
public void test027() {
715
	this.runNegativeTest(
716
		new String[] {
717
			"X.java",
718
			"import java.io.EOFException;\n" +
719
			"import java.io.FileNotFoundException;\n" +
720
			"import java.io.IOException;\n" +
721
			"import org.xml.sax.SAXException;\n" +
722
			"public class X {\n" +
723
        		"public void doSomething() throws FileNotFoundException, EOFException, SAXException{\n" +
724
        		"\n" +
725
        		"}\n" +
726
			"public void doSomethingElse() {\n" +
727
        		"try {\n" +
728
                	"	doSomething();\n" +
729
        		"}\n" +
730
       			" catch ( SAXException exception) {\n" +
731
			"\n" +
732
      			"}  \n" +             
733
        		"catch ( FileNotFoundException exception ) {\n" +
734
			"\n" +
735
        		"}    \n" +           
736
       			"catch (\n" + 
737
                	"	// working before the slashes\n" +
738
        		") {\n" +
739
			"\n" +
740
        		"} \n" +              
741
        		"} \n" + 
742
        	"}\n"
743
        	},
744
		"----------\n" + 
745
		"1. ERROR in X.java (at line 19)\n" +
746
		"	catch (\n" +
747
		"	      ^\n" +
748
		"Syntax error on token \"(\", FormalParameter expected after this token\n" +
749
		"----------\n"
750
	);
751
}
710
}
752
}

Return to bug 173992