Skip to content

Commit

Permalink
Add regression test for unused open. (#16228)
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf authored Nov 6, 2023
1 parent 70bd177 commit 046ff38
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/FSharp.Compiler.ComponentTests/TypeChecks/Graph/Scenarios.fs
Original file line number Diff line number Diff line change
Expand Up @@ -772,4 +772,32 @@ type DiGraph = obj
"""
(set [| 0 |])
]
scenario
"Unused namespace should be detected"
[
sourceFile
"File1.fs"
"""
namespace My.Great.Namespace
"""
Set.empty

sourceFile
"File2.fs"
"""
namespace My.Great.Namespace
open My.Great.Namespace
type Foo = class end
"""
(set [| 0 |])

sourceFile
"Program"
"""
printfn "Hello"
"""
Set.empty
]
]

0 comments on commit 046ff38

Please sign in to comment.