Skip to content

Commit 6b46f7b

Browse files
authored
Merge pull request #270 from Numpsy/fcsbet10
FSharp.Compiler.Service 43.10
2 parents c2346f0 + f5bef66 commit 6b46f7b

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</PropertyGroup>
77
<ItemGroup>
88
<PackageVersion Include="CliWrap" Version="3.6.4" />
9-
<PackageVersion Include="FSharp.Core" Version="[9.0.300]" />
10-
<PackageVersion Include="FSharp.Compiler.Service" Version="[43.9.300]" />
9+
<PackageVersion Include="FSharp.Core" Version="[10.0.100]" />
10+
<PackageVersion Include="FSharp.Compiler.Service" Version="[43.10.100]" />
1111
<PackageVersion Include="Ionide.KeepAChangelog.Tasks" Version="0.3.0" PrivateAssets="all" />
1212
<PackageVersion Include="McMaster.NETCore.Plugins" Version="2.0.0" />
1313
<PackageVersion Include="Argu" Version="6.2.5" />

docs/content/Getting Started Writing.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The `FSharp.Analyzers.SDK` takes a dependency on [FSharp.Compiler.Service](https
3838
It is considered a best practice to use the correct `FSharp.Core` version and not the implicit one from the SDK.
3939
4040
```xml
41-
<PackageReference Update="FSharp.Core" Version="9.0.300" />
41+
<PackageReference Update="FSharp.Core" Version="10.0.100" />
4242
```
4343
4444
## First analyzer
@@ -80,7 +80,7 @@ let optionValueAnalyzer: Analyzer<CliContext> =
8080
Message = "Option.Value shouldn't be used"
8181
Code = "OV001"
8282
Severity = Severity.Warning
83-
Range = FSharp.Compiler.Text.Range.Zero
83+
Range = FSharp.Compiler.Text.Range.range0
8484
Fixes = []
8585
}
8686
]

src/FSharp.Analyzers.SDK.Testing/FSharp.Analyzers.SDK.Testing.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="FSharp.Compiler.Service"/>
20+
<PackageReference Include="FSharp.Compiler.Service" />
2121
<PackageReference Include="CliWrap" />
2222
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
2323
<PackageReference Include="MSBuild.StructuredLogger" />

src/FSharp.Analyzers.SDK/ASTCollecting.fs

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module ASTCollecting =
3636
| SynArgPats.Pats ps -> ps
3737
| SynArgPats.NamePatPairs(pats = xs) ->
3838
xs
39-
|> List.map (fun (_, _, pat) -> pat)
39+
|> List.map _.Pattern
4040

4141
type SyntaxCollectorBase() =
4242
abstract WalkSynModuleOrNamespace: path: SyntaxVisitorPath * SynModuleOrNamespace -> unit
@@ -425,9 +425,23 @@ module ASTCollecting =
425425
| SynExpr.TypeApp(expr = e; typeArgs = tys) ->
426426
List.iter (walkType nextPath) tys
427427
walkExpr nextPath e
428-
| SynExpr.LetOrUse(bindings = bindings; body = e; range = _) ->
428+
| SynExpr.LetOrUse(isBang = false; bindings = bindings; body = e; range = _) ->
429429
List.iter (walkBinding nextPath) bindings
430430
walkExpr nextPath e
431+
| SynExpr.LetOrUse(isBang = true; bindings = bindings; body = e2; range = _) ->
432+
match bindings with
433+
| SynBinding(headPat = pat; expr = e1) :: andBangs ->
434+
walkPat nextPath pat
435+
walkExpr nextPath e1
436+
437+
for SynBinding(headPat = pat; expr = body) in andBangs do
438+
walkPat nextPath pat
439+
walkExpr nextPath body
440+
441+
| [] -> // error case
442+
443+
walkExpr nextPath e2
444+
431445
| SynExpr.TryWith(tryExpr = e; withCases = clauses; range = _) ->
432446
List.iter (walkClause nextPath) clauses
433447
walkExpr nextPath e
@@ -475,15 +489,6 @@ module ASTCollecting =
475489
e1
476490
e2
477491
]
478-
| SynExpr.LetOrUseBang(pat = pat; rhs = e1; andBangs = ands; body = e2; range = _) ->
479-
walkPat nextPath pat
480-
walkExpr nextPath e1
481-
482-
for SynExprAndBang(pat = pat; body = body; range = _) in ands do
483-
walkPat nextPath pat
484-
walkExpr nextPath body
485-
486-
walkExpr nextPath e2
487492
| SynExpr.TraitCall(t, sign, e, _) ->
488493
walkType nextPath t
489494
walkMemberSig nextPath sign

0 commit comments

Comments
 (0)