Skip to content
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

Internal error when using a type with collided name from another project #17828

Open
auduchinok opened this issue Oct 2, 2024 · 2 comments
Open
Labels
Area-Compiler-Checking Type checking, attributes and all aspects of logic checking Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@auduchinok
Copy link
Member

auduchinok commented Oct 2, 2024

This is likely the same cause as in #17827, however, the misleading error reported there should be fixed separately from this one, as this is likely about resolving references during the unpickling of the serialized F# metadata.

Consider this library project:

File1.fs:

namespace Ns.TypeName

File2.fs:

namespace Ns

type TypeName = { Field: int }

module Module =
    let f (tn: TypeName) = ()

Reference this project from the following console app one:

module Ns.Another

Module.f null

There's an internal error when trying to use the function that uses the type:

Screenshot 2024-10-02 at 10 55 48

Here's the repro project: SameNameNamespaceType.zip.

@edgarfgp
Copy link
Contributor

edgarfgp commented Oct 2, 2024

Similar to #16970

@auduchinok
Copy link
Member Author

Similar to #16970

Yes, indeed, thanks! However, these might still be separate issues in the code.

@abonie abonie added Area-Compiler-Checking Type checking, attributes and all aspects of logic checking Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. and removed Needs-Triage labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compiler-Checking Type checking, attributes and all aspects of logic checking Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
Status: New
Development

No branches or pull requests

3 participants