View | Details | Raw Unified | Return to bug 138897 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (-2 / +12 lines)
Lines 6086-6097 Link Here
6086
		location.sourceEnd);
6086
		location.sourceEnd);
6087
}
6087
}
6088
public void unreachableCode(Statement statement) {
6088
public void unreachableCode(Statement statement) {
6089
	int sourceStart = statement.sourceStart;
6090
	int sourceEnd = statement.sourceEnd;
6091
	if (statement instanceof LocalDeclaration) {
6092
		LocalDeclaration declaration = (LocalDeclaration) statement;
6093
		sourceStart = declaration.declarationSourceStart;
6094
		sourceEnd = declaration.declarationSourceEnd;
6095
	} else if (statement instanceof Expression) {
6096
		int statemendEnd = ((Expression) statement).statementEnd;
6097
		if (statemendEnd != -1) sourceEnd = statemendEnd;
6098
	}
6089
	this.handle(
6099
	this.handle(
6090
		IProblem.CodeCannotBeReached,
6100
		IProblem.CodeCannotBeReached,
6091
		NoArgument,
6101
		NoArgument,
6092
		NoArgument,
6102
		NoArgument,
6093
		statement.sourceStart,
6103
		sourceStart,
6094
		statement.sourceEnd);
6104
		sourceEnd);
6095
}
6105
}
6096
public void unresolvableReference(NameReference nameRef, Binding binding) {
6106
public void unresolvableReference(NameReference nameRef, Binding binding) {
6097
/* also need to check that the searchedType is the receiver type
6107
/* also need to check that the searchedType is the receiver type

Return to bug 138897