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

Commitb05a2e5

Browse files
forkiKevinRansom
authored andcommitted
Lot's of cleanups in TypeCheck.fs (dotnet#2260)
* cleanup* Check if vals are empty* More isNil tests* cleanup* More isNil tests* More isNil tests* More isNil tests* formatting* formatting* We don't need to calc the full length* Check length before we call typ functions* Don't call length if not needed* move opTakesThreeArgs to usage* formatting* reduce one if* Remvoe one isSome check* cleanup* cleanup* remove begin/end* formatting* Interate the fields only once* Choose can be simplified here* formatting* formatting* Things that don't computation should go first in &&* formatting* We should not generate Options just to throw them away in inlined function* Do not pattern match twice for the same thing* formating* Removed inline* formatting* formatting* formatting* formatting* formatting* yet another typo* remove begin end
1 parentc9974b5 commitb05a2e5

File tree

4 files changed

+281
-222
lines changed

4 files changed

+281
-222
lines changed

‎src/fsharp/ConstraintSolver.fs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2461,7 +2461,8 @@ let UnifyUniqueOverloading
24612461

24622462
letEliminateConstraintsForGeneralizedTypars csenv(trace:OptionalTrace)(generalizedTypars:Typars)=
24632463
// Remove the global constraints where this type variable appears in the support of the constraint
2464-
generalizedTypars|> List.iter(fun tp->
2464+
generalizedTypars
2465+
|> List.iter(fun tp->
24652466
lettpn= tp.Stamp
24662467
letcxst= csenv.SolverState.ExtraCxs
24672468
letcxs= cxst.FindAll tpn

‎src/fsharp/NameResolution.fs‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3054,9 +3054,11 @@ let ResolveField sink ncenv nenv ad typ (mp,id) allFields =
30543054
letres= ResolveFieldPrim ncenv nenv ad typ(mp,id) allFields
30553055
// Register the results of any field paths "Module.Type" in "Module.Type.field" as a name resolution. (Note, the path resolution
30563056
// info is only non-empty if there was a unique resolution of the field)
3057-
for(resInfo,_rfref)in resdo
3058-
ResolutionInfo.SendToSink(sink,ncenv,nenv,ItemOccurence.UseInType, ad,resInfo,ResultTyparChecker(fun()->true))
3059-
res|> List.map snd
3057+
letchecker= ResultTyparChecker(fun()->true)
3058+
res
3059+
|> List.map(fun(resInfo,rfref)->
3060+
ResolutionInfo.SendToSink(sink,ncenv,nenv,ItemOccurence.UseInType,ad,resInfo,checker)
3061+
rfref)
30603062

30613063
/// Generate a new reference to a record field with a fresh type instantiation
30623064
letFreshenRecdFieldRef(ncenv:NameResolver)m(rfref:RecdFieldRef)=

‎src/fsharp/TastOps.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ let destForallTy g ty =
13481348
tps,tau
13491349

13501350
lettryDestForallTy g ty=
1351-
if isForallTy g tythen destForallTy g tyelse([],ty)
1351+
if isForallTy g tythen destForallTy g tyelse[],ty
13521352

13531353

13541354
let recstripFunTy g ty=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp