onyx-lang / onyx

✨ The compiler and developer toolchain for Onyx

Home Page:https://onyxlang.io

Repository from Github https://github.comonyx-lang/onyxRepository from Github https://github.comonyx-lang/onyx

list.at fails to resolve its polymorphic varable

Syuparn opened this issue · comments

The following code with list.at function fails to compile with the error message below.

use core {println}
use core.list

main :: () {
    l := list.make(i32);
    l->push_end(1);
    println(l->at(0));
}
Failed to compile your code:

Line 156, column 37:
    Unable to resolve symbol 'T'. Did you mean 'at'?
 156 | at :: (list: &List, index: i32) -> &T {
                                           ^ 

I merged in your fix. Thanks for reporting the issue!