To reproduce.
function main() {
let v: f64 = 1u64 as! f64
println("{}", v)
}
Error message:
build/Test-Generic-Return-Float-issue-1071.cpp:5:16: error: no matching function for call to 'verify_cast'
const f64 v = (verify_cast<f64>((static_cast<u64>(1ULL))));
^~~~~~~~~~~~~~~~
runtime/Jakt/TypeCasts.h:47:49: note: candidate function [with OutputType = double, InputType = unsigned long] not viable: expects an l-value for 1st argument
ALWAYS_INLINE CopyConst<InputType, OutputType>& verify_cast(InputType& input)
^
runtime/Jakt/TypeCasts.h:39:49: note: candidate template ignored: could not match 'InputType *' against 'u64' (aka 'unsigned 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