Skip to content

Commit

Permalink
Add scenarios where parentheses are around module name.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Jan 18, 2024
1 parent 506eef0 commit fb4e72e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,36 @@ do
match "" with
| nameof Foo -> ()
| _ -> ()
"""
(set [| 0 |])
]
scenario
"parentheses around module name in nameof pattern"
[
sourceFile "A.fs" "module Foo" Set.empty
sourceFile
"B.fs"
"""
module Bar
do
match "" with
| nameof ((Foo)) -> ()
| _ -> ()
"""
(set [| 0 |])
]

scenario
"parentheses around module name in nameof expression"
[
sourceFile "A.fs" "module Foo" Set.empty
sourceFile
"B.fs"
"""
module Bar
let _ = nameof ((Foo))
"""
(set [| 0 |])
]
Expand Down

0 comments on commit fb4e72e

Please sign in to comment.