Skip to content

Commit 8e6aff6

Browse files
authored
Merge pull request #11875 from dotnet/merges/main-to-release/dev17.0
Merge main to release/dev17.0
2 parents 236a3bb + 11d81ea commit 8e6aff6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+999
-536
lines changed

VisualFSharp.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VisualFSharpDebug", "vsinte
170170
EndProject
171171
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Benchmarks", "Benchmarks", "{DFB6ADD7-3149-43D9-AFA0-FC4A818B472B}"
172172
EndProject
173-
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "CompilerServiceBenchmarks", "tests\benchmarks\CompilerServiceBenchmarks\CompilerServiceBenchmarks.fsproj", "{564E7DC5-11CB-4FCF-ABDD-23AD93AF3A61}"
173+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Benchmarks", "tests\benchmarks\CompilerServiceBenchmarks\FSharp.Compiler.Benchmarks.fsproj", "{564E7DC5-11CB-4FCF-ABDD-23AD93AF3A61}"
174174
EndProject
175175
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MicroPerfCSharp", "tests\benchmarks\MicroPerf\CS\MicroPerfCSharp.csproj", "{208E36EE-665C-42D2-B767-C6DB03C4FEB2}"
176176
EndProject

src/fsharp/AugmentWithHashCompare.fs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
module internal FSharp.Compiler.AugmentWithHashCompare
55

66
open Internal.Utilities.Library
7-
open FSharp.Compiler.AbstractIL
87
open FSharp.Compiler.AbstractIL.IL
98
open FSharp.Compiler.ErrorLogger
109
open FSharp.Compiler.Infos

src/fsharp/CheckComputationExpressions.fs

+12-12
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ let YieldFree (cenv: cenv) expr =
9595
| SynExpr.Sequential (_, _, e1, e2, _) ->
9696
YieldFree e1 && YieldFree e2
9797

98-
| SynExpr.IfThenElse (_, e2, e3opt, _, _, _, _) ->
98+
| SynExpr.IfThenElse (_, _, _, _, e2, _, e3opt, _, _, _, _) ->
9999
YieldFree e2 && Option.forall YieldFree e3opt
100100

101101
| SynExpr.TryWith (e1, _, clauses, _, _, _, _) ->
@@ -126,7 +126,7 @@ let YieldFree (cenv: cenv) expr =
126126
| SynExpr.Sequential (_, _, e1, e2, _) ->
127127
YieldFree e1 && YieldFree e2
128128

129-
| SynExpr.IfThenElse (_, e2, e3opt, _, _, _, _) ->
129+
| SynExpr.IfThenElse (_, _, _, _, e2, _, e3opt, _, _, _, _) ->
130130
YieldFree e2 && Option.forall YieldFree e3opt
131131

132132
| SynExpr.TryWith (e1, _, clauses, _, _, _, _) ->
@@ -707,7 +707,7 @@ let TcComputationExpression cenv env overallTy tpenv (mWhole, interpExpr: Expr,
707707
// NOTE: we should probably suppress these sequence points altogether
708708
let rangeForCombine innerComp1 =
709709
match innerComp1 with
710-
| SynExpr.IfThenElse (_, _, _, _, _, mIfToThen, _m) -> mIfToThen
710+
| SynExpr.IfThenElse (_, _, _, _, _, _, _, _, _, mIfToThen, _m) -> mIfToThen
711711
| SynExpr.Match (DebugPointAtBinding.Yes mMatch, _, _, _) -> mMatch
712712
| SynExpr.TryWith (_, _, _, _, _, DebugPointAtTry.Yes mTry, _) -> mTry
713713
| SynExpr.TryFinally (_, _, _, DebugPointAtTry.Yes mTry, _) -> mTry
@@ -1071,17 +1071,17 @@ let TcComputationExpression cenv env overallTy tpenv (mWhole, interpExpr: Expr,
10711071
SynExpr.Sequential(sp, true, innerComp1, holeFill, m)
10721072
translatedCtxt fillExpr))
10731073

1074-
| SynExpr.IfThenElse (guardExpr, thenComp, elseCompOpt, spIfToThen, isRecovery, mIfToThen, mIfToEndOfElseBranch) ->
1074+
| SynExpr.IfThenElse (ifKw, isElif, guardExpr, thenKw, thenComp, elseKw, elseCompOpt, spIfToThen, isRecovery, mIfToThen, mIfToEndOfElseBranch) ->
10751075
match elseCompOpt with
10761076
| Some elseComp ->
10771077
if isQuery then error(Error(FSComp.SR.tcIfThenElseMayNotBeUsedWithinQueries(), mIfToThen))
1078-
Some (translatedCtxt (SynExpr.IfThenElse (guardExpr, transNoQueryOps thenComp, Some(transNoQueryOps elseComp), spIfToThen, isRecovery, mIfToThen, mIfToEndOfElseBranch)))
1078+
Some (translatedCtxt (SynExpr.IfThenElse (ifKw, isElif, guardExpr, thenKw, transNoQueryOps thenComp, elseKw, Some(transNoQueryOps elseComp), spIfToThen, isRecovery, mIfToThen, mIfToEndOfElseBranch)))
10791079
| None ->
10801080
let elseComp =
10811081
if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mIfToThen ad "Zero" builderTy) then
10821082
error(Error(FSComp.SR.tcRequireBuilderMethod("Zero"), mIfToThen))
10831083
mkSynCall "Zero" mIfToThen []
1084-
Some (trans CompExprTranslationPass.Initial q varSpace thenComp (fun holeFill -> translatedCtxt (SynExpr.IfThenElse (guardExpr, holeFill, Some elseComp, spIfToThen, isRecovery, mIfToThen, mIfToEndOfElseBranch))))
1084+
Some (trans CompExprTranslationPass.Initial q varSpace thenComp (fun holeFill -> translatedCtxt (SynExpr.IfThenElse (ifKw, isElif, guardExpr, thenKw, holeFill, None, Some elseComp, spIfToThen, isRecovery, mIfToThen, mIfToEndOfElseBranch))))
10851085

10861086
// 'let binds in expr'
10871087
| SynExpr.LetOrUse (isRec, false, binds, innerComp, m) ->
@@ -1543,7 +1543,7 @@ let TcComputationExpression cenv env overallTy tpenv (mWhole, interpExpr: Expr,
15431543
else
15441544
None
15451545

1546-
| SynExpr.IfThenElse (guardExpr, thenComp, elseCompOpt, spIfToThen, isRecovery, mIfToThen, mIfToEndOfElseBranch) ->
1546+
| SynExpr.IfThenElse (ifKw, isElif, guardExpr, thenKw, thenComp, elseKw, elseCompOpt, spIfToThen, isRecovery, mIfToThen, mIfToEndOfElseBranch) ->
15471547
match convertSimpleReturnToExpr varSpace thenComp with
15481548
| None -> None
15491549
| Some (_, Some _) -> None
@@ -1558,7 +1558,7 @@ let TcComputationExpression cenv env overallTy tpenv (mWhole, interpExpr: Expr,
15581558
| Some (elseExpr, None) -> Some (Some elseExpr)
15591559
match elseExprOptOpt with
15601560
| None -> None
1561-
| Some elseExprOpt -> Some (SynExpr.IfThenElse (guardExpr, thenExpr, elseExprOpt, spIfToThen, isRecovery, mIfToThen, mIfToEndOfElseBranch), None)
1561+
| Some elseExprOpt -> Some (SynExpr.IfThenElse (ifKw, isElif, guardExpr, thenKw, thenExpr, elseKw, elseExprOpt, spIfToThen, isRecovery, mIfToThen, mIfToEndOfElseBranch), None)
15621562

15631563
| SynExpr.LetOrUse (isRec, false, binds, innerComp, m) ->
15641564
match convertSimpleReturnToExpr varSpace innerComp with
@@ -1599,7 +1599,7 @@ let TcComputationExpression cenv env overallTy tpenv (mWhole, interpExpr: Expr,
15991599
| OptionalSequential (JoinOrGroupJoinOrZipClause _, _) -> false
16001600
| OptionalSequential (CustomOperationClause _, _) -> false
16011601
| SynExpr.Sequential (_, _, innerComp1, innerComp2, _) -> isSimpleExpr innerComp1 && isSimpleExpr innerComp2
1602-
| SynExpr.IfThenElse (_, thenComp, elseCompOpt, _, _, _, _) ->
1602+
| SynExpr.IfThenElse (_, _, _, _, thenComp, _, elseCompOpt, _, _, _, _) ->
16031603
isSimpleExpr thenComp && (match elseCompOpt with None -> true | Some c -> isSimpleExpr c)
16041604
| SynExpr.LetOrUse (_, _, _, innerComp, _) -> isSimpleExpr innerComp
16051605
| SynExpr.LetOrUseBang _ -> false
@@ -1615,7 +1615,7 @@ let TcComputationExpression cenv env overallTy tpenv (mWhole, interpExpr: Expr,
16151615
| _ -> true
16161616

16171617
let basicSynExpr =
1618-
trans CompExprTranslationPass.Initial (hasCustomOperations ()) (LazyWithContext.NotLazy ([], env)) comp (fun holeFill -> holeFill)
1618+
trans CompExprTranslationPass.Initial (hasCustomOperations ()) (LazyWithContext.NotLazy ([], env)) comp id
16191619

16201620
let delayedExpr =
16211621
match TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBuilderVal ad "Delay" builderTy with
@@ -1822,7 +1822,7 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp overallTy m =
18221822
let innerExpr2, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp2
18231823
Some(Expr.Sequential(stmt1, innerExpr2, NormalSeq, sp, m), tpenv)
18241824

1825-
| SynExpr.IfThenElse (guardExpr, thenComp, elseCompOpt, spIfToThen, _isRecovery, mIfToThen, mIfToEndOfElseBranch) ->
1825+
| SynExpr.IfThenElse (_, _, guardExpr, _, thenComp, _, elseCompOpt, spIfToThen, _isRecovery, mIfToThen, mIfToEndOfElseBranch) ->
18261826
let guardExpr', tpenv = TcExpr cenv cenv.g.bool_ty env tpenv guardExpr
18271827
let thenExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv thenComp
18281828
let elseComp = (match elseCompOpt with Some c -> c | None -> SynExpr.ImplicitZero mIfToThen)
@@ -1837,7 +1837,7 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp overallTy m =
18371837
tpenv
18381838
true
18391839
comp
1840-
(fun x -> x) |> Some
1840+
id |> Some
18411841

18421842
// 'use x = expr in expr'
18431843
| SynExpr.LetOrUse (_isRec, true, [SynBinding (_vis, SynBindingKind.Normal, _, _, _, _, _, pat, _, rhsExpr, _, spBind)], innerComp, wholeExprMark) ->

src/fsharp/CheckDeclarations.fs

+7-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ open Internal.Utilities.Library
1010
open Internal.Utilities.Library.Extras
1111
open Internal.Utilities.Library.ResultOrException
1212
open FSharp.Compiler
13-
open FSharp.Compiler.AbstractIL
1413
open FSharp.Compiler.AbstractIL.IL
1514
open FSharp.Compiler.AbstractIL.Diagnostics
1615
open FSharp.Compiler.AccessibilityLogic
@@ -1268,7 +1267,7 @@ module IncrClassChecking =
12681267
// Replace the type parameters that used to be on the rhs with
12691268
// the full set of type parameters including the type parameters of the enclosing class
12701269
let rhsExpr = mkTypeLambda m methodVal.Typars (mkTypeChoose m chooseTps tauExpr, tauTy)
1271-
(isPriorToSuperInit, (fun e -> e)), [TBind (methodVal, rhsExpr, spBind)]
1270+
(isPriorToSuperInit, id), [TBind (methodVal, rhsExpr, spBind)]
12721271

12731272
// If it's represented as a non-escaping local variable then just bind it to its value
12741273
// If it's represented as a non-escaping local arg then no binding necessary (ctor args are already bound)
@@ -1410,7 +1409,7 @@ module IncrClassChecking =
14101409
// <super init>
14111410
// <let/do bindings>
14121411
// return ()
1413-
let ctorInitActionsPre, ctorInitActionsPost = ctorInitActions |> List.partition (fun (isPriorToSuperInit, _) -> isPriorToSuperInit)
1412+
let ctorInitActionsPre, ctorInitActionsPost = ctorInitActions |> List.partition fst
14141413

14151414
// This is the return result
14161415
let ctorBody = mkUnit g m
@@ -3447,7 +3446,7 @@ module EstablishTypeDefinitionCores =
34473446
// Build up a mapping from System.Type --> TyconRef/ILTypeRef, to allow reverse-mapping
34483447
// of types
34493448

3450-
let previousContext = (theRootType.PApply ((fun x -> x.Context), m)).PUntaint ((fun x -> x), m)
3449+
let previousContext = (theRootType.PApply ((fun x -> x.Context), m)).PUntaint (id, m)
34513450
let lookupILTypeRef, lookupTyconRef = previousContext.GetDictionaries()
34523451

34533452
let ctxt = ProvidedTypeContext.Create(lookupILTypeRef, lookupTyconRef)
@@ -5300,7 +5299,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
53005299

53015300
| SynModuleDecl.ModuleAbbrev (id, p, m) ->
53025301
let env = MutRecBindingChecking.TcModuleAbbrevDecl cenv scopem env (id, p, m)
5303-
return ((fun e -> e), []), env, env
5302+
return (Operators.id, []), env, env
53045303

53055304
| SynModuleDecl.Exception (edef, m) ->
53065305
let binds, decl, env = TcExceptionDeclarations.TcExnDefn cenv env parent (edef, scopem)
@@ -5320,7 +5319,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
53205319
| SynModuleDecl.Open (target, m) ->
53215320
let scopem = unionRanges m.EndRange scopem
53225321
let env = TcOpenDecl cenv m scopem env target
5323-
return ((fun e -> e), []), env, env
5322+
return (id, []), env, env
53245323

53255324
| SynModuleDecl.Let (letrec, binds, m) ->
53265325

@@ -5347,7 +5346,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
53475346
return ((fun e -> e), attrs), env, env
53485347

53495348
| SynModuleDecl.HashDirective _ ->
5350-
return ((fun e -> e), []), env, env
5349+
return (id, []), env, env
53515350

53525351
| SynModuleDecl.NestedModule(compInfo, isRec, mdefs, isContinuingModule, m) ->
53535352

@@ -5466,7 +5465,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
54665465

54675466
with exn ->
54685467
errorRecovery exn synDecl.Range
5469-
return ((fun e -> e), []), env, env
5468+
return (id, []), env, env
54705469
}
54715470

54725471
/// The non-mutually recursive case for a sequence of declarations

src/fsharp/CheckDeclarations.fsi

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
module internal FSharp.Compiler.CheckDeclarations
44

5-
open FSharp.Compiler
65
open Internal.Utilities.Library
76
open FSharp.Compiler.CheckExpressions
87
open FSharp.Compiler.CompilerGlobalState

src/fsharp/CheckExpressions.fs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7946,7 +7946,7 @@ and TcItemThen cenv overallTy env tpenv (tinstEnclosing, item, mItem, rest, afte
79467946
| SynExpr.ArrayOrList (_, synExprs, _) -> synExprs |> List.forall isSimpleArgument
79477947
| SynExpr.Record (_, copyOpt, fields, _) -> copyOpt |> Option.forall (fst >> isSimpleArgument) && fields |> List.forall (p23 >> Option.forall isSimpleArgument)
79487948
| SynExpr.App (_, _, synExpr, synExpr2, _) -> isSimpleArgument synExpr && isSimpleArgument synExpr2
7949-
| SynExpr.IfThenElse (synExpr, synExpr2, synExprOpt, _, _, _, _) -> isSimpleArgument synExpr && isSimpleArgument synExpr2 && Option.forall isSimpleArgument synExprOpt
7949+
| SynExpr.IfThenElse (_, _, synExpr, _, synExpr2, _, synExprOpt, _, _, _, _) -> isSimpleArgument synExpr && isSimpleArgument synExpr2 && Option.forall isSimpleArgument synExprOpt
79507950
| SynExpr.DotIndexedGet (synExpr, _, _, _) -> isSimpleArgument synExpr
79517951
| SynExpr.ObjExpr _
79527952
| SynExpr.AnonRecd _
@@ -9155,7 +9155,7 @@ and TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr expr cont =
91559155
TcLinearExprs bodyChecker cenv envinner overallTy tpenv isCompExpr body (fun (x, tpenv) ->
91569156
cont (fst (mkf (x, overallTy)), tpenv))
91579157

9158-
| SynExpr.IfThenElse (synBoolExpr, synThenExpr, synElseExprOpt, spIfToThen, isRecovery, mIfToThen, m) when not isCompExpr ->
9158+
| SynExpr.IfThenElse (_, _, synBoolExpr, _, synThenExpr, _, synElseExprOpt, spIfToThen, isRecovery, mIfToThen, m) when not isCompExpr ->
91599159
let boolExpr, tpenv = TcExprThatCantBeCtorBody cenv cenv.g.bool_ty env tpenv synBoolExpr
91609160
let thenExpr, tpenv =
91619161
let env =

src/fsharp/CompilerConfig.fs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ open Internal.Utilities.FSharpEnvironment
1111
open Internal.Utilities.Library
1212
open Internal.Utilities.Library.Extras
1313
open FSharp.Compiler
14-
open FSharp.Compiler.AbstractIL
1514
open FSharp.Compiler.AbstractIL.IL
1615
open FSharp.Compiler.AbstractIL.ILBinaryReader
1716
open FSharp.Compiler.AbstractIL.ILPdbWriter

src/fsharp/CompilerImports.fs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ and [<Sealed>] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse
11001100
let ccuData: CcuData =
11011101
{ IsFSharp=false
11021102
UsesFSharp20PlusQuotations=false
1103-
InvalidateEvent=(new Event<_>()).Publish
1103+
InvalidateEvent=(Event<_>()).Publish
11041104
IsProviderGenerated = true
11051105
QualifiedName= Some (assembly.PUntaint((fun a -> a.FullName), m))
11061106
Contents = ccuContents
@@ -1482,7 +1482,7 @@ and [<Sealed>] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse
14821482
let nm = aref.Name
14831483
if verbose then dprintn ("Converting IL assembly to F# data structures "+nm)
14841484
let auxModuleLoader = tcImports.MkLoaderForMultiModuleILAssemblies ctok m
1485-
let invalidateCcu = new Event<_>()
1485+
let invalidateCcu = Event<_>()
14861486
let ccu = ImportILAssembly(tcImports.GetImportMap, m, auxModuleLoader, tcConfig.xmlDocInfoLoader, ilScopeRef, tcConfig.implicitIncludeDir, Some filename, ilModule, invalidateCcu.Publish)
14871487

14881488
let ccuinfo =
@@ -1527,7 +1527,7 @@ and [<Sealed>] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse
15271527
let mspec = minfo.mspec
15281528

15291529
#if !NO_EXTENSIONTYPING
1530-
let invalidateCcu = new Event<_>()
1530+
let invalidateCcu = Event<_>()
15311531
#endif
15321532

15331533
let codeDir = minfo.compileTimeWorkingDir
@@ -1571,7 +1571,7 @@ and [<Sealed>] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse
15711571
RequireTcImportsLock(tcitok, ccuThunks)
15721572
for ccuThunk in data.FixupThunks do
15731573
if ccuThunk.IsUnresolvedReference then
1574-
ccuThunks.Add(ccuThunk, fun () -> fixupThunk () |> ignore) |> ignore
1574+
ccuThunks.Add(ccuThunk, fun () -> fixupThunk () |> ignore)
15751575
)
15761576

15771577
if verbose then dprintf "found optimization data for CCU %s\n" ccuName
@@ -1613,7 +1613,7 @@ and [<Sealed>] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse
16131613
if ccuThunk.IsUnresolvedReference then
16141614
tciLock.AcquireLock <| fun tcitok ->
16151615
RequireTcImportsLock(tcitok, ccuThunks)
1616-
ccuThunks.Add(ccuThunk, fixupThunk) |> ignore
1616+
ccuThunks.Add(ccuThunk, fixupThunk)
16171617
)
16181618
#if !NO_EXTENSIONTYPING
16191619
ccuRawDataAndInfos |> List.iter (fun (_, _, phase2) -> phase2())

src/fsharp/ConstraintSolver.fsi

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
/// Solves constraints using a mutable constraint-solver state
44
module internal FSharp.Compiler.ConstraintSolver
55

6-
open FSharp.Compiler
76
open FSharp.Compiler.AccessibilityLogic
87
open FSharp.Compiler.ErrorLogger
98
open FSharp.Compiler.Import

src/fsharp/DependencyManager/DependencyProvider.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ type ReflectionDependencyManagerProvider(theType: Type,
256256
box scriptName
257257
box (packageManagerTextLines
258258
|> Seq.filter(fun (dv, _) -> dv = "r")
259-
|> Seq.map(fun (_, line) -> line))
259+
|> Seq.map snd)
260260
box tfm |]
261261
else
262262
None, [||]

src/fsharp/ErrorResolutionHints.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ type SuggestionBuffer(idText: string) =
8888
suggestion.EndsWithOrdinal dotIdText ||
8989
(similarity >= minThresholdForSuggestions && IsInEditDistanceProximity uppercaseText suggestedText)
9090
then
91-
insert(similarity, suggestion) |> ignore
91+
insert(similarity, suggestion)
9292

9393
member _.Disabled with get () = disableSuggestions
9494

src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<InternalsVisibleTo Include="HostedCompilerServer" />
7575
<InternalsVisibleTo Include="FSharp.Tests.FSharpSuite" />
7676
<InternalsVisibleTo Include="LanguageServiceProfiling" />
77-
<InternalsVisibleTo Include="CompilerServiceBenchmarks" />
77+
<InternalsVisibleTo Include="FSharp.Compiler.Benchmarks" />
7878
</ItemGroup>
7979

8080
<ItemGroup>

src/fsharp/FxResolver.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ type internal FxResolver(assumeDotNetFramework: bool, projectDir: string, useSdk
277277
|> Array.map (fun di -> computeVersion di.Name, di)
278278
|> Array.filter(fun (v, _) -> (compareVersion v targetVersion) <= 0)
279279
|> Array.sortWith (fun (v1,_) (v2,_) -> compareVersion v1 v2)
280-
|> Array.map (fun (_, di) -> di)
280+
|> Array.map snd
281281
|> Array.tryLast
282282
else
283283
None

0 commit comments

Comments
 (0)