-
Notifications
You must be signed in to change notification settings - Fork 32
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
Appending to a slice of a struct #620
Comments
If I do the same thing with a point to the struct instead of the struct itself everything is fine. |
I am currently verifying a piece of code that uses slices of structs heavily, and the issue that @rayman2000 reported above still persists. Is there a plan to have full support of append in gobra anytime soon? |
@ti-m-o I've just pushed a fix for the type error that causes the stack trace posted by @rayman2000. gobra/src/main/scala/viper/gobra/translator/encodings/typeless/BuiltInEncoding.scala Lines 437 to 446 in 91344bb
In particular, we still require that the input slices |
Hi @ArquintL, thanks for the quick fix! |
It looks like appending a struct to a slice crashes Gobra. I was trying stuff out and the Gobra IDE kept crashing. I reduced it down to this fairly simple example.
Should this be a supported? If so we should fix it. If not then we should somehow have a more graceful way of failing.
Error message in the IDE:
Running Gobra manually gives the long and fairly unhelpful (at least for me) stacktrace:
The text was updated successfully, but these errors were encountered: