Skip to content

Visual Studio incorrectly suggests "Open declaration can be removed" #3306

Closed
@nikonthethird

Description

@nikonthethird

Visual Studio 2017 with the latest Updates shows "Open declaration can be removed" suggestion even when a type from the opened module is used.

Repro steps

Put the following code into an .fsx file and open it in Visual Studio. The line open DeclaresA will be grayed out.

module DeclaresA =
    type A = class end

module UsesA =
    open DeclaresA

    let a = Unchecked.defaultof<A>

Image

Expected behavior

It should not be grayed out.

Actual behavior

It is grayed out, the tooling thinks nothing of the opened module is used.

Known workarounds

Since it is just a suggestion, simply ignoring it works.

Related information

  • Windows 10
  • .NET 4.5
  • Visual Studio 2017 with all Updates installed

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions