We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The % operator cannot be applied to integer constants without explicit type annotation.
%
Minimal code to reproduce the issue
def main() { u32 a = 2 % 1; }
Compile with zokrates compile -i mod.zok, you would get the following error:
zokrates compile -i mod.zok
Compiling mod.zok Compilation failed: mod.zok:2:13 Cannot apply `%` to {integer}, {integer}
If you explicitly specify the types of the integer constants, the error would be gone:
def main() { u32 a = 2u32 % 1u32; }
The text was updated successfully, but these errors were encountered:
dark64
No branches or pull requests
Description
The
%
operator cannot be applied to integer constants without explicit type annotation.Environment
Steps to Reproduce
Minimal code to reproduce the issue
Compile with
zokrates compile -i mod.zok
, you would get the following error:If you explicitly specify the types of the integer constants, the error would be gone:
The text was updated successfully, but these errors were encountered: