DanielGavin / ols

Language server for Odin
MIT License
382 stars 58 forks source link

No type inference for element when using for in loop #305

Closed IllusionMan1212 closed 3 months ago

IllusionMan1212 commented 5 months ago

Looping over static arrays, dynamic arrays, slices, maps, and strings using a for in loop doesn't infer the type of the element and its index and causes auto completion and hover to not work

Simple reproducible code

package main

main :: proc() {
    slice := []int{1, 2, 3, 4, 5}

    for elem in slice {
    }
}
DanielGavin commented 3 months ago

Fixed in #339