diff options
-rw-r--r-- | src/qmlcompiler/qqmljsscope.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/typedArray.qml | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljsscope.cpp b/src/qmlcompiler/qqmljsscope.cpp index bb7bd58919..24f1ba6687 100644 --- a/src/qmlcompiler/qqmljsscope.cpp +++ b/src/qmlcompiler/qqmljsscope.cpp @@ -446,11 +446,11 @@ void QQmlJSScope::resolveNonEnumTypes( void QQmlJSScope::resolveEnums(const QQmlJSScope::Ptr &self, const QQmlJSScope::ConstPtr &intType) { - Q_ASSERT(intType); // There always has to be a builtin "int" type for (auto it = self->m_enumerations.begin(), end = self->m_enumerations.end(); it != end; ++it) { if (it->type()) continue; + Q_ASSERT(intType); // We need an "int" type to resolve enums auto enumScope = QQmlJSScope::create(EnumScope, self); enumScope->m_baseTypeName = QStringLiteral("int"); enumScope->m_baseType.scope = intType; diff --git a/tests/auto/qml/qmlcppcodegen/data/typedArray.qml b/tests/auto/qml/qmlcppcodegen/data/typedArray.qml index d2ab3d6f1b..0072357ae3 100644 --- a/tests/auto/qml/qmlcppcodegen/data/typedArray.qml +++ b/tests/auto/qml/qmlcppcodegen/data/typedArray.qml @@ -2,5 +2,6 @@ pragma Strict import QtQml QtObject { + property list<bool> values1: [] property list<int> values2: [] } |