DanielGavin/ols

No IntelliSense for variables assigned from generic functions if their type isn't specified.

Closed this issue · 5 comments

Example

foo :: proc {foo_int, foo_float, foo_i32, foo_f32}
foo_val := foo()

No intellisense will be given for foo_val unless the type of foo_val is explicitly specified

foo_val : int = foo()

image
image

Please post code of your definitions of all the foo_*.

I think your code is invalid. Have you tried compiling it? There is no way to resolve foo(), since it takes no arguments, how would Odin be able to infer what procedure to use.

My bad, I didn't investage enough and made conclusions

The issue seems to be exclusive to the inbuilt len function

image
image

Its related to generic functions I suppose

foo :: proc(x: $T) -> T {
	return x + 1
}

image
image

Should be fixed now. Tested on the builtin len and your example.