Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc4fdfa

Browse files
forkiKevinRansom
authored andcommitted
Check LocallyAbortOperationThatFailsToResolveOverload - fixes #3343 (#3366)
1 parentba6dff8 commitfc4fdfa

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

‎src/fsharp/ConstraintSolver.fs‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,20 +1961,22 @@ and CanMemberSigsMatchUpToCheck
19611961
// to allow us to report the outer types involved in the constraint
19621962
andprivateSolveTypSubsumesTypWithReport(csenv:ConstraintSolverEnv)ndeep m trace cxsln ty1 ty2=
19631963
TryD(fun()-> SolveTypSubsumesTypKeepAbbrevs csenv ndeep m trace cxsln ty1 ty2)
1964-
(fun res->
1965-
match csenv.eContextInfowith
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.eContextInfowith
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)))
19721974

19731975
andprivateSolveTypEqualsTypWithReport(csenv:ConstraintSolverEnv)ndeep m trace cxsln ty1 ty2=
19741976
TryD(fun()-> SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m trace cxsln ty1 ty2)
19751977
(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)))
19781980

19791981
andArgsMustSubsumeOrConvert
19801982
(csenv:ConstraintSolverEnv)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp