Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java,v --- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 28 Mar 2006 20:29:57 -0000 1.76 +++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 8 May 2006 16:06:42 -0000 @@ -342,6 +342,9 @@ // insert anonymous type in scope scope.addAnonymousType(this.anonymousType, (ReferenceBinding) receiverType); this.anonymousType.resolve(scope); + if (this.superTypeBinding.erasure().id == T_JavaLangEnum) { + scope.problemReporter().cannotExtendEnum(this.anonymousType.binding, this.type, this.superTypeBinding); + } if ((receiverType.tagBits & TagBits.HasDirectWildcard) != 0) { scope.problemReporter().superTypeCannotUseWildcard(anonymousType.binding, this.type, receiverType);