Details
Description
When the javascript in the undefined.qml file is compiled and executed, the call to Math.max() returns 40 whereas it should return NaN.
AFAIK, this is due to the fact that the undefined value is handled as a 0.0 double instead of being coerced into a NaN as expected (mdn) as can be seen in the generated C++ code:
// generate_LoadUndefined
r2_1 = 0.0;
Replacing "Math.max(undefined, 40)" with "Math.max(Number(undefined), 40)" or "Math.max(new Number(undefined), 40)"correctly performs the coercion to NaN.