sophiajt / june

MIT License
803 stars 31 forks source link

Values of deduced types not allowed in array index #43

Open lefticus opened 6 months ago

lefticus commented 6 months ago
fun get_val() -> i64 {
  return 1;
}

// both options get the same error:

let val = get_val()
// or 
let val = 42

let data = raw[1,2,3]
data[val]
────┬─ /home/jason/june/examples/june_hello_world/main/main.june:47:21
 46 │ 
 47 │       self.contents[index] = value
    │                     ╍╍╍╍╍ error: expected integer type for indexing
 48 │     }
────┴─