DanielGavin / ols

Language server for Odin
MIT License
417 stars 62 forks source link

No autocomplete for items returned from generic procedures #262

Closed distantforest1 closed 3 weeks ago

distantforest1 commented 10 months ago

Hi just want to say that ols is really working great for me so far. Appreciate the work so far.

I found this issue where autocomplete doesn't work when the item is returned from parapoly procedures Here is a minimal example:

package main
import sa "core:container/small_array"

Animal :: struct {
    happy:  bool,
    sad:    bool,
    fluffy: bool,
}

main :: proc() {
    animals := sa.Small_Array(5, Animal){}
    sa.append(&animals, Animal{happy = true})

    first := sa.get_ptr(&animals, 0)
    first.fluffy = true // <-- ".fluffy" doesn't appear in the autocompletion list
}
DanielGavin commented 3 weeks ago

Fixed.