[DSLX] Improve type handling in parametrics#986
Conversation
This commit adds tests to improve `zero!<>()` coverage. Some tests are disabled (GH-google#984) Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
Some buildins like `zero!` did not work with parametric structs and with arrays of structs. ParseParametrics returns TypeAnnotation only if token is a buildin type. In all other cases identifiers are expected to resolve to TypeRef or constant values. This commit changes ParseParametrics to allow for parametric structs and struct arrays types. This change only extends Parser capabiliteis. Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
|
is that ready to review? is that blocking #994? |
|
@tmichalak can you confirm if this is still needed? |
So, the zero! macro is still limited and you cannot use parametric structs with it. Currently, as a workaround you need to define a type alias that renames a parametric type to a new one without explicit parameters, therefore having a more advanced zero! macro would be useful. |
is that already captured as an issue? |
Yes, there is this one, but I guess that looking at the comment and workaround we might need to stick to the workaround for the time being. |
|
This PR has been open without change for 1 year. Can it be closed? |
|
Closing due to lack of activity and obsolescence. |
Some buildins like
zero!did not work withparametric structs and with arrays of structs.
ParseParametrics returns TypeAnnotation only if
token is a buildin type. In all other cases
identifiers are expected to resolve to TypeRef or
constant values.
This commit changes ParseParametrics to allow for
parametric structs and struct arrays types.
This change only extends Parser capabiliteis.
Signed-off-by: Maciej Dudek mdudek@antmicro.com