Skip to content

Linter generates a false error with the select? statement #416

@simonecatenacci

Description

@simonecatenacci

Describe the bug
The vhdl default linter (VHDL-LS) generates an error with the select? statement.

select? statement is a uncommon but useful version of the select, introduced in VHDL 2008.
Which allows you to evaluate explicitly the don’t care (-), so It's useful to describe LUTs with don't care inputs.

References:

  • IEEE Std 1076-2008, IEEE Standard VHDL Language Reference Manual
  • Vivado Design Suite User Guide Synthesis, v2025.1
  • Circuit Design with VHDL Third Edition, Volnei A. Pedroni

To Reproduce

  1. Install VHDL-LS from
  2. Write a VHDL entity with a 'select?' statement

Code

library ieee;
use ieee.std_logic_1164.all;

entity test is
  port (
    in1  : in std_logic_vector(3 downto 0);
    out1 : out std_logic_vector(3 downto 0)
  );
end entity;

architecture behavioral of test is
begin
  with in1 select?
    out1 <= "0100" when "000-",
            "0101" when "0-10",
            "0110" when "1010",
            "0000" when others;
end architecture;

Generated error by VHDL-LS Linter:
Expected '{identifier}', '{character}', '{string}' or 'all'

Please complete the following information:

  • OS: Rocky Linux 9.6
  • VSCode version: 1.106.1
  • VHDL-LS version: 0.84.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions