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

Fix interface view package mismatch #334

Merged

Conversation

Schottkyc137
Copy link
Contributor

Closes #324

Previously, instantiating a package unconditionally mapped all types. This is problematic for situations like the following:

package foo is
    generic (...);

    type foo is record
        ...
    end record foo;
    
    view bar of foo is
        ...
    end view bar;
end package foo;

Since foo is used as subtype, instantiating that package would also map foo and implicitly declare two foos that are not compatible.

This PR fixes these issues by also including the current scope and taking values from the current scope where applicable (instead of mapping the type).

@Schottkyc137 Schottkyc137 merged commit 3b91037 into VHDL-LS:master Aug 18, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vhdl-ls incorrectly shows type mismatch when using interfaces, views and package generics
1 participant