LightAndLight / ipso

A functional scripting language.
https://ipso.dev
16 stars 1 forks source link

Runtime error #362

Closed LightAndLight closed 1 year ago

LightAndLight commented 1 year ago

Program

test.ipso

bad : Int
bad =
  let zzz = [3] in
  (let xxx = "xxx" in 2) * (let yyy = array.index 0 zzz in yyy)

main : IO ()
main =
  println <| debug bad

Expected output

$ ipso test.ipso
6

Actual output

$ ipso test.ipso
thread 'main' panicked at 'expected array, got String("xxx")', src/lib.rs:242:20
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace