Skip to content

Type declaration isn't type checked when type inherits unknown type #5399

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 Jul 27, 2018 · 7 comments
Open
Assignees
Labels
Area-Diagnostics mistakes and possible improvements to diagnostics Feature Improvement
Milestone

Comments

@auduchinok
Copy link
Member

namespace ClassLibrary16

type T() =
    inherit Foo()

    let x = Some 123
    do
        match x with
        | Some n -> printfn "%s" n
        | _ -> ()
    
    member x.Bar() = 123

screen shot 2018-07-27 at 20 29 34

screen shot 2018-07-27 at 20 29 53

@cartermp cartermp added this to the 16.0 milestone Jul 29, 2018
@TIHan
Copy link
Contributor

TIHan commented Jul 30, 2018

Can you double check to make sure this isn't a tooling issue on your end? I'm not convinced this is a compiler issue yet because I don't see this behavior in VS:
untitled

@vasily-kirichenko
Copy link
Contributor

@TIHan You forget to comment or delete Foo class.

@auduchinok
Copy link
Member Author

@TIHan There's no Foo type declaration in the example.

@TIHan
Copy link
Contributor

TIHan commented Jul 31, 2018

I see. My mistake. I'm able to reproduce.
untitled
I also notice I lose highlighting.

Yes, this is a compiler issue.

@cartermp cartermp modified the milestones: 16.0, 16.1 Feb 21, 2019
@cartermp cartermp modified the milestones: 16.1, 16.2 Apr 23, 2019
@cartermp cartermp modified the milestones: 16.2, Backlog Apr 30, 2019
@dsyme dsyme added Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. labels Sep 1, 2020
@dsyme
Copy link
Contributor

dsyme commented Mar 31, 2022

This is another case of phased error reporting. These aren't considered bugs.

@dsyme dsyme closed this as completed Mar 31, 2022
@dsyme
Copy link
Contributor

dsyme commented Mar 31, 2022

I'll reopen this as feature improvement since actually checking the contents of the type would presumably give better tooling results.

@dsyme dsyme added Feature Improvement and removed Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. labels Mar 31, 2022
@dsyme dsyme reopened this Apr 1, 2022
@dsyme
Copy link
Contributor

dsyme commented Apr 1, 2022

Another repro: #5924

@dsyme dsyme added the Area-Diagnostics mistakes and possible improvements to diagnostics label Apr 1, 2022
@vzarytovskii vzarytovskii moved this to Not Planned in F# Compiler and Tooling Jun 17, 2022
@edgarfgp edgarfgp self-assigned this Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Diagnostics mistakes and possible improvements to diagnostics Feature Improvement
Projects
Status: New
Development

No branches or pull requests

7 participants