@@ -1713,23 +1713,21 @@ and SolveTypSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace ty =
17131713 ErrorD( ConstraintSolverError( FSComp.SR.csTypeDoesNotSupportEquality2( NicePrint.minimalStringOfType denv ty), m, m2))
17141714| _ ->
17151715// The type is equatable because it has Object.Equals(...)
1716- if isAppTy g tythen
1717- let tcref , tinst = destAppTy g ty
1718-
1716+ match tryFullDestAppTy g tywith
1717+ | Some( tcref, tinst) ->
17191718// Give a good error for structural types excluded from the equality relation because of their fields
1720- if ( AugmentWithHashCompare.TyconIsCandidateForAugmentationWithEquals g tcref.Deref&&
1721- Option.isNone tcref.GeneratedHashAndEqualsWithComparerValues) then
1722-
1719+ if AugmentWithHashCompare.TyconIsCandidateForAugmentationWithEquals g tcref.Deref&&
1720+ Option.isNone tcref.GeneratedHashAndEqualsWithComparerValues
1721+ then
17231722 ErrorD( ConstraintSolverError( FSComp.SR.csTypeDoesNotSupportEquality3( NicePrint.minimalStringOfType denv ty), m, m2))
1724-
17251723else
17261724// Check the (possibly inferred) structural dependencies
17271725( tinst, tcref.TyparsNoRange) ||> Iterate2D( fun ty tp ->
17281726if tp.EqualityConditionalOnthen
17291727 SolveTypSupportsEquality( csenv: ConstraintSolverEnv) ndeep m2 trace ty
17301728else
17311729 CompleteD)
1732- else
1730+ | None ->
17331731 CompleteD
17341732
17351733and SolveTypIsEnum ( csenv : ConstraintSolverEnv ) ndeep m2 trace ty underlying =