-
Notifications
You must be signed in to change notification settings - Fork 183
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
zero!
should support parametric structs and arrays of structs
#984
Comments
zero!
should support parametric structs and arrays of structs
Re: #982 -- we generally don't want to introduce more backtracking into the parser as an implementation strategy, since it makes for bad error messages and slow parsing. I was hoping to restructure the grammar around types a bit, this is one of the first instances where we have parametric types so the grammar was a bit overfit for parametric-values-only. The test cases looked good though, maybe those can be used with a DISABLED_ and a TODO referencing this issue? See also related #904 |
Oh, and the workaround is to define a type alias and then use that as the parametric argument to |
This commit adds tests to improve `zero!<>()` coverage. Some tests are disabled (GH-google#984) Signed-off-by: Maciej Dudek <[email protected]>
I've created PR #985 with tests and disabled ones that don't work right now. I've also created draft PR #986 with a possible solution to parse parametric types.
As far as I can tell, using const array's fields was never allowed, so proposed solution doesn't break it. |
It's not blocking. There is workaround to pass any type to zero!<> using type definitions. |
This commit adds tests to improve `zero!<>()` coverage. Some tests are disabled (GH-google#984) Signed-off-by: Maciej Dudek <[email protected]>
+1. Just ran into this myself. In my case, the |
https://google.github.io/xls/dslx_reference/#zerot doesn't seems to work with parametric strucst and arrays of structs.
Is that a known limitation, are there possible workaround?
The text was updated successfully, but these errors were encountered: