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

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java (-13 / +13 lines)
Lines 8113-8119 Link Here
8113
				false);
8113
				false);
8114
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
8114
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
8115
		CompilationUnit unit = (CompilationUnit) node;
8115
		CompilationUnit unit = (CompilationUnit) node;
8116
		String expectedError = "x cannot be resolved";
8116
		String expectedError = "x cannot be resolved to a variable";
8117
		assertProblemsSize(unit, 1, expectedError);
8117
		assertProblemsSize(unit, 1, expectedError);
8118
		node = getASTNode(unit, 0, 1, 0);
8118
		node = getASTNode(unit, 0, 1, 0);
8119
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
8119
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
Lines 8851-8857 Link Here
8851
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
8851
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
8852
		CompilationUnit unit = (CompilationUnit) node;
8852
		CompilationUnit unit = (CompilationUnit) node;
8853
		String expectedErrors = "Constructor call must be the first statement in a constructor\n" +
8853
		String expectedErrors = "Constructor call must be the first statement in a constructor\n" +
8854
		"zork cannot be resolved\n" +
8854
		"zork cannot be resolved to a variable\n" +
8855
		"Constructor call must be the first statement in a constructor\n" +
8855
		"Constructor call must be the first statement in a constructor\n" +
8856
		"Zork cannot be resolved to a type\n" +
8856
		"Zork cannot be resolved to a type\n" +
8857
		"Zork cannot be resolved to a type\n" +
8857
		"Zork cannot be resolved to a type\n" +
Lines 8926-8933 Link Here
8926
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
8926
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
8927
		CompilationUnit unit = (CompilationUnit) node;
8927
		CompilationUnit unit = (CompilationUnit) node;
8928
		String expectedErrors =
8928
		String expectedErrors =
8929
			"x cannot be resolved\n" +
8929
			"x cannot be resolved to a variable\n" +
8930
			"x cannot be resolved";
8930
			"x cannot be resolved to a variable";
8931
		assertProblemsSize(unit, 2, expectedErrors);
8931
		assertProblemsSize(unit, 2, expectedErrors);
8932
		node = getASTNode(unit, 0, 1, 0);
8932
		node = getASTNode(unit, 0, 1, 0);
8933
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
8933
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
Lines 8973-8980 Link Here
8973
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
8973
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
8974
		CompilationUnit unit = (CompilationUnit) node;
8974
		CompilationUnit unit = (CompilationUnit) node;
8975
		String expectedErrors =
8975
		String expectedErrors =
8976
			"x cannot be resolved\n" +
8976
			"x cannot be resolved to a variable\n" +
8977
			"x cannot be resolved";
8977
			"x cannot be resolved to a variable";
8978
		assertProblemsSize(unit, 2, expectedErrors);
8978
		assertProblemsSize(unit, 2, expectedErrors);
8979
		node = getASTNode(unit, 0, 1, 0);
8979
		node = getASTNode(unit, 0, 1, 0);
8980
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
8980
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
Lines 9021-9028 Link Here
9021
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
9021
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
9022
		CompilationUnit unit = (CompilationUnit) node;
9022
		CompilationUnit unit = (CompilationUnit) node;
9023
		String expectedErrors =
9023
		String expectedErrors =
9024
			"x cannot be resolved\n" +
9024
			"x cannot be resolved to a variable\n" +
9025
			"x cannot be resolved";
9025
			"x cannot be resolved to a variable";
9026
		assertProblemsSize(unit, 2, expectedErrors);
9026
		assertProblemsSize(unit, 2, expectedErrors);
9027
		node = getASTNode(unit, 0, 1, 0);
9027
		node = getASTNode(unit, 0, 1, 0);
9028
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
9028
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
Lines 9070-9077 Link Here
9070
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
9070
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
9071
		CompilationUnit unit = (CompilationUnit) node;
9071
		CompilationUnit unit = (CompilationUnit) node;
9072
		String expectedErrors =
9072
		String expectedErrors =
9073
			"x cannot be resolved\n" +
9073
			"x cannot be resolved to a variable\n" +
9074
			"x cannot be resolved";
9074
			"x cannot be resolved to a variable";
9075
		assertProblemsSize(unit, 2, expectedErrors);
9075
		assertProblemsSize(unit, 2, expectedErrors);
9076
		node = getASTNode(unit, 0, 1, 0);
9076
		node = getASTNode(unit, 0, 1, 0);
9077
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
9077
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
Lines 9121-9128 Link Here
9121
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
9121
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
9122
		CompilationUnit unit = (CompilationUnit) node;
9122
		CompilationUnit unit = (CompilationUnit) node;
9123
		String expectedErrors =
9123
		String expectedErrors =
9124
			"x cannot be resolved\n" +
9124
			"x cannot be resolved to a variable\n" +
9125
			"x cannot be resolved";
9125
			"x cannot be resolved to a variable";
9126
		assertProblemsSize(unit, 2, expectedErrors);
9126
		assertProblemsSize(unit, 2, expectedErrors);
9127
		node = getASTNode(unit, 1, 0, 0);
9127
		node = getASTNode(unit, 1, 0, 0);
9128
		assertEquals("Not a super constructor invocation", ASTNode.SUPER_CONSTRUCTOR_INVOCATION, node.getNodeType());
9128
		assertEquals("Not a super constructor invocation", ASTNode.SUPER_CONSTRUCTOR_INVOCATION, node.getNodeType());
Lines 9158-9164 Link Here
9158
				false);
9158
				false);
9159
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
9159
		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
9160
		CompilationUnit unit = (CompilationUnit) node;
9160
		CompilationUnit unit = (CompilationUnit) node;
9161
		String expectedError = "x cannot be resolved";
9161
		String expectedError = "x cannot be resolved to a variable";
9162
		assertProblemsSize(unit, 1, expectedError);
9162
		assertProblemsSize(unit, 1, expectedError);
9163
		node = getASTNode(unit, 0, 1, 0);
9163
		node = getASTNode(unit, 0, 1, 0);
9164
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
9164
		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
(-)src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java (-7 / +7 lines)
Lines 7013-7024 Link Here
7013
			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
7013
			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
7014
			CompilationUnit unit = (CompilationUnit) node;
7014
			CompilationUnit unit = (CompilationUnit) node;
7015
			String expectedOutput =
7015
			String expectedOutput =
7016
				"first cannot be resolved\n" +
7016
				"first cannot be resolved to a variable\n" +
7017
				"second cannot be resolved\n" +
7017
				"second cannot be resolved to a variable\n" +
7018
				"first cannot be resolved\n" +
7018
				"first cannot be resolved to a variable\n" +
7019
				"second cannot be resolved\n" +
7019
				"second cannot be resolved to a variable\n" +
7020
				"first cannot be resolved\n" +
7020
				"first cannot be resolved to a variable\n" +
7021
				"second cannot be resolved";
7021
				"second cannot be resolved to a variable";
7022
			assertProblemsSize(unit, 6, expectedOutput);
7022
			assertProblemsSize(unit, 6, expectedOutput);
7023
			unit.accept(new ASTVisitor() {
7023
			unit.accept(new ASTVisitor() {
7024
				public boolean visit(ConstructorInvocation constructorInvocation) {
7024
				public boolean visit(ConstructorInvocation constructorInvocation) {
Lines 7732-7738 Link Here
7732
			assertProblemsSize(
7732
			assertProblemsSize(
7733
					unit,
7733
					unit,
7734
					2,
7734
					2,
7735
					"Object.equ cannot be resolved\n" +
7735
					"Object.equ cannot be resolved to a variable\n" +
7736
					"Syntax error, insert \"AssignmentOperator Expression\" to complete Expression");
7736
					"Syntax error, insert \"AssignmentOperator Expression\" to complete Expression");
7737
			node = getASTNode(unit, 0, 0);
7737
			node = getASTNode(unit, 0, 0);
7738
			assertEquals("Not a field declaration statement", ASTNode.INITIALIZER, node.getNodeType());
7738
			assertEquals("Not a field declaration statement", ASTNode.INITIALIZER, node.getNodeType());
(-)src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java (-1 / +1 lines)
Lines 308-314 Link Here
308
		// evaluate same code snippet
308
		// evaluate same code snippet
309
		evaluateWithExpectedProblem(
309
		evaluateWithExpectedProblem(
310
			codeSnippet,
310
			codeSnippet,
311
			newProblem(IProblem.UndefinedName, Error, 0, 0, 1)); // i cannot be resolved
311
			newProblem(IProblem.UnresolvedVariable, Error, 0, 0, 1)); // i cannot be resolved to a variable
312
	} finally {
312
	} finally {
313
		// Clean up
313
		// Clean up
314
		if (var != null) {
314
		if (var != null) {
(-)src/org/eclipse/jdt/core/tests/eval/NegativeVariableTest.java (-1 / +1 lines)
Lines 45-51 Link Here
45
			"(j + 2)"}));
45
			"(j + 2)"}));
46
		evaluateWithExpectedProblem(
46
		evaluateWithExpectedProblem(
47
			var,
47
			var,
48
			newProblem(IProblem.UndefinedName, Error, 11, 11, 2)); // j cannot be resolved
48
			newProblem(IProblem.UnresolvedVariable, Error, 11, 11, 2)); // j cannot be resolved to a variable
49
	} finally {
49
	} finally {
50
		if (var != null) {
50
		if (var != null) {
51
			this.context.deleteVariable(var);
51
			this.context.deleteVariable(var);
(-)src/org/eclipse/jdt/core/tests/eval/DebugEvaluationTest.java (-1 / +1 lines)
Lines 2695-2701 Link Here
2695
			}
2695
			}
2696
		}
2696
		}
2697
		assertEquals("Unexpected errors",
2697
		assertEquals("Unexpected errors",
2698
			"zork cannot be resolved|",
2698
			"zork cannot be resolved to a variable|",
2699
			buffer == null ? "none" : buffer.toString());
2699
			buffer == null ? "none" : buffer.toString());
2700
	} finally {
2700
	} finally {
2701
		removeTempClass("ANegative003");
2701
		removeTempClass("ANegative003");
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java (-1 / +1 lines)
Lines 2772-2778 Link Here
2772
			"3. ERROR in X.java (at line 8)\n" +
2772
			"3. ERROR in X.java (at line 8)\n" +
2773
			"	System.out.println(zork);\n" +
2773
			"	System.out.println(zork);\n" +
2774
			"	                   ^^^^\n" +
2774
			"	                   ^^^^\n" +
2775
			"zork cannot be resolved\n" +
2775
			"zork cannot be resolved to a variable\n" +
2776
			"----------\n"
2776
			"----------\n"
2777
        );
2777
        );
2778
    }
2778
    }
(-)src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java (+2 lines)
Lines 370-375 Link Here
370
		expectedProblemAttributes.put("FinalFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
370
		expectedProblemAttributes.put("FinalFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
371
		expectedProblemAttributes.put("UninitializedBlankFinalField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
371
		expectedProblemAttributes.put("UninitializedBlankFinalField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
372
		expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
372
		expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
373
		expectedProblemAttributes.put("UnresolvedVariable", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
373
		expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
374
		expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
374
		expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
375
		expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
375
		expectedProblemAttributes.put("FieldHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
376
		expectedProblemAttributes.put("FieldHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
Lines 998-1003 Link Here
998
		expectedProblemAttributes.put("FinalFieldAssignment", SKIP);
999
		expectedProblemAttributes.put("FinalFieldAssignment", SKIP);
999
		expectedProblemAttributes.put("UninitializedBlankFinalField", SKIP);
1000
		expectedProblemAttributes.put("UninitializedBlankFinalField", SKIP);
1000
		expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", SKIP);
1001
		expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", SKIP);
1002
		expectedProblemAttributes.put("UnresolvedVariable", SKIP);
1001
		expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
1003
		expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
1002
		expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
1004
		expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
1003
		expectedProblemAttributes.put("FieldHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_FIELD_HIDING));
1005
		expectedProblemAttributes.put("FieldHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_FIELD_HIDING));
(-)src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_4.java (-2 / +2 lines)
Lines 2790-2796 Link Here
2790
			"2. ERROR in X.java (at line 5)\n" +
2790
			"2. ERROR in X.java (at line 5)\n" +
2791
			"	System.out.print(full+\" \"+p.S.success);\n" +
2791
			"	System.out.print(full+\" \"+p.S.success);\n" +
2792
			"	                 ^^^^\n" +
2792
			"	                 ^^^^\n" +
2793
			"full cannot be resolved\n" +
2793
			"full cannot be resolved to a variable\n" +
2794
			"----------\n"
2794
			"----------\n"
2795
		);
2795
		);
2796
}
2796
}
Lines 2825-2831 Link Here
2825
			"3. ERROR in X.java (at line 5)\n" +
2825
			"3. ERROR in X.java (at line 5)\n" +
2826
			"	System.out.print(full+\" \"+S.success);\n" +
2826
			"	System.out.print(full+\" \"+S.success);\n" +
2827
			"	                 ^^^^\n" +
2827
			"	                 ^^^^\n" +
2828
			"full cannot be resolved\n" +
2828
			"full cannot be resolved to a variable\n" +
2829
			"----------\n"
2829
			"----------\n"
2830
		);
2830
		);
2831
}
2831
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java (-2 / +2 lines)
Lines 2894-2900 Link Here
2894
			"2. ERROR in X.java (at line 5)\n" +
2894
			"2. ERROR in X.java (at line 5)\n" +
2895
			"	System.out.print(full+\" \"+p.S.success);\n" +
2895
			"	System.out.print(full+\" \"+p.S.success);\n" +
2896
			"	                 ^^^^\n" +
2896
			"	                 ^^^^\n" +
2897
			"full cannot be resolved\n" +
2897
			"full cannot be resolved to a variable\n" +
2898
			"----------\n"
2898
			"----------\n"
2899
		);
2899
		);
2900
}
2900
}
Lines 2924-2930 Link Here
2924
			"2. ERROR in X.java (at line 5)\n" +
2924
			"2. ERROR in X.java (at line 5)\n" +
2925
			"	System.out.print(full+\" \"+S.success);\n" +
2925
			"	System.out.print(full+\" \"+S.success);\n" +
2926
			"	                 ^^^^\n" +
2926
			"	                 ^^^^\n" +
2927
			"full cannot be resolved\n" +
2927
			"full cannot be resolved to a variable\n" +
2928
			"----------\n"
2928
			"----------\n"
2929
		);
2929
		);
2930
}
2930
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java (-5 / +5 lines)
Lines 371-397 Link Here
371
		"1. ERROR in X.java (at line 3)\n" +
371
		"1. ERROR in X.java (at line 3)\n" +
372
		"	System.out.println(argument + argument);\n" +
372
		"	System.out.println(argument + argument);\n" +
373
		"	                   ^^^^^^^^\n" +
373
		"	                   ^^^^^^^^\n" +
374
		"argument cannot be resolved\n" +
374
		"argument cannot be resolved to a variable\n" +
375
		"----------\n" +
375
		"----------\n" +
376
		"2. ERROR in X.java (at line 3)\n" +
376
		"2. ERROR in X.java (at line 3)\n" +
377
		"	System.out.println(argument + argument);\n" +
377
		"	System.out.println(argument + argument);\n" +
378
		"	                              ^^^^^^^^\n" +
378
		"	                              ^^^^^^^^\n" +
379
		"argument cannot be resolved\n" +
379
		"argument cannot be resolved to a variable\n" +
380
		"----------\n" +
380
		"----------\n" +
381
		"3. ERROR in X.java (at line 4)\n" +
381
		"3. ERROR in X.java (at line 4)\n" +
382
		"	return new String[] { argument + argument, argument/*no problem*/ };\n" +
382
		"	return new String[] { argument + argument, argument/*no problem*/ };\n" +
383
		"	                      ^^^^^^^^\n" +
383
		"	                      ^^^^^^^^\n" +
384
		"argument cannot be resolved\n" +
384
		"argument cannot be resolved to a variable\n" +
385
		"----------\n" +
385
		"----------\n" +
386
		"4. ERROR in X.java (at line 4)\n" +
386
		"4. ERROR in X.java (at line 4)\n" +
387
		"	return new String[] { argument + argument, argument/*no problem*/ };\n" +
387
		"	return new String[] { argument + argument, argument/*no problem*/ };\n" +
388
		"	                                 ^^^^^^^^\n" +
388
		"	                                 ^^^^^^^^\n" +
389
		"argument cannot be resolved\n" +
389
		"argument cannot be resolved to a variable\n" +
390
		"----------\n" +
390
		"----------\n" +
391
		"5. ERROR in X.java (at line 4)\n" +
391
		"5. ERROR in X.java (at line 4)\n" +
392
		"	return new String[] { argument + argument, argument/*no problem*/ };\n" +
392
		"	return new String[] { argument + argument, argument/*no problem*/ };\n" +
393
		"	                                           ^^^^^^^^\n" +
393
		"	                                           ^^^^^^^^\n" +
394
		"argument cannot be resolved\n" +
394
		"argument cannot be resolved to a variable\n" +
395
		"----------\n");
395
		"----------\n");
396
}
396
}
397
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=247307
397
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=247307
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AssertionTest.java (-1 / +1 lines)
Lines 142-148 Link Here
142
		"1. ERROR in A4.java (at line 4)\n" +
142
		"1. ERROR in A4.java (at line 4)\n" +
143
		"	assert false : unbound;	\n" +
143
		"	assert false : unbound;	\n" +
144
		"	               ^^^^^^^\n" +
144
		"	               ^^^^^^^\n" +
145
		"unbound cannot be resolved\n" +
145
		"unbound cannot be resolved to a variable\n" +
146
		"----------\n");
146
		"----------\n");
147
	}
147
	}
148
	public void test007() {
148
	public void test007() {
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java (-3 / +3 lines)
Lines 98-114 Link Here
98
		"1. ERROR in X.java (at line 6)\n" +
98
		"1. ERROR in X.java (at line 6)\n" +
99
		"	zork = zork;	\n" +
99
		"	zork = zork;	\n" +
100
		"	^^^^\n" +
100
		"	^^^^\n" +
101
		"zork cannot be resolved\n" +
101
		"zork cannot be resolved to a variable\n" +
102
		"----------\n" +
102
		"----------\n" +
103
		"2. ERROR in X.java (at line 6)\n" +
103
		"2. ERROR in X.java (at line 6)\n" +
104
		"	zork = zork;	\n" +
104
		"	zork = zork;	\n" +
105
		"	       ^^^^\n" +
105
		"	       ^^^^\n" +
106
		"zork cannot be resolved\n" +
106
		"zork cannot be resolved to a variable\n" +
107
		"----------\n" +
107
		"----------\n" +
108
		"3. ERROR in X.java (at line 7)\n" +
108
		"3. ERROR in X.java (at line 7)\n" +
109
		"	arg = zork;	\n" +
109
		"	arg = zork;	\n" +
110
		"	      ^^^^\n" +
110
		"	      ^^^^\n" +
111
		"zork cannot be resolved\n" +
111
		"zork cannot be resolved to a variable\n" +
112
		"----------\n" +
112
		"----------\n" +
113
		"4. ERROR in X.java (at line 9)\n" +
113
		"4. ERROR in X.java (at line 9)\n" +
114
		"	arg = arg;  // noop	\n" +
114
		"	arg = arg;  // noop	\n" +
(-)src/org/eclipse/jdt/core/tests/compiler/regression/StaticImportTest.java (-6 / +6 lines)
Lines 193-204 Link Here
193
			"4. ERROR in p\\X.java (at line 7)\n" +
193
			"4. ERROR in p\\X.java (at line 7)\n" +
194
			"	int y = Yint;\n" +
194
			"	int y = Yint;\n" +
195
			"	        ^^^^\n" +
195
			"	        ^^^^\n" +
196
			"Yint cannot be resolved\n" +
196
			"Yint cannot be resolved to a variable\n" +
197
			"----------\n" +
197
			"----------\n" +
198
			"5. ERROR in p\\X.java (at line 8)\n" +
198
			"5. ERROR in p\\X.java (at line 8)\n" +
199
			"	int z = Zint;\n" +
199
			"	int z = Zint;\n" +
200
			"	        ^^^^\n" +
200
			"	        ^^^^\n" +
201
			"Zint cannot be resolved\n" +
201
			"Zint cannot be resolved to a variable\n" +
202
			"----------\n" +
202
			"----------\n" +
203
			"6. ERROR in p\\X.java (at line 9)\n" +
203
			"6. ERROR in p\\X.java (at line 9)\n" +
204
			"	void m1(YMember m) {}\n" +
204
			"	void m1(YMember m) {}\n" +
Lines 265-271 Link Here
265
		"5. ERROR in p\\X.java (at line 8)\n" +
265
		"5. ERROR in p\\X.java (at line 8)\n" +
266
		"	int z = Zint;\n" +
266
		"	int z = Zint;\n" +
267
		"	        ^^^^\n" +
267
		"	        ^^^^\n" +
268
		"Zint cannot be resolved\n" +
268
		"Zint cannot be resolved to a variable\n" +
269
		"----------\n" +
269
		"----------\n" +
270
		"6. ERROR in p\\X.java (at line 9)\n" +
270
		"6. ERROR in p\\X.java (at line 9)\n" +
271
		"	void m1(YMember m) {}\n" +
271
		"	void m1(YMember m) {}\n" +
Lines 1106-1112 Link Here
1106
			"1. ERROR in PointRadius.java (at line 7)\n" +
1106
			"1. ERROR in PointRadius.java (at line 7)\n" +
1107
			"	radius = sqrt(pondArea / Math.PI);\n" +
1107
			"	radius = sqrt(pondArea / Math.PI);\n" +
1108
			"	              ^^^^^^^^\n" +
1108
			"	              ^^^^^^^^\n" +
1109
			"pondArea cannot be resolved\n" +
1109
			"pondArea cannot be resolved to a variable\n" +
1110
			"----------\n");
1110
			"----------\n");
1111
	}
1111
	}
1112
1112
Lines 1369-1375 Link Here
1369
			"3. ERROR in X.java (at line 7)\n" +
1369
			"3. ERROR in X.java (at line 7)\n" +
1370
			"	static int n = CONSTANT_B;\n" +
1370
			"	static int n = CONSTANT_B;\n" +
1371
			"	               ^^^^^^^^^^\n" +
1371
			"	               ^^^^^^^^^^\n" +
1372
			"CONSTANT_B cannot be resolved\n" +
1372
			"CONSTANT_B cannot be resolved to a variable\n" +
1373
			"----------\n");
1373
			"----------\n");
1374
	}
1374
	}
1375
	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=126564 - variation
1375
	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=126564 - variation
Lines 2513-2519 Link Here
2513
			"2. ERROR in test\\Outer.java (at line 4)\n" + 
2513
			"2. ERROR in test\\Outer.java (at line 4)\n" + 
2514
			"	int i = VALUE;\n" + 
2514
			"	int i = VALUE;\n" + 
2515
			"	        ^^^^^\n" + 
2515
			"	        ^^^^^\n" + 
2516
			"VALUE cannot be resolved\n" + 
2516
			"VALUE cannot be resolved to a variable\n" + 
2517
			"----------\n");
2517
			"----------\n");
2518
	}		
2518
	}		
2519
	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=256375 - variation
2519
	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=256375 - variation
(-)src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java (-4 / +4 lines)
Lines 9185-9191 Link Here
9185
		"1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/Y.java (at line 3)\n" +
9185
		"1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/Y.java (at line 3)\n" +
9186
		"	System.out.println(X.CONST);\n" +
9186
		"	System.out.println(X.CONST);\n" +
9187
		"	                   ^^^^^^^\n" +
9187
		"	                   ^^^^^^^\n" +
9188
		"X.CONST cannot be resolved\n" +
9188
		"X.CONST cannot be resolved to a variable\n" +
9189
		"----------\n" +
9189
		"----------\n" +
9190
		"1 problem (1 error)",
9190
		"1 problem (1 error)",
9191
		false /* shouldFlushOutputDirectory */,
9191
		false /* shouldFlushOutputDirectory */,
Lines 9431-9437 Link Here
9431
		"1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/Y.java (at line 3)\n" +
9431
		"1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/Y.java (at line 3)\n" +
9432
		"	System.out.println(X.CONST);\n" +
9432
		"	System.out.println(X.CONST);\n" +
9433
		"	                   ^^^^^^^\n" +
9433
		"	                   ^^^^^^^\n" +
9434
		"X.CONST cannot be resolved\n" +
9434
		"X.CONST cannot be resolved to a variable\n" +
9435
		"----------\n" +
9435
		"----------\n" +
9436
		"1 problem (1 error)",
9436
		"1 problem (1 error)",
9437
		false /* shouldFlushOutputDirectory */,
9437
		false /* shouldFlushOutputDirectory */,
Lines 9730-9736 Link Here
9730
	  "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/src/p/X.java (at line 5)\n" +
9730
	  "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/src/p/X.java (at line 5)\n" +
9731
	  "	int j = R.R3;\n" +
9731
	  "	int j = R.R3;\n" +
9732
	  "	        ^^^^\n" +
9732
	  "	        ^^^^\n" +
9733
	  "R.R3 cannot be resolved\n" +
9733
	  "R.R3 cannot be resolved to a variable\n" +
9734
	  "----------\n" +
9734
	  "----------\n" +
9735
	  "1 problem (1 error)",
9735
	  "1 problem (1 error)",
9736
	  true);
9736
	  true);
Lines 9760-9766 Link Here
9760
	  "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/src/p/X.java (at line 5)\n" +
9760
	  "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/src/p/X.java (at line 5)\n" +
9761
	  "	int j = R.R3;\n" +
9761
	  "	int j = R.R3;\n" +
9762
	  "	        ^^^^\n" +
9762
	  "	        ^^^^\n" +
9763
	  "R.R3 cannot be resolved\n" +
9763
	  "R.R3 cannot be resolved to a variable\n" +
9764
	  "----------\n" +
9764
	  "----------\n" +
9765
	  "1 problem (1 error)",
9765
	  "1 problem (1 error)",
9766
	  true);
9766
	  true);
(-)src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java (-1 / +1 lines)
Lines 250-256 Link Here
250
	"3. ERROR in X.java (at line 11)\n" +
250
	"3. ERROR in X.java (at line 11)\n" +
251
	"	switch(x){\n" +
251
	"	switch(x){\n" +
252
	"	       ^\n" +
252
	"	       ^\n" +
253
	"x cannot be resolved\n" +
253
	"x cannot be resolved to a variable\n" +
254
	"----------\n" +
254
	"----------\n" +
255
	"4. ERROR in X.java (at line 13)\n" +
255
	"4. ERROR in X.java (at line 13)\n" +
256
	"	Zork z;\n" +
256
	"	Zork z;\n" +
(-)src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java (-4 / +4 lines)
Lines 7392-7398 Link Here
7392
					"1. ERROR in X.java (at line 6)\n" + 
7392
					"1. ERROR in X.java (at line 6)\n" + 
7393
					"	return zork;\n" + 
7393
					"	return zork;\n" + 
7394
					"	       ^^^^\n" + 
7394
					"	       ^^^^\n" + 
7395
					"zork cannot be resolved\n" + 
7395
					"zork cannot be resolved to a variable\n" + 
7396
					"----------\n" + 
7396
					"----------\n" + 
7397
					"2. WARNING in X.java (at line 10)\n" + 
7397
					"2. WARNING in X.java (at line 10)\n" + 
7398
					"	X rx = new X();\n" + 
7398
					"	X rx = new X();\n" + 
Lines 32863-32869 Link Here
32863
		"5. ERROR in X.java (at line 6)\n" + 
32863
		"5. ERROR in X.java (at line 6)\n" + 
32864
		"	return zork;\n" + 
32864
		"	return zork;\n" + 
32865
		"	       ^^^^\n" + 
32865
		"	       ^^^^\n" + 
32866
		"zork cannot be resolved\n" + 
32866
		"zork cannot be resolved to a variable\n" + 
32867
		"----------\n",
32867
		"----------\n",
32868
		JavacTestOptions.EclipseJustification.EclipseBug148061);
32868
		JavacTestOptions.EclipseJustification.EclipseBug148061);
32869
}
32869
}
Lines 33050-33056 Link Here
33050
		"11. ERROR in X.java (at line 14)\n" + 
33050
		"11. ERROR in X.java (at line 14)\n" + 
33051
		"	return zork;\n" + 
33051
		"	return zork;\n" + 
33052
		"	       ^^^^\n" + 
33052
		"	       ^^^^\n" + 
33053
		"zork cannot be resolved\n" + 
33053
		"zork cannot be resolved to a variable\n" + 
33054
		"----------\n",
33054
		"----------\n",
33055
		JavacTestOptions.EclipseJustification.EclipseBug148061);
33055
		JavacTestOptions.EclipseJustification.EclipseBug148061);
33056
}
33056
}
Lines 37856-37862 Link Here
37856
		"2. ERROR in X.java (at line 4)\n" +
37856
		"2. ERROR in X.java (at line 4)\n" +
37857
		"	this(zork);\n" +
37857
		"	this(zork);\n" +
37858
		"	     ^^^^\n" +
37858
		"	     ^^^^\n" +
37859
		"zork cannot be resolved\n" +
37859
		"zork cannot be resolved to a variable\n" +
37860
		"----------\n" +
37860
		"----------\n" +
37861
		"3. ERROR in X.java (at line 5)\n" +
37861
		"3. ERROR in X.java (at line 5)\n" +
37862
		"	Zork.this.this();\n" +
37862
		"	Zork.this.this();\n" +
(-)src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java (-5 / +5 lines)
Lines 822-838 Link Here
822
		"2. ERROR in X.java (at line 8)\n" +
822
		"2. ERROR in X.java (at line 8)\n" +
823
		"	case BLEU :\n" +
823
		"	case BLEU :\n" +
824
		"	     ^^^^\n" +
824
		"	     ^^^^\n" +
825
		"BLEU cannot be resolved\n" +
825
		"BLEU cannot be resolved to a variable\n" +
826
		"----------\n" +
826
		"----------\n" +
827
		"3. ERROR in X.java (at line 10)\n" +
827
		"3. ERROR in X.java (at line 10)\n" +
828
		"	case BLANC :\n" +
828
		"	case BLANC :\n" +
829
		"	     ^^^^^\n" +
829
		"	     ^^^^^\n" +
830
		"BLANC cannot be resolved\n" +
830
		"BLANC cannot be resolved to a variable\n" +
831
		"----------\n" +
831
		"----------\n" +
832
		"4. ERROR in X.java (at line 12)\n" +
832
		"4. ERROR in X.java (at line 12)\n" +
833
		"	case ROUGE :\n" +
833
		"	case ROUGE :\n" +
834
		"	     ^^^^^\n" +
834
		"	     ^^^^^\n" +
835
		"ROUGE cannot be resolved\n" +
835
		"ROUGE cannot be resolved to a variable\n" +
836
		"----------\n");
836
		"----------\n");
837
}
837
}
838
// check enum name visibility
838
// check enum name visibility
Lines 894-900 Link Here
894
		"2. ERROR in X.java (at line 18)\n" +
894
		"2. ERROR in X.java (at line 18)\n" +
895
		"	C++;\n" +
895
		"	C++;\n" +
896
		"	^\n" +
896
		"	^\n" +
897
		"C cannot be resolved\n" +
897
		"C cannot be resolved to a variable\n" +
898
		"----------\n");
898
		"----------\n");
899
}
899
}
900
// check enum name visibility
900
// check enum name visibility
Lines 1692-1698 Link Here
1692
		"3. ERROR in X.java (at line 16)\n" +
1692
		"3. ERROR in X.java (at line 16)\n" +
1693
		"	System.out.println(a); // cannot find a\n" +
1693
		"	System.out.println(a); // cannot find a\n" +
1694
		"	                   ^\n" +
1694
		"	                   ^\n" +
1695
		"a cannot be resolved\n" +
1695
		"a cannot be resolved to a variable\n" +
1696
		"----------\n"
1696
		"----------\n"
1697
	);
1697
	);
1698
}
1698
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_3.java (-2 / +2 lines)
Lines 2771-2777 Link Here
2771
			"2. ERROR in X.java (at line 5)\n" +
2771
			"2. ERROR in X.java (at line 5)\n" +
2772
			"	System.out.print(full+\" \"+p.S.success);\n" +
2772
			"	System.out.print(full+\" \"+p.S.success);\n" +
2773
			"	                 ^^^^\n" +
2773
			"	                 ^^^^\n" +
2774
			"full cannot be resolved\n" +
2774
			"full cannot be resolved to a variable\n" +
2775
			"----------\n"
2775
			"----------\n"
2776
		);
2776
		);
2777
}
2777
}
Lines 2801-2807 Link Here
2801
			"2. ERROR in X.java (at line 5)\n" +
2801
			"2. ERROR in X.java (at line 5)\n" +
2802
			"	System.out.print(full+\" \"+S.success);\n" +
2802
			"	System.out.print(full+\" \"+S.success);\n" +
2803
			"	                 ^^^^\n" +
2803
			"	                 ^^^^\n" +
2804
			"full cannot be resolved\n" +
2804
			"full cannot be resolved to a variable\n" +
2805
			"----------\n"
2805
			"----------\n"
2806
		);
2806
		);
2807
}
2807
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java (-8 / +8 lines)
Lines 2961-2967 Link Here
2961
			"1. ERROR in X.java (at line 3)\r\n" +
2961
			"1. ERROR in X.java (at line 3)\r\n" +
2962
			"	@Target(Element)\r\n" +
2962
			"	@Target(Element)\r\n" +
2963
			"	        ^^^^^^^\n" +
2963
			"	        ^^^^^^^\n" +
2964
			"Element cannot be resolved\n" +
2964
			"Element cannot be resolved to a variable\n" +
2965
			"----------\n");
2965
			"----------\n");
2966
	}
2966
	}
2967
2967
Lines 3419-3425 Link Here
3419
			"1. ERROR in X.java (at line 4)\n" +
3419
			"1. ERROR in X.java (at line 4)\n" +
3420
			"	@Annot(foo1=zzz)\n" +
3420
			"	@Annot(foo1=zzz)\n" +
3421
			"	            ^^^\n" +
3421
			"	            ^^^\n" +
3422
			"zzz cannot be resolved\n" +
3422
			"zzz cannot be resolved to a variable\n" +
3423
			"----------\n");
3423
			"----------\n");
3424
    }
3424
    }
3425
    public void test113() {
3425
    public void test113() {
Lines 3508-3514 Link Here
3508
    		"4. ERROR in X.java (at line 5)\n" +
3508
    		"4. ERROR in X.java (at line 5)\n" +
3509
    		"	@Annot(foo = M.class, bar = baz()+s)\n" +
3509
    		"	@Annot(foo = M.class, bar = baz()+s)\n" +
3510
    		"	                                  ^\n" +
3510
    		"	                                  ^\n" +
3511
    		"s cannot be resolved\n" +
3511
    		"s cannot be resolved to a variable\n" +
3512
    		"----------\n" +
3512
    		"----------\n" +
3513
    		"5. ERROR in X.java (at line 11)\n" +
3513
    		"5. ERROR in X.java (at line 11)\n" +
3514
    		"	@Annot(foo = T.class, bar = s)\n" +
3514
    		"	@Annot(foo = T.class, bar = s)\n" +
Lines 6656-6662 Link Here
6656
		"1. ERROR in X.java (at line 2)\n" +
6656
		"1. ERROR in X.java (at line 2)\n" +
6657
		"	@Ann(m=Object)\n" +
6657
		"	@Ann(m=Object)\n" +
6658
		"	       ^^^^^^\n" +
6658
		"	       ^^^^^^\n" +
6659
		"Object cannot be resolved\n" +
6659
		"Object cannot be resolved to a variable\n" +
6660
		"----------\n" +
6660
		"----------\n" +
6661
		"2. ERROR in X.java (at line 4)\n" +
6661
		"2. ERROR in X.java (at line 4)\n" +
6662
		"	private NonExisting bar;\n" +
6662
		"	private NonExisting bar;\n" +
Lines 7501-7507 Link Here
7501
		"1. ERROR in X.java (at line 6)\n" +
7501
		"1. ERROR in X.java (at line 6)\n" +
7502
		"	@Annot(value={x}, classe={Zork.class,zork})\n" +
7502
		"	@Annot(value={x}, classe={Zork.class,zork})\n" +
7503
		"	              ^\n" +
7503
		"	              ^\n" +
7504
		"x cannot be resolved\n" +
7504
		"x cannot be resolved to a variable\n" +
7505
		"----------\n" +
7505
		"----------\n" +
7506
		"2. ERROR in X.java (at line 6)\n" +
7506
		"2. ERROR in X.java (at line 6)\n" +
7507
		"	@Annot(value={x}, classe={Zork.class,zork})\n" +
7507
		"	@Annot(value={x}, classe={Zork.class,zork})\n" +
Lines 7516-7522 Link Here
7516
		"4. ERROR in X.java (at line 6)\n" +
7516
		"4. ERROR in X.java (at line 6)\n" +
7517
		"	@Annot(value={x}, classe={Zork.class,zork})\n" +
7517
		"	@Annot(value={x}, classe={Zork.class,zork})\n" +
7518
		"	                                     ^^^^\n" +
7518
		"	                                     ^^^^\n" +
7519
		"zork cannot be resolved\n" +
7519
		"zork cannot be resolved to a variable\n" +
7520
		"----------\n" +
7520
		"----------\n" +
7521
		"5. ERROR in X.java (at line 6)\n" +
7521
		"5. ERROR in X.java (at line 6)\n" +
7522
		"	@Annot(value={x}, classe={Zork.class,zork})\n" +
7522
		"	@Annot(value={x}, classe={Zork.class,zork})\n" +
Lines 7714-7720 Link Here
7714
		"2. ERROR in X.java (at line 5)\n" +
7714
		"2. ERROR in X.java (at line 5)\n" +
7715
		"	return Zork;\n" +
7715
		"	return Zork;\n" +
7716
		"	       ^^^^\n" +
7716
		"	       ^^^^\n" +
7717
		"Zork cannot be resolved\n" +
7717
		"Zork cannot be resolved to a variable\n" +
7718
		"----------\n");
7718
		"----------\n");
7719
}
7719
}
7720
7720
Lines 7734-7740 Link Here
7734
		"1. ERROR in X.java (at line 4)\n" +
7734
		"1. ERROR in X.java (at line 4)\n" +
7735
		"	return Zork;\n" +
7735
		"	return Zork;\n" +
7736
		"	       ^^^^\n" +
7736
		"	       ^^^^\n" +
7737
		"Zork cannot be resolved\n" +
7737
		"Zork cannot be resolved to a variable\n" +
7738
		"----------\n");
7738
		"----------\n");
7739
}
7739
}
7740
7740
(-)src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java (-2 / +2 lines)
Lines 169-175 Link Here
169
		"2. ERROR in X.java (at line 3)\n" +
169
		"2. ERROR in X.java (at line 3)\n" +
170
		"	for(String o: c) {\n" +
170
		"	for(String o: c) {\n" +
171
		"	              ^\n" +
171
		"	              ^\n" +
172
		"c cannot be resolved\n" +
172
		"c cannot be resolved to a variable\n" +
173
		"----------\n";
173
		"----------\n";
174
	String expected14ProblemLog =
174
	String expected14ProblemLog =
175
		expected13ProblemLog;
175
		expected13ProblemLog;
Lines 179-185 Link Here
179
		"1. ERROR in X.java (at line 3)\n" +
179
		"1. ERROR in X.java (at line 3)\n" +
180
		"	for(String o: c) {\n" +
180
		"	for(String o: c) {\n" +
181
		"	              ^\n" +
181
		"	              ^\n" +
182
		"c cannot be resolved\n" +
182
		"c cannot be resolved to a variable\n" +
183
		"----------\n";
183
		"----------\n";
184
184
185
	runComplianceParserTest(
185
	runComplianceParserTest(
(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (+2 lines)
Lines 356-361 Link Here
356
	int FinalFieldAssignment = FieldRelated + 80;
356
	int FinalFieldAssignment = FieldRelated + 80;
357
	int UninitializedBlankFinalField = FieldRelated + 81;
357
	int UninitializedBlankFinalField = FieldRelated + 81;
358
	int DuplicateBlankFinalFieldInitialization = FieldRelated + 82;
358
	int DuplicateBlankFinalFieldInitialization = FieldRelated + 82;
359
	/** @since 3.6 */
360
	int UnresolvedVariable = FieldRelated + 83;
359
361
360
	// variable hiding
362
	// variable hiding
361
	/** @since 3.0 */
363
	/** @since 3.0 */
(-)compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties (+1 lines)
Lines 71-76 Link Here
71
80 = The final field {0}.{1} cannot be assigned
71
80 = The final field {0}.{1} cannot be assigned
72
81 = The blank final field {0} may not have been initialized
72
81 = The blank final field {0} may not have been initialized
73
82 = The final field {0} may already have been assigned
73
82 = The final field {0} may already have been assigned
74
83 = {0} cannot be resolved to a variable
74
75
75
90 = The local variable {0} is hiding another local variable defined in an enclosing type scope
76
90 = The local variable {0} is hiding another local variable defined in an enclosing type scope
76
91 = The local variable {0} is hiding a field from type {1}
77
91 = The local variable {0} is hiding a field from type {1}
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (-1 / +4 lines)
Lines 6811-6818 Link Here
6811
		SingleNameReference ref = (SingleNameReference) nameRef;
6811
		SingleNameReference ref = (SingleNameReference) nameRef;
6812
		if (isRecoveredName(ref.token)) return;
6812
		if (isRecoveredName(ref.token)) return;
6813
	}
6813
	}
6814
	int problemId = (nameRef.bits & Binding.VARIABLE) != 0 && (nameRef.bits & Binding.TYPE) == 0
6815
		? IProblem.UnresolvedVariable
6816
		: IProblem.UndefinedName;
6814
	this.handle(
6817
	this.handle(
6815
		IProblem.UndefinedName,
6818
		problemId,
6816
		arguments,
6819
		arguments,
6817
		arguments,
6820
		arguments,
6818
		nameRef.sourceStart,
6821
		nameRef.sourceStart,
(-)model/org/eclipse/jdt/core/CorrectionEngine.java (+1 lines)
Lines 219-224 Link Here
219
					argument = arguments[0];
219
					argument = arguments[0];
220
					break;
220
					break;
221
				case IProblem.UndefinedName :
221
				case IProblem.UndefinedName :
222
				case IProblem.UnresolvedVariable :
222
					this.filter = FIELD | LOCAL;
223
					this.filter = FIELD | LOCAL;
223
					argument = arguments[0];
224
					argument = arguments[0];
224
					break;
225
					break;
(-)src/org/eclipse/jdt/core/tests/builder/DependencyTests.java (-1 / +1 lines)
Lines 389-395 Link Here
389
389
390
		incrementalBuild(projectPath);
390
		incrementalBuild(projectPath);
391
		expectingOnlyProblemsFor(new IPath[] {cPath, xPath});
391
		expectingOnlyProblemsFor(new IPath[] {cPath, xPath});
392
		expectingSpecificProblemFor(cPath, new Problem("C", "i cannot be resolved", cPath, 50, 51, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
392
		expectingSpecificProblemFor(cPath, new Problem("C", "i cannot be resolved to a variable", cPath, 50, 51, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
393
		expectingSpecificProblemFor(xPath, new Problem("X", "c.i cannot be resolved or is not a field", xPath, 55, 58, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
393
		expectingSpecificProblemFor(xPath, new Problem("X", "c.i cannot be resolved or is not a field", xPath, 55, 58, CategorizedProblem.CAT_MEMBER, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
394
394
395
		env.addClass(root, "p1", "A", //$NON-NLS-1$ //$NON-NLS-2$
395
		env.addClass(root, "p1", "A", //$NON-NLS-1$ //$NON-NLS-2$

Return to bug 276294