Skip to content

Commit a15afa2

Browse files
authored
Merge branch 'main' into fix-10697
2 parents 4b22d90 + f78ce10 commit a15afa2

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Unsafe downcast from `obj` to generic `T` no longer requires `not null` constraint on `T`([Issue #18275](https://github.com/dotnet/fsharp/issues/18275), [PR #18343](https://github.com/dotnet/fsharp/pull/18343))
1717
* Fix "type inference problem too complicated" for SRTP with T:null and T:struct dummy constraint([Issue #18288](https://github.com/dotnet/fsharp/issues/18288), [PR #18345](https://github.com/dotnet/fsharp/pull/18345))
1818
* Fix for missing parse diagnostics in TransparentCompiler.ParseAndCheckProject ([PR #18366](https://github.com/dotnet/fsharp/pull/18366))
19-
* Miscellanous parentheses analyzer fixes. ([PR #18350](https://github.com/dotnet/fsharp/pull/18350))
19+
* Miscellanous parentheses analyzer fixes. ([PR #18350](https://github.com/dotnet/fsharp/pull/18350), [PR #18534](https://github.com/dotnet/fsharp/pull/18534))
2020
* Fix duplicate parse error reporting for GetBackgroundCheckResultsForFileInProject ([Issue #18379](https://github.com/dotnet/fsharp/issues/18379) [PR #18380](https://github.com/dotnet/fsharp/pull/18380))
2121
* Fix MethodDefNotFound when compiling code invoking delegate with option parameter ([Issue #5171](https://github.com/dotnet/fsharp/issues/5171), [PR #18385](https://github.com/dotnet/fsharp/pull/18385))
2222
* Fix #r nuget ..." downloads unneeded packages ([Issue #18231](https://github.com/dotnet/fsharp/issues/18231), [PR #18393](https://github.com/dotnet/fsharp/pull/18393))

src/Compiler/Service/SynExpr.fs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,14 @@ module SynExpr =
10781078
| SynExpr.Sequential(expr1 = SynExpr.Paren(expr = Is inner); expr2 = expr2), _ when innerBindingsWouldShadowOuter inner expr2 ->
10791079
true
10801080

1081+
// $"{({ A = 3 })}"
1082+
// $"{({| A = 3 |})}"
1083+
// $"{({1..10})}"
1084+
// $"{(();1)}"
1085+
// $"{(1,2)}"
1086+
| SynExpr.InterpolatedString _, SynExpr.Record _
1087+
| SynExpr.InterpolatedString _, SynExpr.AnonRecd _
1088+
| SynExpr.InterpolatedString _, SynExpr.ComputationExpr _
10811089
| SynExpr.InterpolatedString _, SynExpr.Sequential _
10821090
| SynExpr.InterpolatedString _, SynExpr.Tuple(isStruct = false) -> true
10831091

vsintegration/tests/FSharp.Editor.Tests/CodeFixes/RemoveUnnecessaryParenthesesTests.fs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,6 +1390,27 @@ in x
13901390
$"{3 + LanguagePrimitives.GenericZero<int> :N0}"
13911391
"""
13921392

1393+
"""
1394+
$"{({ A = 3 })}"
1395+
""",
1396+
"""
1397+
$"{({ A = 3 })}"
1398+
"""
1399+
1400+
"""
1401+
$"{({| A = 3 |})}"
1402+
""",
1403+
"""
1404+
$"{({| A = 3 |})}"
1405+
"""
1406+
1407+
"""
1408+
$"{({ 1..10 })}"
1409+
""",
1410+
"""
1411+
$"{({ 1..10 })}"
1412+
"""
1413+
13931414
// LibraryOnlyILAssembly
13941415
"""(# "ldlen.multi 2 0" array : int #)""", """(# "ldlen.multi 2 0" array : int #)"""
13951416

0 commit comments

Comments
 (0)