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

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java (+6 lines)
Lines 611-616 Link Here
611
		}
611
		}
612
	}
612
	}
613
613
614
	public int problemId() {
615
		if (this.type != null)
616
			return this.type.problemId();
617
		return super.problemId();
618
	}
619
	
614
	public boolean hasMemberTypes() {
620
	public boolean hasMemberTypes() {
615
	    return this.type.hasMemberTypes();
621
	    return this.type.hasMemberTypes();
616
	}
622
	}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java (+32 lines)
Lines 4117-4120 Link Here
4117
			"The import p.zork.Z is never used\n" + 
4117
			"The import p.zork.Z is never used\n" + 
4118
			"----------\n");
4118
			"----------\n");
4119
}
4119
}
4120
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=241399
4121
public void test089() {
4122
	if (this.complianceLevel <= ClassFileConstants.JDK1_4)
4123
		return;
4124
	this.runNegativeTest(
4125
			new String[] {
4126
					"Test.java", //-----------------------------------------------------------------------
4127
					"//package foo.bar;\n" +
4128
					"public class Test {\n" +
4129
					"    private static Map<String, String> var;\n" +
4130
					"    static {\n" +
4131
					"        var= new HashMap<String, String>();\n" +
4132
					"    }\n" +
4133
					"}\n",//-----------------------------------------------------------------------
4134
			},
4135
			"----------\n" +
4136
			"1. ERROR in Test.java (at line 3)\n" +
4137
			"	private static Map<String, String> var;\n" +
4138
			"	               ^^^\n" +
4139
			"Map cannot be resolved to a type\n" +
4140
			"----------\n" +
4141
			"2. ERROR in Test.java (at line 5)\n" +
4142
			"	var= new HashMap<String, String>();\n" +
4143
			"	^^^\n" +
4144
			"Map<String,String> cannot be resolved to a type\n" +
4145
			"----------\n" +
4146
			"3. ERROR in Test.java (at line 5)\n" +
4147
			"	var= new HashMap<String, String>();\n" +
4148
			"	         ^^^^^^^\n" +
4149
			"HashMap cannot be resolved to a type\n" +
4150
			"----------\n");
4151
}
4120
}
4152
}

Return to bug 241399