QmlCompiler: When rejecting empty constants, don't crash afterwards
Fixes: QTBUG-119091 Change-Id: I1e24583aa998976c96bf3ddd6865f33cc4d5e94c Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit8190f5bd68
) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit6049b22c97
)
This commit is contained in:
parent
98ab3cef46
commit
e8470c0b3a
|
@ -448,6 +448,7 @@ void QQmlJSCodeGenerator::generate_MoveConst(int constIndex, int destTemp)
|
||||||
input = toNumericString(v4Value.doubleValue());
|
input = toNumericString(v4Value.doubleValue());
|
||||||
} else {
|
} else {
|
||||||
reject(u"unknown const type"_s);
|
reject(u"unknown const type"_s);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
m_body += conversion(contained, changed, input) + u";\n"_s;
|
m_body += conversion(contained, changed, input) + u";\n"_s;
|
||||||
generateOutputVariantConversion(contained);
|
generateOutputVariantConversion(contained);
|
||||||
|
|
|
@ -81,4 +81,6 @@ QtObject {
|
||||||
|
|
||||||
readonly property int someNumber: 10
|
readonly property int someNumber: 10
|
||||||
function writeToReadonly() { someNumber = 20 }
|
function writeToReadonly() { someNumber = 20 }
|
||||||
|
|
||||||
|
property var silly: [,0]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue