Skip to content

[BUG] No warning reported when a function/procedure has been declared but not defined yet in protected type #381

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
nselvara opened this issue May 2, 2025 · 0 comments
Labels
enhancement New feature or request VHDL Relates to the language front-end for VHDL

Comments

@nselvara
Copy link

nselvara commented May 2, 2025

Bug description:

Hi there,
Another day, another VHDL LS bug 😅

Currently, no warning is reported when a function or procedure is declared but not defined inside a protected type. This should ideally trigger a diagnostic, since such declarations are incomplete and can break tools that rely on fully defined protected types.

This may lead to situations where the LSP assumes the protected type is valid, but simulation or synthesis tools will later reject it - defeating the purpose of early linting and validation.

Thanks again for your awesome work!


Minimal Reproducible Example (MRE):

library ieee;
use ieee.std_logic_1164.all;

package my_pkg is
    type my_protected_type is protected
        procedure do_something;
    end protected my_protected_type;
end package my_pkg;

package body my_pkg is
    type my_protected_type is protected body
        -- Missing definition of 'do_something'
        -- This should raise a warning or error
    end protected body my_protected_type;
end package body my_pkg;

Expected:
A warning or error like:

Procedure 'do_something' declared in protected type but not defined in protected body. vhdl ls(missing_in_sensitivity_list)

Actual:
No diagnostics at all - VHDL LS considers the file clean.

@Schottkyc137 Schottkyc137 added enhancement New feature or request VHDL Relates to the language front-end for VHDL labels May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request VHDL Relates to the language front-end for VHDL
Projects
None yet
Development

No branches or pull requests

2 participants