summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-05-15 09:58:15 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-05-15 10:46:27 +0200
commite6dd62ff191de0276d2dee5d6b1a073b4d63c4cb (patch)
tree8c49e0ee9f548ecf11ceb7d30098faa092189839 /src
parentce85cb16160394d616bc3dc4bf2a8915ec63b036 (diff)
downloadqtdeclarative-e6dd62ff191de0276d2dee5d6b1a073b4d63c4cb.tar.gz
QmlCompiler: Do check specificType on SetLookup
We may have implicitly invalidated it when shadow-checking. Amends commit b3281f123ea5a8c0e5f8c63fa1568cf7414f9c14. Change-Id: Ia5c54a3a0fa97c61e947ecb0a5b21d410e1bf19a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qmlcompiler/qqmljscodegenerator.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljscodegenerator.cpp b/src/qmlcompiler/qqmljscodegenerator.cpp
index 810ed90cc9..d3770cc512 100644
--- a/src/qmlcompiler/qqmljscodegenerator.cpp
+++ b/src/qmlcompiler/qqmljscodegenerator.cpp
@@ -1186,8 +1186,13 @@ void QQmlJSCodeGenerator::generate_SetLookup(int index, int baseReg)
const QQmlJSRegisterContent specific = m_typeResolver->memberType(
callBase, m_jsUnitGenerator->lookupName(index));
- // We have checked that in the type propagator.
- Q_ASSERT(!specific.storedType().isNull());
+ if (specific.storedType().isNull()) {
+ reject(u"SetLookup. Could not find property "
+ + m_jsUnitGenerator->lookupName(index)
+ + u" on type "
+ + callBase.storedType()->internalName());
+ return;
+ }
// Choose a container that can hold both, the "in" accumulator and what we actually want.
// If the types are all the same because we can all store them as verbatim C++ types,