Odin: dev-2022-07-nightly:4af8a645
OS: Ubuntu 20.04 LTS, Linux 5.4.0-109-generic
CPU: Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz
RAM: 96486 MiB
Expected Behavior
Tried to compile this.
package main
import "core:fmt"
import "core:slice"
main :: proc() {
a := []string{"hello", "boris"};
words_c:= slice.clone(a)
for w, idx in words_c {
fmt.println(w[:3])
}
}
However if I add in the type explicitly it works, ie
package main
import "core:fmt"
import "core:slice"
main :: proc() {
a := []string{"hello", "boris"};
words_c:[]string = slice.clone(a) // add type explicitly here
for w, idx in words_c {
fmt.println(w[:3])
}
}
Context
Expected Behavior
Tried to compile this.
Should compile and running should print
Current Behavior
Compiling gives
However if I add in the type explicitly it works, ie
works as expected.