-
Notifications
You must be signed in to change notification settings - Fork 64
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
[BUG] Errors reported when using attribute (subtype) on indexed array #254
Comments
Isn't this fixed @Schottkyc137? On my side, it works today |
I still see the error on my side. Maybe a bit of background on why this is not an easy fix: foo(bar) should compile to.
However, for a quick fix; the example could also be written as type test_arr_t is array (natural range <>) of std_logic_vector(3 downto 0);
signal test_arr_sig: test_arr_t(3 downto 0);
signal test_sig: test_arr_sig'element := (others => '0'); for VHDL > 2008. The |
I also see the error and I'm using the latest version of VHDL-LS. The workaround that you've provided is cool though, didn't know that. |
Yea, something like that is definitely possible and will be implemented at some point. Note, however, that the example I gave is very simple. In a more general case, |
Yeah, I think any other resolving strategy will lead to something similar like a(n) interpreter/compiler which only adds more complexity and becomes just another GHDL/nvc. I guess for corner cases there could be an exception handling that somewhat does further analysis like seeing if the content within parentheses is valid though. |
Bug description:
Hi guys, the following errors are reported for the snippet below:
Expected '{identifier}'
andExpected 'library', 'use', 'context', 'entity', 'architecture', 'configuration' or 'package'
It seems to be that VHDL LS doesn't allow arrays be indexed when they're used as a type identifier. With the error itself I can live with but it also breaks the entire hovering over labels and stops to produce warning other stuffs.
The code works with Questa Sim 2022.4.
Code to reproduce the error:
Screenshots
The text was updated successfully, but these errors were encountered: