Buggy code:
} while ( ( currentType = currentType . enclosingType ( ) ) != null ) ; ParameterizedQualifiedTypeReference qRef = ( ( ParameterizedQualifiedTypeReference ) ( this . type ) ) ; for ( int i = ( qRef . typeArguments . length ) - 2 ; i >= 0 ; i -- ) { if ( ( qRef . typeArguments [ i ] ) != null ) { scope . problemReporter ( ) . illegalQualifiedParameterizedTypeAllocation ( this . type , receiverType ) ; break ; } } } } } } if ( receiverType == null ) { hasError = true ; } else if ( ( ( ( ReferenceBinding ) ( receiverType ) ) . isFinal ( ) ) && ( ( this . anonymousType ) != null ) ) { if ( ! ( receiverType . isEnum ( ) ) ) { scope . problemReporter ( ) . anonymousClassCannotExtendFinalClass ( type , receiverType ) ; } hasError = true ; } if ( ( this . typeArguments ) != null ) { int length = this . typeArguments . length ; this . genericTypeArguments = new TypeBinding [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { TypeBinding argType = this . typeArguments [ i ] . resolveType ( scope , true ) ; if ( argType == null ) return null ; this . genericTypeArguments [ i ] = argType ; } } TypeBinding [ ] argumentTypes = NoParameters ; if ( ( arguments ) != null ) { int length = arguments . length ; argumentTypes = new TypeBinding [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { Expression argument = this . arguments [ i ] ; if ( argument instanceof CastExpression ) { argument . bits |= IgnoreNeedForCastCheckMASK ; argsContainCast = true ; } if ( ( argumentTypes [ i ] = argument . resolveType ( scope ) ) == null ) { hasError = true ; } } } if ( hasError ) return this . resolvedType = receiverType ; if ( ( this . anonymousType ) == null ) { ReferenceBinding allocationType = ( ( ReferenceBinding ) ( receiverType ) ) ; if ( ! ( receiverType . canBeInstantiated ( ) ) ) { scope . problemReporter ( ) . cannotInstantiate ( type , receiverType ) ; return this . resolvedType = receiverType ; } if ( ( this . binding = scope . getConstructor ( allocationType , argumentTypes , this ) ) . isValidBinding ( ) ) { if ( isMethodUseDeprecated ( binding , scope ) ) { scope . problemReporter ( ) . deprecatedMethod ( this . binding , this ) ; } ASTNode . checkInvocationArguments ( scope , null , allocationType , binding , this . arguments , argumentTypes , argsContainCast , this ) ; } else { if ( ( this . binding . declaringClass ) == null ) { this . binding . declaringClass = allocationType ; } scope . problemReporter ( ) . invalidConstructor ( this , this . binding ) ; return this . resolvedType = receiverType ; } ReferenceBinding expectedType = this . binding . declaringClass . enclosingType ( ) ; if ( expectedType != enclosingInstanceType ) scope . compilationUnitScope ( ) . recordTypeConversion ( expectedType , enclosingInstanceType ) ; if ( ( enclosingInstanceType . isCompatibleWith ( expectedType ) ) || ( scope . isBoxingCompatibleWith ( enclosingInstanceType , expectedType ) ) ) { enclosingInstance . computeConversion ( scope , expectedType , enclosingInstanceType ) ; <START_BUG> return receiverType ; <END_BUG> } scope . problemReporter ( ) . typeMismatchError ( enclosingInstanceType , expectedType , this . enclosingInstance ) ; return this . resolvedType = receiverType ; } if ( receiverType . isTypeVariable ( ) ) { receiverType = new ProblemReferenceBinding ( receiverType . sourceName ( ) , ( ( ReferenceBinding ) ( receiverType ) ) , ProblemReasons . IllegalSuperTypeVariable ) ; scope . problemReporter ( ) . invalidType ( this , receiverType ) ; return null ; } else if ( ( ( type ) != null ) && ( receiverType . isEnum ( ) ) ) { scope . problemReporter ( ) . cannotInstantiate ( type , receiverType ) ; return this . resolvedType = receiverType ; } this . superTypeBinding = ( receiverType . isInterface ( ) ) ? scope . getJavaLangObject ( ) : ( ( ReferenceBinding ) ( receiverType ) ) ; scope . addAnonymousType ( this . anonymousType , ( ( ReferenceBinding ) ( receiverType ) ) ) ; this . anonymousType . resolve ( scope ) ; if ( ( ( receiverType . tagBits ) & ( TagBits . HasDirectWildcard ) ) != 0 ) { scope . problemReporter ( ) . superTypeCannotUseWildcard ( anonymousType . binding , this . type , receiverType ) ; } MethodBinding inheritedBinding = scope . getConstructor ( this . superTypeBinding , argumentTypes , this ) ; if ( ! ( inheritedBinding . isValidBinding ( ) ) ) { if ( ( inheritedBinding . declaringClass ) == null ) { inheritedBinding . declaringClass = this . superTypeBinding ; } scope . problemReporter ( ) . invalidConstructor ( this , inheritedBinding ) ; return this . resolvedType = anonymousType . binding ; } if ( ( enclosingInstance ) != null ) { ReferenceBinding targetEnclosing = inheritedBinding . declaringClass . enclosingType ( ) ; if ( targetEnclosing == null ) { scope . problemReporter ( ) . unnecessaryEnclosingInstanceSpecification ( enclosingInstance , ( ( ReferenceBinding ) ( receiverType ) ) ) ; return this . resolvedType = anonymousType . binding ; } else if ( ( ! ( enclosingInstanceType . isCompatibleWith ( targetEnclosing ) ) ) && ( ! ( scope . isBoxingCompatibleWith ( enclosingInstanceType , targetEnclosing ) ) ) ) { scope . problemReporter ( ) . typeMismatchError ( enclosingInstanceType , targetEnclosing , enclosingInstance ) ; return this . resolvedType = anonymousType . binding ; }

Fix:
return this . resolvedType = receiverType ;