jakt
jakt copied to clipboard
C++ error message: no matching function for call to 'verify_cast'
The error is produced by compiling the following snippet:
function main() {
let arr : [f32] = [0f32] as! [f32]
}
Jakt compilation does not produce any errors, but clang emits this output:
error: no matching function for call to 'verify_cast'
const Array<f32> arr = (verify_cast<Array<f32>>((Array({static_cast<i64>(0LL)}))));
^~~~~~~~~~~~~~~~~~~~~~~
../../jakt/runtime/AK/TypeCasts.h:47:49: note: candidate function [with OutputType = AK::Array<float>, InputType = AK::Array<long>] not viable: expects an l-value for 1st argument
ALWAYS_INLINE CopyConst<InputType, OutputType>& verify_cast(InputType& input)
^
../../jakt/runtime/AK/TypeCasts.h:39:49: note: candidate template ignored: could not match 'InputType *' against 'AK::Array<long>'
ALWAYS_INLINE CopyConst<InputType, OutputType>* verify_cast(InputType* input)
Hi I would like to work on this issue.