Skip to content

Commit dae3c9a

Browse files
authored
Merge branch 'main' into async2
2 parents 6fb94a3 + 1ff7cb1 commit dae3c9a

39 files changed

+747
-206
lines changed

DEVGUIDE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,49 @@ Running tests:
102102

103103
You can then open `FSharp.sln` in your editor of choice.
104104

105+
## Working with non-released .NET SDKs
106+
107+
This repository may require a non-released version of the .NET SDK, as specified in the `global.json` file. When the required SDK version is not publicly available through normal channels, you may encounter an error when running `dotnet build` directly:
108+
109+
```
110+
The .NET SDK could not be found, please run ./eng/common/dotnet.sh.
111+
```
112+
113+
### Setting up the correct SDK
114+
115+
Before using plain `dotnet build` commands, you need to install the required SDK version locally:
116+
117+
**On Linux/macOS:**
118+
```shell
119+
./eng/common/dotnet.sh
120+
```
121+
122+
**On Windows:**
123+
```shell
124+
.\eng\common\dotnet.cmd
125+
```
126+
127+
This downloads and installs the correct SDK version to a local `.dotnet` directory in the repository root.
128+
129+
### Using dotnet commands with the local SDK
130+
131+
After running the setup script once to install the SDK, you can use regular `dotnet` commands normally:
132+
133+
1. **One-time SDK installation**:
134+
```shell
135+
# Linux/macOS
136+
./eng/common/dotnet.sh
137+
138+
# Windows
139+
.\eng\common\dotnet.cmd
140+
```
141+
142+
2. **Regular dotnet commands** (after SDK installation):
143+
```shell
144+
dotnet build FSharp.Compiler.Service.sln
145+
dotnet test tests/FSharp.Compiler.Service.Tests/
146+
```
147+
105148
## Testing from the command line
106149

107150
You can find all test options as separate flags. For example `build -testAll`:

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
* Scripts: Fix resolving the dotnet host path when an SDK directory is specified. ([PR #18960](https://github.com/dotnet/fsharp/pull/18960))
44
* Fix excessive StackGuard thread jumping ([PR #18971](https://github.com/dotnet/fsharp/pull/18971))
5+
* Checking: Fix checking nested fields for records and anonymous ([PR #18964](https://github.com/dotnet/fsharp/pull/18964))
6+
* Fix name is bound multiple times is not reported in 'as' pattern ([PR #18984](https://github.com/dotnet/fsharp/pull/18984))
7+
* Type relations cache: handle potentially "infinite" types ([PR #19010](https://github.com/dotnet/fsharp/pull/19010))
58

69
### Added
710

eng/Version.Details.props

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,26 @@ This file should be imported by eng/Versions.props
66
<Project>
77
<PropertyGroup>
88
<!-- dotnet/msbuild dependencies -->
9-
<MicrosoftBuildPackageVersion>18.1.0-preview-25509-03</MicrosoftBuildPackageVersion>
10-
<MicrosoftBuildFrameworkPackageVersion>18.1.0-preview-25509-03</MicrosoftBuildFrameworkPackageVersion>
11-
<MicrosoftBuildTasksCorePackageVersion>18.1.0-preview-25509-03</MicrosoftBuildTasksCorePackageVersion>
12-
<MicrosoftBuildUtilitiesCorePackageVersion>18.1.0-preview-25509-03</MicrosoftBuildUtilitiesCorePackageVersion>
9+
<MicrosoftBuildPackageVersion>18.1.0-preview-25515-01</MicrosoftBuildPackageVersion>
10+
<MicrosoftBuildFrameworkPackageVersion>18.1.0-preview-25515-01</MicrosoftBuildFrameworkPackageVersion>
11+
<MicrosoftBuildTasksCorePackageVersion>18.1.0-preview-25515-01</MicrosoftBuildTasksCorePackageVersion>
12+
<MicrosoftBuildUtilitiesCorePackageVersion>18.1.0-preview-25515-01</MicrosoftBuildUtilitiesCorePackageVersion>
1313
<!-- dotnet/runtime dependencies -->
1414
<SystemCollectionsImmutablePackageVersion>9.0.0</SystemCollectionsImmutablePackageVersion>
1515
<SystemComponentModelCompositionPackageVersion>9.0.0</SystemComponentModelCompositionPackageVersion>
1616
<SystemCompositionPackageVersion>9.0.0</SystemCompositionPackageVersion>
1717
<SystemDiagnosticsDiagnosticSourcePackageVersion>9.0.0</SystemDiagnosticsDiagnosticSourcePackageVersion>
1818
<SystemReflectionMetadataPackageVersion>9.0.0</SystemReflectionMetadataPackageVersion>
1919
<SystemThreadingTasksDataflowPackageVersion>9.0.0</SystemThreadingTasksDataflowPackageVersion>
20+
<!-- dotnet/roslyn dependencies -->
21+
<MicrosoftCodeAnalysisPackageVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisPackageVersion>
22+
<MicrosoftCodeAnalysisCompilersPackageVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisCompilersPackageVersion>
23+
<MicrosoftCodeAnalysisCSharpPackageVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisCSharpPackageVersion>
24+
<MicrosoftCodeAnalysisEditorFeaturesPackageVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisEditorFeaturesPackageVersion>
25+
<MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion>
26+
<MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion>
27+
<MicrosoftCodeAnalysisFeaturesPackageVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisFeaturesPackageVersion>
28+
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.0.0-2.25480.7</MicrosoftVisualStudioLanguageServicesPackageVersion>
2029
<!-- dotnet/arcade dependencies -->
2130
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.25509.1</MicrosoftDotNetArcadeSdkPackageVersion>
2231
<!-- _git/dotnet-optimization dependencies -->
@@ -40,6 +49,15 @@ This file should be imported by eng/Versions.props
4049
<SystemDiagnosticsDiagnosticSourceVersion>$(SystemDiagnosticsDiagnosticSourcePackageVersion)</SystemDiagnosticsDiagnosticSourceVersion>
4150
<SystemReflectionMetadataVersion>$(SystemReflectionMetadataPackageVersion)</SystemReflectionMetadataVersion>
4251
<SystemThreadingTasksDataflowVersion>$(SystemThreadingTasksDataflowPackageVersion)</SystemThreadingTasksDataflowVersion>
52+
<!-- dotnet/roslyn dependencies -->
53+
<MicrosoftCodeAnalysisVersion>$(MicrosoftCodeAnalysisPackageVersion)</MicrosoftCodeAnalysisVersion>
54+
<MicrosoftCodeAnalysisCompilersVersion>$(MicrosoftCodeAnalysisCompilersPackageVersion)</MicrosoftCodeAnalysisCompilersVersion>
55+
<MicrosoftCodeAnalysisCSharpVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisCSharpVersion>
56+
<MicrosoftCodeAnalysisEditorFeaturesVersion>$(MicrosoftCodeAnalysisEditorFeaturesPackageVersion)</MicrosoftCodeAnalysisEditorFeaturesVersion>
57+
<MicrosoftCodeAnalysisEditorFeaturesTextVersion>$(MicrosoftCodeAnalysisEditorFeaturesTextPackageVersion)</MicrosoftCodeAnalysisEditorFeaturesTextVersion>
58+
<MicrosoftCodeAnalysisExternalAccessFSharpVersion>$(MicrosoftCodeAnalysisExternalAccessFSharpPackageVersion)</MicrosoftCodeAnalysisExternalAccessFSharpVersion>
59+
<MicrosoftCodeAnalysisFeaturesVersion>$(MicrosoftCodeAnalysisFeaturesPackageVersion)</MicrosoftCodeAnalysisFeaturesVersion>
60+
<MicrosoftVisualStudioLanguageServicesVersion>$(MicrosoftVisualStudioLanguageServicesPackageVersion)</MicrosoftVisualStudioLanguageServicesVersion>
4361
<!-- dotnet/arcade dependencies -->
4462
<MicrosoftDotNetArcadeSdkVersion>$(MicrosoftDotNetArcadeSdkPackageVersion)</MicrosoftDotNetArcadeSdkVersion>
4563
<!-- _git/dotnet-optimization dependencies -->

eng/Version.Details.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
3-
<Source Uri="https://github.com/dotnet/dotnet" Mapping="fsharp" Sha="64d877a07af8c020fe9da6e721bc2258894f31ee" BarId="286279" />
3+
<Source Uri="https://github.com/dotnet/dotnet" Mapping="fsharp" Sha="01abb3ec5c4cbffec5b33e02156bd3d2a8913b04" BarId="286825" />
44
<ProductDependencies>
5-
<Dependency Name="Microsoft.Build" Version="18.1.0-preview-25509-03">
5+
<Dependency Name="Microsoft.Build" Version="18.1.0-preview-25515-01">
66
<Uri>https://github.com/dotnet/msbuild</Uri>
7-
<Sha>e0ef001649e4948f10148dbd1e2d30db401054f1</Sha>
7+
<Sha>5e273ccd45ba73d9db9b34fceaf9a110412e64e8</Sha>
88
</Dependency>
9-
<Dependency Name="Microsoft.Build.Framework" Version="18.1.0-preview-25509-03">
9+
<Dependency Name="Microsoft.Build.Framework" Version="18.1.0-preview-25515-01">
1010
<Uri>https://github.com/dotnet/msbuild</Uri>
11-
<Sha>e0ef001649e4948f10148dbd1e2d30db401054f1</Sha>
11+
<Sha>5e273ccd45ba73d9db9b34fceaf9a110412e64e8</Sha>
1212
</Dependency>
13-
<Dependency Name="Microsoft.Build.Tasks.Core" Version="18.1.0-preview-25509-03">
13+
<Dependency Name="Microsoft.Build.Tasks.Core" Version="18.1.0-preview-25515-01">
1414
<Uri>https://github.com/dotnet/msbuild</Uri>
15-
<Sha>e0ef001649e4948f10148dbd1e2d30db401054f1</Sha>
15+
<Sha>5e273ccd45ba73d9db9b34fceaf9a110412e64e8</Sha>
1616
</Dependency>
17-
<Dependency Name="Microsoft.Build.Utilities.Core" Version="18.1.0-preview-25509-03">
17+
<Dependency Name="Microsoft.Build.Utilities.Core" Version="18.1.0-preview-25515-01">
1818
<Uri>https://github.com/dotnet/msbuild</Uri>
19-
<Sha>e0ef001649e4948f10148dbd1e2d30db401054f1</Sha>
19+
<Sha>5e273ccd45ba73d9db9b34fceaf9a110412e64e8</Sha>
2020
</Dependency>
2121
<Dependency Name="System.Reflection.Metadata" Version="9.0.0">
2222
<Uri>https://github.com/dotnet/runtime</Uri>

eng/Versions.props

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<FSharpCorePreviewPackageVersionValue>$(FSCorePackageVersionValue)-$(PreReleaseVersionLabel).*</FSharpCorePreviewPackageVersionValue>
4747
<!-- -->
4848
<!-- FSharp tools for Visual Studio version number -->
49-
<FSToolsMajorVersion>14</FSToolsMajorVersion>
49+
<FSToolsMajorVersion>15</FSToolsMajorVersion>
5050
<FSToolsMinorVersion>0</FSToolsMinorVersion>
5151
<FSToolsBuildVersion>$(FSBuildVersion)</FSToolsBuildVersion>
5252
<FSToolsRevisionVersion>$(FSRevisionVersion)</FSToolsRevisionVersion>
@@ -99,15 +99,10 @@
9999
<VisualStudioShellProjectsPackages>18.0.2077-preview.1</VisualStudioShellProjectsPackages>
100100
<MicrosoftVisualStudioThreadingPackagesVersion>18.0.5</MicrosoftVisualStudioThreadingPackagesVersion>
101101

102-
<!-- Roslyn packages -->
103-
<MicrosoftCodeAnalysisEditorFeaturesTextVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisEditorFeaturesTextVersion>
104-
<MicrosoftCodeAnalysisExternalAccessFSharpVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisExternalAccessFSharpVersion>
105-
<MicrosoftCodeAnalysisVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisVersion>
106-
<MicrosoftCodeAnalysisCSharpVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisCSharpVersion>
107-
<MicrosoftVisualStudioLanguageServicesVersion>5.0.0-2.25480.7</MicrosoftVisualStudioLanguageServicesVersion>
102+
<!-- Roslyn packages. Rest is managed by maestro bot and is in the imported .Details.props file -->
108103
<MicrosoftCodeAnalysisTestResourcesProprietaryVersion>2.0.28</MicrosoftCodeAnalysisTestResourcesProprietaryVersion>
109-
<!-- Roslyn for when we need to compile C# in tests. .dll hell caused by vstest makes newer version fail at runtime -->
110-
<RoslynForTestingButNotForVSLayer>4.14.0</RoslynForTestingButNotForVSLayer>
104+
<!-- Roslyn for when we need to compile C# in tests. .dll hell caused by vstest makes newer version fail at runtime -->
105+
<RoslynForTestingButNotForVSLayer>4.14.0</RoslynForTestingButNotForVSLayer>
111106
<!-- -->
112107
<!-- Visual Studio Shell packages -->
113108
<MicrosoftVisualStudioInteropVersion>$(MicrosoftVisualStudioShellPackagesVersion)</MicrosoftVisualStudioInteropVersion>

src/Compiler/Checking/CheckBasics.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ type TcFileState =
319319
TcPat: WarnOnUpperFlag -> TcFileState -> TcEnv -> PrelimValReprInfo option -> TcPatValFlags -> TcPatLinearEnv -> TType -> SynPat -> (TcPatPhase2Input -> Pattern) * TcPatLinearEnv
320320

321321
// forward call
322-
TcSimplePats: TcFileState -> bool -> CheckConstraints -> TType -> TcEnv -> TcPatLinearEnv -> SynSimplePats -> string list * TcPatLinearEnv
322+
TcSimplePats: TcFileState -> bool -> CheckConstraints -> TType -> TcEnv -> TcPatLinearEnv -> SynSimplePats -> SynPat list * bool -> string list * TcPatLinearEnv
323323

324324
// forward call
325325
TcSequenceExpressionEntry: TcFileState -> TcEnv -> OverallTy -> UnscopedTyparEnv -> bool * SynExpr -> range -> Expr * UnscopedTyparEnv

src/Compiler/Checking/CheckBasics.fsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ type TcFileState =
295295
-> TcEnv
296296
-> TcPatLinearEnv
297297
-> SynSimplePats
298+
// SynPat list: Represents parsed patterns,
299+
// bool: Indicates if this is the first pattern in a sequence of patterns
300+
-> SynPat list * bool
298301
-> string list * TcPatLinearEnv
299302

300303
// forward call
@@ -345,6 +348,7 @@ type TcFileState =
345348
-> TcEnv
346349
-> TcPatLinearEnv
347350
-> SynSimplePats
351+
-> SynPat list * bool
348352
-> string list * TcPatLinearEnv) *
349353
tcSequenceExpressionEntry:
350354
(TcFileState -> TcEnv -> OverallTy -> UnscopedTyparEnv -> bool * SynExpr -> range -> Expr * UnscopedTyparEnv) *

src/Compiler/Checking/CheckPatterns.fs

Lines changed: 67 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -145,47 +145,84 @@ and ValidateOptArgOrder (synSimplePats: SynSimplePats) =
145145
List.iter (fun pat -> if isOptArg pat then hitOptArg <- true elif hitOptArg then error(Error(FSComp.SR.tcOptionalArgsMustComeAfterNonOptionalArgs(), m))) pats
146146

147147

148-
/// Bind the patterns used in argument position for a function, method or lambda.
149-
and TcSimplePats (cenv: cenv) optionalArgsOK checkConstraints ty env patEnv synSimplePats =
148+
/// Bind the patterns used in the argument position for a function, method or lambda.
149+
and TcSimplePats (cenv: cenv) optionalArgsOK checkConstraints ty env patEnv synSimplePats (parsedPatterns: SynPat list * bool) =
150150

151-
let g = cenv.g
152-
let (TcPatLinearEnv(tpenv, names, takenNames)) = patEnv
153-
154-
// validate optional argument declaration
151+
let rec collectBoundIdTextsFromPat (acc: string list) (p: SynPat) : string list =
152+
match p with
153+
| SynPat.FromParseError(p, _)
154+
| SynPat.Paren(p, _) -> collectBoundIdTextsFromPat acc p
155+
| SynPat.Tuple(_, ps, _, _)
156+
| SynPat.ArrayOrList(_, ps, _) -> List.fold collectBoundIdTextsFromPat acc ps
157+
| SynPat.As(lhs, rhs, _) -> collectBoundIdTextsFromPat (collectBoundIdTextsFromPat acc lhs) rhs
158+
| SynPat.Named(SynIdent(id, _), _, _, _)
159+
| SynPat.OptionalVal(id, _) -> id.idText :: acc
160+
| SynPat.LongIdent(argPats = SynArgPats.Pats ps) -> List.fold collectBoundIdTextsFromPat acc ps
161+
| SynPat.Or(p1, p2, _, _) -> collectBoundIdTextsFromPat (collectBoundIdTextsFromPat acc p1) p2
162+
| SynPat.Ands(pats, _) -> List.fold collectBoundIdTextsFromPat acc pats
163+
| SynPat.Record(fieldPats = fields) ->
164+
(acc, fields)
165+
||> List.fold (fun acc (NamePatPairField(_, _, _, pat, _)) -> collectBoundIdTextsFromPat acc pat)
166+
| SynPat.ListCons(lhsPat = l; rhsPat = r) -> collectBoundIdTextsFromPat (collectBoundIdTextsFromPat acc l) r
167+
| _ -> acc
168+
169+
let augmentTakenNamesFromFirstGroup (parsedData: SynPat list * bool) (patEnvOut: TcPatLinearEnv) : TcPatLinearEnv =
170+
match parsedData, patEnvOut with
171+
| (pats ,true), TcPatLinearEnv(tpenvR, namesR, takenNamesR) ->
172+
match pats with
173+
| pat :: _ ->
174+
let extra = collectBoundIdTextsFromPat [] pat |> Set.ofList
175+
TcPatLinearEnv(tpenvR, namesR, Set.union takenNamesR extra)
176+
| _ -> patEnvOut
177+
| _ -> patEnvOut
178+
179+
let bindCurriedGroup (synSimplePats: SynSimplePats) : string list * TcPatLinearEnv =
180+
let g = cenv.g
181+
let (TcPatLinearEnv(tpenv, names, takenNames)) = patEnv
182+
match synSimplePats with
183+
| SynSimplePats.SimplePats ([], _, m) ->
184+
// Unit "()" patterns in argument position become SynSimplePats.SimplePats([], _) in the
185+
// syntactic translation when building bindings. This is done because the
186+
// use of "()" has special significance for arity analysis and argument counting.
187+
//
188+
// Here we give a name to the single argument implied by those patterns.
189+
// This is a little awkward since it would be nice if this was
190+
// uniform with the process where we give names to other (more complex)
191+
// patterns used in argument position, e.g. "let f (D(x)) = ..."
192+
let id = ident("unitVar" + string takenNames.Count, m)
193+
UnifyTypes cenv env m ty g.unit_ty
194+
let vFlags = TcPatValFlags (ValInline.Optional, permitInferTypars, noArgOrRetAttribs, false, None, true)
195+
let _, namesR, takenNamesR = TcPatBindingName cenv env id ty false None None vFlags (names, takenNames)
196+
[ id.idText ], TcPatLinearEnv(tpenv, namesR, takenNamesR)
197+
| SynSimplePats.SimplePats ([sp], _, _) ->
198+
// Single parameter: no tuple splitting, check directly
199+
let v, patEnv' = TcSimplePat optionalArgsOK checkConstraints cenv ty env patEnv sp []
200+
[ v ], patEnv'
201+
| SynSimplePats.SimplePats (ps, _, m) ->
202+
// Multiple parameters: treat a domain type as a ref-tuple and map each simple pat
203+
let ptys = UnifyRefTupleType env.eContextInfo cenv env.DisplayEnv m ty ps
204+
let namesOut, patEnvR =
205+
(patEnv, List.zip ptys ps)
206+
||> List.mapFold (fun penv (pty, sp) -> TcSimplePat optionalArgsOK checkConstraints cenv pty env penv sp [])
207+
namesOut, patEnvR
208+
209+
// 1) validate optional-arg ordering
155210
ValidateOptArgOrder synSimplePats
156211

157-
match synSimplePats with
158-
| SynSimplePats.SimplePats ([],_, m) ->
159-
// Unit "()" patterns in argument position become SynSimplePats.SimplePats([], _) in the
160-
// syntactic translation when building bindings. This is done because the
161-
// use of "()" has special significance for arity analysis and argument counting.
162-
//
163-
// Here we give a name to the single argument implied by those patterns.
164-
// This is a little awkward since it would be nice if this was
165-
// uniform with the process where we give names to other (more complex)
166-
// patterns used in argument position, e.g. "let f (D(x)) = ..."
167-
let id = ident("unitVar" + string takenNames.Count, m)
168-
UnifyTypes cenv env m ty g.unit_ty
169-
let vFlags = TcPatValFlags (ValInline.Optional, permitInferTypars, noArgOrRetAttribs, false, None, true)
170-
let _, namesR, takenNamesR = TcPatBindingName cenv env id ty false None None vFlags (names, takenNames)
171-
let patEnvR = TcPatLinearEnv(tpenv, namesR, takenNamesR)
172-
[id.idText], patEnvR
212+
// 2) bind the current curried group
213+
let namesOut, patEnvOut = bindCurriedGroup synSimplePats
173214

174-
| SynSimplePats.SimplePats (pats = [synSimplePat]) ->
175-
let v, patEnv = TcSimplePat optionalArgsOK checkConstraints cenv ty env patEnv synSimplePat []
176-
[v], patEnv
215+
// 3) post-augment takenNames for later groups (using the original first-group pattern)
216+
let patEnvOut = augmentTakenNamesFromFirstGroup parsedPatterns patEnvOut
177217

178-
| SynSimplePats.SimplePats (ps, _, m) ->
179-
let ptys = UnifyRefTupleType env.eContextInfo cenv env.DisplayEnv m ty ps
180-
let ps', patEnvR = (patEnv, List.zip ptys ps) ||> List.mapFold (fun patEnv (ty, pat) -> TcSimplePat optionalArgsOK checkConstraints cenv ty env patEnv pat [])
181-
ps', patEnvR
218+
namesOut, patEnvOut
182219

183220
and TcSimplePatsOfUnknownType (cenv: cenv) optionalArgsOK checkConstraints env tpenv (pat: SynPat) =
184221
let g = cenv.g
185222
let argTy = NewInferenceType g
186223
let patEnv = TcPatLinearEnv (tpenv, NameMap.empty, Set.empty)
187224
let spats, _ = SimplePatsOfPat cenv.synArgNameGenerator pat
188-
let names, patEnv = TcSimplePats cenv optionalArgsOK checkConstraints argTy env patEnv spats
225+
let names, patEnv = TcSimplePats cenv optionalArgsOK checkConstraints argTy env patEnv spats ([], false)
189226
names, patEnv, spats
190227

191228
and TcPatBindingName cenv env id ty isMemberThis vis1 valReprInfo (vFlags: TcPatValFlags) (names, takenNames: Set<string>) =

src/Compiler/Checking/CheckPatterns.fsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ val TcSimplePats:
3939
env: TcEnv ->
4040
patEnv: TcPatLinearEnv ->
4141
synSimplePats: SynSimplePats ->
42+
parsedPatterns: SynPat list * bool ->
4243
string list * TcPatLinearEnv

0 commit comments

Comments
 (0)