@@ -5121,25 +5121,32 @@ and ComputeFlagFixupsForMemberBinding cenv (v:Val,memberInfo:ValMemberInfo) =
51215121let otcref = tcrefOfAppTy cenv.g oty
51225122let tcref = v.MemberApparentEntity
51235123
5124- let useMethodImpl =
5125- // REVIEW: it would be good to get rid of this special casing of Compare and GetHashCode during code generation
5126- let isCompare =
5127- ( Option.isSome tcref.GeneratedCompareToValues&& typeEquiv cenv.g oty cenv.g.mk_ IComparable_ ty) ||
5128- ( Option.isSome tcref.GeneratedCompareToValues&& tyconRefEq cenv.g cenv.g.system_ GenericIComparable_ tcref otcref)
5129-
5130- let isGenericEquals =
5131- ( Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues&& tyconRefEq cenv.g cenv.g.system_ GenericIEquatable_ tcref otcref)
5132-
5133- let isStructural =
5134- ( Option.isSome tcref.GeneratedCompareToWithComparerValues&& typeEquiv cenv.g oty cenv.g.mk_ IStructuralComparable_ ty) ||
5135- ( Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues&& typeEquiv cenv.g oty cenv.g.mk_ IStructuralEquatable_ ty)
5136- isInterfaceTy cenv.g oty&& not isCompare&& not isStructural&& not isGenericEquals
5124+ let useMethodImpl =
5125+ // REVIEW: it would be good to get rid of this special casing of Compare and GetHashCode during code generation
5126+ isInterfaceTy cenv.g oty&&
5127+ ( let isCompare =
5128+ Option.isSome tcref.GeneratedCompareToValues&&
5129+ ( typeEquiv cenv.g oty cenv.g.mk_ IComparable_ ty||
5130+ tyconRefEq cenv.g cenv.g.system_ GenericIComparable_ tcref otcref)
5131+
5132+ not isCompare) &&
5133+
5134+ ( let isGenericEquals =
5135+ Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues&& tyconRefEq cenv.g cenv.g.system_ GenericIEquatable_ tcref otcref
5136+
5137+ not isGenericEquals) &&
5138+ ( let isStructural =
5139+ ( Option.isSome tcref.GeneratedCompareToWithComparerValues&& typeEquiv cenv.g oty cenv.g.mk_ IStructuralComparable_ ty) ||
5140+ ( Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues&& typeEquiv cenv.g oty cenv.g.mk_ IStructuralEquatable_ ty)
51375141
5142+ not isStructural)
51385143
51395144let nameOfOverridingMethod = GenNameOfOverridingMethod cenv( useMethodImpl, slotsig)
51405145
5141- ( if useMethodImplthen fixupMethodImplFlags>> renameMethodDef nameOfOverridingMethod
5142- else fixupVirtualSlotFlags>> renameMethodDef nameOfOverridingMethod))
5146+ if useMethodImplthen
5147+ fixupMethodImplFlags>> renameMethodDef nameOfOverridingMethod
5148+ else
5149+ fixupVirtualSlotFlags>> renameMethodDef nameOfOverridingMethod)
51435150
51445151and ComputeMethodImplAttribs cenv ( _v : Val ) attrs =
51455152let implflags =