You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the following code, the return value of allocate is inferred as move T instead of Pointer[T], which should then be inferred as Pointer[Int]:
fn extern malloc(size: UInt64) -> Pointer[UInt8]
fn allocate[T](size: Int) -> Pointer[T] {
malloc(size as UInt64) as Pointer[T]
}
class async Main {
fn async main {
let x: Pointer[Int] = allocate(42)
}
}
Operating system
Fedora
Inko version
main
The text was updated successfully, but these errors were encountered:
Please describe the bug
When running the following code, the return value of
allocate
is inferred asmove T
instead ofPointer[T]
, which should then be inferred asPointer[Int]
:Operating system
Fedora
Inko version
main
The text was updated successfully, but these errors were encountered: