Zokrates / ZoKrates

A toolbox for zkSNARKs on Ethereum
https://zokrates.github.io
GNU Lesser General Public License v3.0
1.81k stars 361 forks source link

Expected loop bounds to be constant #1306

Closed dark64 closed 1 year ago

dark64 commented 1 year ago

Description

Loop bounds are not propagated correctly

Environment

Steps to Reproduce

import "utils/casts/field_to_u32";

def main() {
    u32 bound = field_to_u32(2);
    for u32 i in 0..bound {
        log("{}", i);
    }
}

Error: Expected loop bounds to be constant, found 0..bound˙