Skip to content

Unused opens: extension member in namespace is ignored in analysis #11657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
auduchinok opened this issue Jun 9, 2021 · 0 comments
Open

Unused opens: extension member in namespace is ignored in analysis #11657

auduchinok opened this issue Jun 9, 2021 · 0 comments
Labels
Area-FCS Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone

Comments

@auduchinok
Copy link
Member

In the following code P1 extension is declared in a namespace, it's not allowed. The symbol is successfully resolved in another namespace (it's good for the tooling), but is not accounted in unused opens analysis.

namespace Ns1

type System.String with
    member this.P1 = 1

namespace Ns2

open Ns1

module Module =
    "".P1

open Ns1 is considered unused:

Screenshot 2021-06-09 at 16 29 26

Works as expected for extension in a module:

Screenshot 2021-06-09 at 16 29 43

@cartermp cartermp added Area-FCS Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. labels Jun 18, 2021
@cartermp cartermp added this to the Backlog milestone Jun 18, 2021
@vzarytovskii vzarytovskii moved this to Not Planned in F# Compiler and Tooling Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-FCS Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Projects
Status: New
Development

No branches or pull requests

2 participants