fsharp
fsharp copied to clipboard
Opening namespace in module with multiline attributes puts the open into a wrong position (within attributes)
Repro steps
- Create a new project
- Paste
namespace X
open System
[<RequireQualifiedAccess;
CompiledName((nameof System.Collections.Immutable.ImmutableArray)
+ "Module")>]
module FlatList =
let a : KeyValuePair<string, int> = KeyValuePair<string, int>("key", 1)
- Put the cursor at
KeyValuePair - Press
Ctrl+.to trigger light bulb - Select opening the namespace in light bulb menu
- See
namespace X
open System
[<RequireQualifiedAccess;
CompiledName((nameof System.Collections.Immutable.ImmutableArray)
open System.Collections.Generic
+ "Module")>]
module FlatList =
let a : KeyValuePair<string, int> = KeyValuePair<string, int>("key", 1)
Expected behavior
namespace X
open System
open System.Collections.Generic
[<RequireQualifiedAccess;
CompiledName((nameof System.Collections.Immutable.ImmutableArray)
+ "Module")>]
module FlatList =
let a : KeyValuePair<string, int> = KeyValuePair<string, int>("key", 1)
Actual behavior
namespace X
open System
[<RequireQualifiedAccess;
CompiledName((nameof System.Collections.Immutable.ImmutableArray)
open System.Collections.Generic
+ "Module")>]
module FlatList =
let a : KeyValuePair<string, int> = KeyValuePair<string, int>("key", 1)
Known workarounds
Unknown
Related information
- .NET Core 9.0.300
- Visual Studio 17.14.4 Preview 1.0