Skip to content

Commit b4471a1

Browse files
authored
Pass SynPat.Typed nodes to original continuation. (#17510)
* Pass SynPat.Typed nodes to original continuation. * Add release note * Trigger CI
1 parent 15b5a6c commit b4471a1

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
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+
* 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))
89

910
### Added
1011

src/Compiler/Driver/GraphChecking/FileContentMapping.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ let visitPat (p: SynPat) : FileContentEntry list =
598598
match p with
599599
| NameofPat moduleNameIdent -> continuation [ visitNameofResult moduleNameIdent ]
600600
| SynPat.Paren(pat = pat) -> visit pat continuation
601-
| SynPat.Typed(pat = pat; targetType = t) -> visit pat (fun nodes -> nodes @ visitSynType t)
601+
| SynPat.Typed(pat = pat; targetType = t) -> visit pat (fun nodes -> nodes @ visitSynType t |> continuation)
602602
| SynPat.Const _ -> continuation []
603603
| SynPat.Wild _ -> continuation []
604604
| SynPat.Named _ -> continuation []

tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,4 +1022,24 @@ module Program =
10221022
"""
10231023
(set [| 0 |])
10241024
]
1025+
scenario
1026+
"fully qualified type in tuple constructor pattern"
1027+
[
1028+
sourceFile
1029+
"A.fs"
1030+
"""
1031+
namespace MyRootNamespace.A
1032+
1033+
type Foo() = class end
1034+
"""
1035+
Set.empty
1036+
sourceFile
1037+
"B.fs"
1038+
"""
1039+
namespace MyRootNamespace.A.B
1040+
1041+
type Bar(foo: MyRootNamespace.A.Foo, s: string) = class end
1042+
"""
1043+
(set [| 0 |])
1044+
]
10251045
]

0 commit comments

Comments
 (0)