Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Values of deduced types not allowed in array index #43

Open
lefticus opened this issue Mar 10, 2024 · 0 comments
Open

Values of deduced types not allowed in array index #43

lefticus opened this issue Mar 10, 2024 · 0 comments

Comments

@lefticus
Copy link
Collaborator

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 │     }
────┴─
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant