Zokrates / ZoKrates

A toolbox for zkSNARKs on Ethereum

Home Page:https://zokrates.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expected loop bounds to be constant

dark64 opened this issue · comments

Description

Loop bounds are not propagated correctly

Environment

  • Compiler version: 0.8.7
  • Operating system: Ubuntu

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˙