leo icon indicating copy to clipboard operation
leo copied to clipboard

[Bug] mismatched int types can be used during slicing

Open 0rphon opened this issue 3 years ago • 0 comments

🐛 Bug Report

an error should be thrown for the following but instead it compiles and runs successfully

Code snippet to reproduce

function main () {
    let x = [0u8; 5];
    let y = x[0u32..1i8];
}

Stack trace & error message

     Build Starting...
     Build Compiling main program... ("D:\\Work\\leo-playground\\src/main.leo")
     Build Number of constraints - 4457
     Build Complete
      Done Finished in 20 milliseconds

     Setup Starting...
     Setup Saving proving key ("D:\\Work\\leo-playground\\outputs/leo-playground.lpk")
     Setup Complete
     Setup Saving verification key ("D:\\Work\\leo-playground\\outputs/leo-playground.lvk")
     Setup Complete
      Done Finished in 200 milliseconds

   Proving Starting...
      Done Finished in 47 milliseconds 

 Verifying Starting...
 Verifying Proof is valid
      Done Finished in 2 milliseconds

Your Environment

  • leo commit 82f83d993657948e8e3020551b2c657d1a89bf5c
  • rustc version 1.60.0-nightly
  • Windows 10.0.19044 (Windows 10 Pro) [64-bit]

0rphon avatar Feb 12 '22 23:02 0rphon