@@ -558,21 +558,21 @@ let rec SimplifyMeasuresInType g resultFirst ((generalizable, generalized) as pa
558558
559559and SimplifyMeasuresInTypes g param tys =
560560match tyswith
561- | [] -> param
561+ | [] -> param
562562| ty:: tys->
563563let param ' = SimplifyMeasuresInType gfalse param ty
564564 SimplifyMeasuresInTypes g param' tys
565565
566566let SimplifyMeasuresInConstraint g param c =
567567match cwith
568- | TyparConstraint.DefaultsTo(_, ty,_) | TyparConstraint.CoercesTo( ty,_) -> SimplifyMeasuresInType gfalse param ty
569- | TyparConstraint.SimpleChoice( tys,_) -> SimplifyMeasuresInTypes g param tys
570- | TyparConstraint.IsDelegate( ty1, ty2,_) -> SimplifyMeasuresInTypes g param[ ty1; ty2]
571- | _ -> param
568+ | TyparConstraint.DefaultsTo(_, ty,_) | TyparConstraint.CoercesTo( ty,_) -> SimplifyMeasuresInType gfalse param ty
569+ | TyparConstraint.SimpleChoice( tys,_) -> SimplifyMeasuresInTypes g param tys
570+ | TyparConstraint.IsDelegate( ty1, ty2,_) -> SimplifyMeasuresInTypes g param[ ty1; ty2]
571+ | _ -> param
572572
573573let rec SimplifyMeasuresInConstraints g param cs =
574574match cswith
575- | [] -> param
575+ | [] -> param
576576| c:: cs->
577577let param ' = SimplifyMeasuresInConstraint g param c
578578 SimplifyMeasuresInConstraints g param' cs
@@ -590,7 +590,7 @@ let rec GetMeasureVarGcdInType v ty =
590590
591591and GetMeasureVarGcdInTypes v tys =
592592match tyswith
593- | [] -> ZeroRational
593+ | [] -> ZeroRational
594594| ty:: tys-> GcdRational( GetMeasureVarGcdInType v ty) ( GetMeasureVarGcdInTypes v tys)
595595
596596// Normalize the exponents on generalizable variables in a type
@@ -657,11 +657,11 @@ let CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 (r:Typar) ty =
657657not tp2.IsCompilerGenerated&&
658658( r.IsCompilerGenerated||
659659// exclude this warning for two identically named user-specified type parameters, e.g. from different mutually recursive functions or types
660- r.DisplayName<> tp2.DisplayName))) then
661-
660+ r.DisplayName<> tp2.DisplayName)))
661+ then
662662// NOTE: we grab the name eagerly to make sure the type variable prints as a type variable
663663let tpnmOpt = if r.IsCompilerGeneratedthen Noneelse Some r.Name
664- WarnD( NonRigidTypar( denv, tpnmOpt, r.Range, ty1, ty, csenv.m))
664+ WarnD( NonRigidTypar( denv, tpnmOpt, r.Range, ty1, ty, csenv.m))
665665else
666666 CompleteD
667667
@@ -888,7 +888,7 @@ and SolveTypSubsumesTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTra
888888// may feasibly convert to Head.
889889
890890else
891- match ( FindUniqueFeasibleSupertype g amap m ty1 ty2) with
891+ match FindUniqueFeasibleSupertype g amap m ty1 ty2with
892892| None-> ErrorD( ConstraintSolverTypesNotInSubsumptionRelation( denv, ty1, ty2, m, m2))
893893| Some t-> SolveTypSubsumesTyp csenv ndeep m2 trace cxsln ty1 t
894894
@@ -911,7 +911,7 @@ and SolveTyparSubtypeOfType (csenv:ConstraintSolverEnv) ndeep m2 trace tp ty1 =
911911elif isSealedTy g ty1then
912912 SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace( mkTyparTy tp) ty1
913913else
914- AddConstraint csenv ndeep m2 trace tp( TyparConstraint.CoercesTo( ty1, m))
914+ AddConstraint csenv ndeep m2 trace tp( TyparConstraint.CoercesTo( ty1, m))
915915
916916and DepthCheck ndeep m =
917917if ndeep> 300 then error( Error( FSComp.SR.csTypeInferenceMaxDepth(), m)) else CompleteD
@@ -1263,7 +1263,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p
12631263match recdPropSearch, methOverloadResultwith
12641264| Some( rfinfo, isSetProp), None->
12651265// OK, the constraint is solved by a record property. Assert that the return types match.
1266- let rty2 = if isSetPropthen g.unit_ tyelse rfinfo.FieldType
1266+ let rty2 = if isSetPropthen g.unit_ tyelse rfinfo.FieldType
12671267 SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty rty2++ ( fun () ->
12681268 ResultD( TTraitSolvedRecdProp( rfinfo, isSetProp)))
12691269| None, Some( calledMeth: CalledMeth<_>) ->