-
Notifications
You must be signed in to change notification settings - Fork 116
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
Type check error with recent dev Sail #611
Comments
It isn't that xlen has become 2, it's because for an Prior to that commit, Sail would look at all the definitions and if any had the same name as one of the default enum conversion functions it would just silently skip generating these functions. I wanted to move away from that as it's a very global check that makes it hard to check things incrementally per-file (which is where I want to be for future LSP support). I think because your function is defined in the same file I can make it work. I want to make it so you can do something like
or
and be more explicit in the future. |
OK, thanks for the explanation. I guess we could also rename the function so it doesn't conflict with the automatic generation. Maybe the generated ones should have a prefix like |
Should be fixed by c057bfb which restores the previous behaviour, but with a warning. The number conversion functions are intended to be used as a convenience, so I don't think they should be prefixed with an underscore. I think we just need to have more documentation and be a bit more explicit about what is going on. |
I've been writing the manual section on enumerations recently, so it should be better documented soon. |
It would be good to have a single list of all the functions that Sail automatically generates somewhere in the manual. I.e.
Are there any more? |
As per CHERIoT-Platform/cheriot-sail#56 recent dev versions of Sail have started to give an odd type check failure compiling the CHERIoT sail model. It looks like this might be common to
sail-riscv
although I haven't tried. The following extract is sufficient to reproduce:sail -c
then says:Not sure why
xlen
has become 2 rather than 32.Git bisect points the finger at ce27f52 .
The text was updated successfully, but these errors were encountered: