-
Notifications
You must be signed in to change notification settings - Fork 100
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
Support type casting for numeric values #252
Comments
Lossless integer casts (e.g. |
what about usize -> i32, that should be possible if we can ensure an upper bound on the value. |
That's not supported, but it should be easy to encode the cast as a pure Viper |
It's also easy to support numeric casts when overflow checks are disabled. It's matter of adding one branch to the |
Applying arithmetic operations and comparison between different numeric types should be allowed, e.g. ("#[ensures (result > 100 * i)]" if result is i32 and I is i32).
The text was updated successfully, but these errors were encountered: