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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (+2 lines)
Lines 1019-1024 Link Here
1019
	int IllegalQualifiedEnumConstantLabel = FieldRelated + 755;
1019
	int IllegalQualifiedEnumConstantLabel = FieldRelated + 755;
1020
	/** @since 3.1 */
1020
	/** @since 3.1 */
1021
	int CannotExtendEnum = TypeRelated + 756;
1021
	int CannotExtendEnum = TypeRelated + 756;
1022
	/** @since 3.1 */
1023
	int ExplicitConstructorCallCannotBeUsedInEnum = MethodRelated + 757;
1022
1024
1023
	/**
1025
	/**
1024
	 * Var args
1026
	 * Var args
(-)compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java (+4 lines)
Lines 264-269 Link Here
264
				return;
264
				return;
265
			}
265
			}
266
266
267
			if (!isImplicitSuper() && receiverType.erasure().id == T_JavaLangEnum) {
268
				scope.problemReporter().explicitConstructorCallCannotBeUsedInEnum(this);
269
				return;
270
			}
267
			// qualification should be from the type of the enclosingType
271
			// qualification should be from the type of the enclosingType
268
			if (qualification != null) {
272
			if (qualification != null) {
269
				if (accessMode != Super) {
273
				if (accessMode != Super) {
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (+8 lines)
Lines 1083-1088 Link Here
1083
		reference.sourceStart,
1083
		reference.sourceStart,
1084
		reference.sourceEnd);
1084
		reference.sourceEnd);
1085
}
1085
}
1086
public void explicitConstructorCallCannotBeUsedInEnum(ExplicitConstructorCall constructorCall) {
1087
	this.handle(
1088
		IProblem.ExplicitConstructorCallCannotBeUsedInEnum,
1089
		NoArgument,
1090
		NoArgument,
1091
		constructorCall.sourceStart,
1092
		constructorCall.sourceEnd);
1093
}
1086
public void expressionShouldBeAVariable(Expression expression) {
1094
public void expressionShouldBeAVariable(Expression expression) {
1087
	this.handle(
1095
	this.handle(
1088
		IProblem.ExpressionShouldBeAVariable,
1096
		IProblem.ExpressionShouldBeAVariable,
(-)compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties (+1 lines)
Lines 494-499 Link Here
494
754 = The enum {1} already defines the method {0}({2}) implicitly
494
754 = The enum {1} already defines the method {0}({2}) implicitly
495
755 = Cannot qualify the name of the enum constant {0} in a case label
495
755 = Cannot qualify the name of the enum constant {0} in a case label
496
756 = The type {1} may not subclass {0} explicitly
496
756 = The type {1} may not subclass {0} explicitly
497
757 = Explicit constructor call is not allowed in an enum constructor
497
498
498
499
499
### VARARGS
500
### VARARGS

Return to bug 78914