Skip to content

[BUG] No warning reported when using a record element accessed via record's type name as type #387

Open
@nselvara

Description

@nselvara

Bug description:

Hi there,
Related to the MRE in this issue: #386

When declaring a signal or variable using a record element accessed via the record type name, VHDL LS currently does not issue any warning - even though such usage is invalid in standard VHDL and rejected by synthesis/simulation tools.

This may lead to situations where the LSP assumes the accessed type element is valid, but downstream tools later reject the design - defeating the purpose of early validation and feedback.


Expected behaviour:
The analyser should issue a warning something like this:

The record element cannot be used directly as a type vhdl_ls(illegal_type_reference)


Minimal reproducible example (MRE):

architecture beh of data_acquisition_wrapper is
    type test_t is record
        slv: std_ulogic_vector(2 downto 0);
        sl: std_ulogic;
        bool: boolean;
    end record;

    -- These don't emit a warning
    signal slv_test: test_t.slv;
    signal sl_test: test_t.sl;
    signal bool_test: test_t.bool;
begin
end architecture;

Thanks again for your awesome work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions