Module validation failed: Function return type does not match operand type of return inst!
ret %"->" %3, !dbg !664
ptr
This happens even when using a ProcPointer:
fun foo : LibC::Char* -> LibC::SizeT
->LibC.strlen
end
It looks like the fun is trying to return a Crystal Proc that contains an additional closure data pointer; instead, it should reject any closures and return just the function pointer using ~check_proc_is_not_closure, similar to when a Proc is passed as a lib call argument.
The following:
produces a codegen error:
This happens even when using a
ProcPointer
:It looks like the fun is trying to return a Crystal
Proc
that contains an additional closure data pointer; instead, it should reject any closures and return just the function pointer using~check_proc_is_not_closure
, similar to when aProc
is passed as a lib call argument.