Skip to content

Namespace open is incorrectly reported as redundant #18389

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
Lanayx opened this issue Mar 16, 2025 · 2 comments · May be fixed by #18510
Open

Namespace open is incorrectly reported as redundant #18389

Lanayx opened this issue Mar 16, 2025 · 2 comments · May be fixed by #18510
Labels
Area-LangService-CodeFixes Code fixes associated with diagnostics Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@Lanayx
Copy link
Contributor

Lanayx commented Mar 16, 2025

Image

Compiler doesn't recognize static method in auto-open type (source)

Image

Repro steps

  1. Create empty project
  2. Add Oxpecker.Solid nuget package
  3. Add the following code
open Oxpecker.Solid.Router // editor incorrectly suggest to remove this open

let test() =
    let nav = useNavigate()
    nav.Invoke("/")

Expected behavior

Open removal is not suggested

Actual behavior

Open removal is suggested

Known workarounds

Ignore the suggestion

Related information

.NET SDK:
 Version:           9.0.101
 Commit:            eedb237549
 Workload version:  9.0.100-manifests.4a280210
 MSBuild version:   17.12.12+1cce77968

This issue is reproduced both in Rider and Visual Studio.

@abonie
Copy link
Member

abonie commented Mar 17, 2025

I don't know Oxpecker, could it be a duplicate of #5306 or #16226 ?

@abonie abonie added Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. Area-LangService-CodeFixes Code fixes associated with diagnostics and removed Needs-Triage labels Mar 17, 2025
@Lanayx
Copy link
Contributor Author

Lanayx commented Mar 17, 2025

Might be somehow related, but doesn't look like a duplicate.

@brianrourkeboll brianrourkeboll linked a pull request Apr 26, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-CodeFixes Code fixes associated with diagnostics Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
Status: New
Development

Successfully merging a pull request may close this issue.

2 participants