Skip to content

Commit 7f3176d

Browse files
authored
Merge pull request #17520 from dotnet/merges/main-to-release/dev17.12
Merge main to release/dev17.12
2 parents e5a83e5 + 25e4ee4 commit 7f3176d

File tree

104 files changed

+1179
-1097
lines changed

Some content is hidden

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

104 files changed

+1179
-1097
lines changed

docs/release-notes/.FSharp.Compiler.Service/9.0.100.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
* Optimize simple mappings in comprehensions when the body of the mapping has `let`-bindings and/or sequential expressions before a single yield. ([PR #17419](https://github.com/dotnet/fsharp/pull/17419))
66
* C# protected property can be assigned in F# inherit constructor call. ([Issue #13299](https://github.com/dotnet/fsharp/issues/13299), [PR #17391](https://github.com/dotnet/fsharp/pull/17391))
77
* MethodAccessException on equality comparison of a record with private fields. ([Issue #17447](https://github.com/dotnet/fsharp/issues/17447), [PR #17391](https://github.com/dotnet/fsharp/pull/17467))
8+
* Fix `function` implicit conversion. ([Issue #7401](https://github.com/dotnet/fsharp/issues/7401), [PR #17487](https://github.com/dotnet/fsharp/pull/17487))
9+
* Compiler fails to recognise namespace in FQN with enabled GraphBasedChecking. ([Issue #17508](https://github.com/dotnet/fsharp/issues/17508), [PR #17510](https://github.com/dotnet/fsharp/pull/17510))
10+
* Fix missing message for type error (FS0001). ([Issue #17373](https://github.com/dotnet/fsharp/issues/17373), [PR #17516](https://github.com/dotnet/fsharp/pull/17516))
811

912
### Added
1013

1114
* Support for nullable reference types ([PR #15181](https://github.com/dotnet/fsharp/pull/15181))
1215
* Parser: recover on missing union case fields (PR [#17452](https://github.com/dotnet/fsharp/pull/17452))
1316
* Parser: recover on missing union case field types (PR [#17455](https://github.com/dotnet/fsharp/pull/17455))
1417
* Sink: report function domain type ([PR #17470](https://github.com/dotnet/fsharp/pull/17470))
18+
* Render C# nullable-analysis attributes in tooltips ([PR #17485](https://github.com/dotnet/fsharp/pull/17485))
1519

1620
### Changed
1721

@@ -21,5 +25,5 @@
2125
* Optimize metadata reading for type members and custom attributes. ([PR #17364](https://github.com/dotnet/fsharp/pull/17364))
2226
* Enforce `AttributeTargets` on unions. ([PR #17389](https://github.com/dotnet/fsharp/pull/17389))
2327
* Ensure that isinteractive multi-emit backing fields are not public. ([Issue #17439](https://github.com/dotnet/fsharp/issues/17438)), ([PR #17439](https://github.com/dotnet/fsharp/pull/17439))
24-
28+
* Enable FSharp 9.0 Language Version ([Issue #17497](https://github.com/dotnet/fsharp/issues/17438)), [PR](https://github.com/dotnet/fsharp/pull/17500)))
2529
### Breaking Changes

docs/release-notes/.FSharp.Core/9.0.100.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
### Fixed
2+
* Struct UnionCase doesn't seem to be a valid target for the DefaultAugmentationAttribute ([Issue #17499](https://github.com/dotnet/fsharp/issues/17499), [PR #17502](https://github.com/dotnet/fsharp/pull/17502))
23

34
### Added
45

@@ -8,6 +9,7 @@
89
### Changed
910
* Change compiler default setting realsig+ when building assemblies ([Issue #17384](https://github.com/dotnet/fsharp/issues/17384), [PR #17378](https://github.com/dotnet/fsharp/pull/17385))
1011
* Change compiler default setting for compressedMetadata ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383))
11-
12+
* Enable FSharp 9.0 Language Version ([Issue #17497](https://github.com/dotnet/fsharp/issues/17438)), [PR](https://github.com/dotnet/fsharp/pull/17500)))
13+
* Struct UnionCase doesn't seem to be a valid target for the DefaultAugmentationAttribute ([Issue #17499](https://github.com/dotnet/fsharp/issues/17499), [PR #17502](https://github.com/dotnet/fsharp/pull/17502))
1214
### Breaking Changes
1315

docs/release-notes/.Language/9.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33

44
### Added
55

6+
### Changed
7+
* Enable FSharp 9.0 Language Version ([Issue #17497](https://github.com/dotnet/fsharp/issues/17438)), [PR](https://github.com/dotnet/fsharp/pull/17500)))

docs/release-notes/.VisualStudio/17.12.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
### Changed
88

99
### Breaking Changes
10+
* Enable FSharp 9.0 Language Version ([Issue #17497](https://github.com/dotnet/fsharp/issues/17438)), [PR](https://github.com/dotnet/fsharp/pull/17500)))

eng/SourceBuildPrebuiltBaseline.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<UsagePattern IdentityGlob="System.CodeDom/8.0.0" />
1818
<UsagePattern IdentityGlob="System.Resources.Extensions/8.0.0" />
1919
<UsagePattern IdentityGlob="System.Diagnostics.DiagnosticSource/8.0.0" />
20+
<UsagePattern IdentityGlob="System.Threading.Tasks.Dataflow/8.0.0" />
2021

2122
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Runtime.linux-x64/9.0.*" />
2223
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Crossgen2.linux-x64/9.0.*" />

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
33
<ProductDependencies>
4-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="9.0.0-alpha.1.24352.1">
4+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="9.0.0-alpha.1.24405.2">
55
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
6-
<Sha>cc732c57199f725857c201da146525e3be6bc504</Sha>
6+
<Sha>0d066e61a30c2599d0ced871ea45acf0e10571af</Sha>
77
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
88
</Dependency>
99
<!-- Intermediate is necessary for source build. -->
@@ -42,14 +42,14 @@
4242
</Dependency>
4343
</ProductDependencies>
4444
<ToolsetDependencies>
45-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24405.1">
45+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24408.2">
4646
<Uri>https://github.com/dotnet/arcade</Uri>
47-
<Sha>2c829550b968e29389ce8392244da2b006d71301</Sha>
47+
<Sha>60ae233c3d77f11c5fdb53e570b64d503b13ba59</Sha>
4848
</Dependency>
4949
<!-- Intermediate is necessary for source build. -->
50-
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24405.1">
50+
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24408.2">
5151
<Uri>https://github.com/dotnet/arcade</Uri>
52-
<Sha>2c829550b968e29389ce8392244da2b006d71301</Sha>
52+
<Sha>60ae233c3d77f11c5fdb53e570b64d503b13ba59</Sha>
5353
<SourceBuild RepoName="arcade" ManagedOnly="true" />
5454
</Dependency>
5555
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.23614.4">

eng/common/darc-init.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
param (
22
$darcVersion = $null,
3-
$versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2019-01-16',
3+
$versionEndpoint = 'https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20',
44
$verbosity = 'minimal',
55
$toolpath = $null
66
)

eng/common/darc-init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source="${BASH_SOURCE[0]}"
44
darcVersion=''
5-
versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2019-01-16'
5+
versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20'
66
verbosity='minimal'
77

88
while [[ $# > 0 ]]; do

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"perl": "5.38.2.2"
1818
},
1919
"msbuild-sdks": {
20-
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24405.1",
20+
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24408.2",
2121
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2"
2222
}
2323
}

src/Compiler/Checking/Expressions/CheckExpressions.fs

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9672,22 +9672,36 @@ and TcMethodApplicationThen
96729672
PropagateThenTcDelayed cenv overallTy env tpenv mWholeExpr (MakeApplicableExprNoFlex cenv expr) exprTy atomicFlag delayed
96739673

96749674
/// Infer initial type information at the callsite from the syntax of an argument, prior to overload resolution.
9675-
and GetNewInferenceTypeForMethodArg (cenv: cenv) env tpenv x =
9675+
and GetNewInferenceTypeForMethodArg (cenv: cenv) x =
96769676

96779677
let g = cenv.g
96789678

9679-
match x with
9680-
| SynExprParen(a, _, _, _) ->
9681-
GetNewInferenceTypeForMethodArg cenv env tpenv a
9682-
| SynExpr.AddressOf (true, a, _, m) ->
9683-
mkByrefTyWithInference g (GetNewInferenceTypeForMethodArg cenv env tpenv a) (NewByRefKindInferenceType g m)
9684-
| SynExpr.Lambda (body = a)
9685-
| SynExpr.DotLambda (expr = a) ->
9686-
mkFunTy g (NewInferenceType g) (GetNewInferenceTypeForMethodArg cenv env tpenv a)
9687-
| SynExpr.Quote (_, raw, a, _, _) ->
9688-
if raw then mkRawQuotedExprTy g
9689-
else mkQuotedExprTy g (GetNewInferenceTypeForMethodArg cenv env tpenv a)
9690-
| _ -> NewInferenceType g
9679+
let rec loopExpr expr cont : struct (_ * _) =
9680+
match expr with
9681+
| SynExprParen (a, _, _, _) ->
9682+
loopExpr a cont
9683+
| SynExpr.AddressOf (true, a, _, m) ->
9684+
loopExpr a (cont << fun struct (depth, ty) -> depth + 1, mkByrefTyWithInference g ty (NewByRefKindInferenceType g m))
9685+
| SynExpr.Lambda (body = a)
9686+
| SynExpr.DotLambda (expr = a) ->
9687+
loopExpr a (cont << fun struct (depth, ty) -> depth + 1, mkFunTy g (NewInferenceType g) ty)
9688+
| SynExpr.MatchLambda (matchClauses = SynMatchClause (resultExpr = a) :: clauses) ->
9689+
let loopClause a = loopExpr a (cont << fun struct (depth, ty) -> depth + 1, mkFunTy g (NewInferenceType g) ty)
9690+
9691+
// Look at all branches, keeping the one
9692+
// that gives us the most syntactic information.
9693+
(loopClause a, clauses)
9694+
||> List.fold (fun ((maxClauseDepth, _) as acc) (SynMatchClause (resultExpr = a)) ->
9695+
match loopClause a with
9696+
| clauseDepth, ty when clauseDepth > maxClauseDepth -> clauseDepth, ty
9697+
| _ -> acc)
9698+
| SynExpr.Quote (_, raw, a, _, _) ->
9699+
if raw then cont (0, mkRawQuotedExprTy g)
9700+
else loopExpr a (cont << fun struct (depth, ty) -> depth + 1, mkQuotedExprTy g ty)
9701+
| _ -> cont (0, NewInferenceType g)
9702+
9703+
let struct (_depth, ty) = loopExpr x id
9704+
ty
96919705

96929706
and CalledMethHasSingleArgumentGroupOfThisLength n (calledMeth: MethInfo) =
96939707
match calledMeth.NumArgs with
@@ -9722,7 +9736,7 @@ and UnifyMatchingSimpleArgumentTypes (cenv: cenv) (env: TcEnv) exprTy (calledMet
97229736
and TcMethodApplication_SplitSynArguments
97239737
(cenv: cenv)
97249738
(env: TcEnv)
9725-
tpenv
9739+
_tpenv
97269740
isProp
97279741
(candidates: MethInfo list)
97289742
(exprTy: OverallTy)
@@ -9750,7 +9764,7 @@ and TcMethodApplication_SplitSynArguments
97509764
else
97519765
unnamedCurriedCallerArgs, namedCurriedCallerArgs
97529766

9753-
let MakeUnnamedCallerArgInfo x = (x, GetNewInferenceTypeForMethodArg cenv env tpenv x, x.Range)
9767+
let MakeUnnamedCallerArgInfo x = (x, GetNewInferenceTypeForMethodArg cenv x, x.Range)
97549768

97559769
let singleMethodCurriedArgs =
97569770
match candidates with
@@ -9789,7 +9803,7 @@ and TcMethodApplication_SplitSynArguments
97899803
| _ ->
97909804
let unnamedCurriedCallerArgs = unnamedCurriedCallerArgs |> List.mapSquared MakeUnnamedCallerArgInfo
97919805
let namedCurriedCallerArgs = namedCurriedCallerArgs |> List.mapSquared (fun (isOpt, nm, x) ->
9792-
let ty = GetNewInferenceTypeForMethodArg cenv env tpenv x
9806+
let ty = GetNewInferenceTypeForMethodArg cenv x
97939807
// #435263: compiler crash with .net optional parameters and F# optional syntax
97949808
// named optional arguments should always have option type
97959809
// STRUCT OPTIONS: if we allow struct options as optional arguments then we should relax this and rely

0 commit comments

Comments
 (0)