@@ -1961,20 +1961,22 @@ and CanMemberSigsMatchUpToCheck
1961
1961
// to allow us to report the outer types involved in the constraint
1962
1962
and private SolveTypSubsumesTypWithReport ( csenv : ConstraintSolverEnv ) ndeep m trace cxsln ty1 ty2 =
1963
1963
TryD ( fun () -> SolveTypSubsumesTypKeepAbbrevs csenv ndeep m trace cxsln ty1 ty2)
1964
- ( fun res ->
1965
- match csenv.eContextInfo with
1966
- | ContextInfo.RuntimeTypeTest isOperator ->
1967
- // test if we can cast other way around
1968
- match CollectThenUndo ( fun newTrace -> SolveTypSubsumesTypKeepAbbrevs csenv ndeep m ( OptionalTrace.WithTrace newTrace) cxsln ty2 ty1) with
1969
- | OkResult _ -> ErrorD ( ErrorsFromAddingSubsumptionConstraint( csenv.g, csenv.DisplayEnv, ty1, ty2, res, ContextInfo.DowncastUsedInsteadOfUpcast isOperator, m))
1970
- | _ -> ErrorD ( ErrorsFromAddingSubsumptionConstraint( csenv.g, csenv.DisplayEnv, ty1, ty2, res, ContextInfo.NoContext, m))
1971
- | _ -> ErrorD ( ErrorsFromAddingSubsumptionConstraint( csenv.g, csenv.DisplayEnv, ty1, ty2, res, csenv.eContextInfo, m)))
1964
+ ( function
1965
+ | LocallyAbortOperationThatFailsToResolveOverload -> CompleteD
1966
+ | res ->
1967
+ match csenv.eContextInfo with
1968
+ | ContextInfo.RuntimeTypeTest isOperator ->
1969
+ // test if we can cast other way around
1970
+ match CollectThenUndo ( fun newTrace -> SolveTypSubsumesTypKeepAbbrevs csenv ndeep m ( OptionalTrace.WithTrace newTrace) cxsln ty2 ty1) with
1971
+ | OkResult _ -> ErrorD ( ErrorsFromAddingSubsumptionConstraint( csenv.g, csenv.DisplayEnv, ty1, ty2, res, ContextInfo.DowncastUsedInsteadOfUpcast isOperator, m))
1972
+ | _ -> ErrorD ( ErrorsFromAddingSubsumptionConstraint( csenv.g, csenv.DisplayEnv, ty1, ty2, res, ContextInfo.NoContext, m))
1973
+ | _ -> ErrorD ( ErrorsFromAddingSubsumptionConstraint( csenv.g, csenv.DisplayEnv, ty1, ty2, res, csenv.eContextInfo, m)))
1972
1974
1973
1975
and private SolveTypEqualsTypWithReport ( csenv : ConstraintSolverEnv ) ndeep m trace cxsln ty1 ty2 =
1974
1976
TryD ( fun () -> SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m trace cxsln ty1 ty2)
1975
1977
( function
1976
- | LocallyAbortOperationThatFailsToResolveOverload -> CompleteD
1977
- | res -> ErrorD ( ErrorFromAddingTypeEquation( csenv.g, csenv.DisplayEnv, ty1, ty2, res, m)))
1978
+ | LocallyAbortOperationThatFailsToResolveOverload -> CompleteD
1979
+ | res -> ErrorD ( ErrorFromAddingTypeEquation( csenv.g, csenv.DisplayEnv, ty1, ty2, res, m)))
1978
1980
1979
1981
and ArgsMustSubsumeOrConvert
1980
1982
( csenv : ConstraintSolverEnv )
0 commit comments