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)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too