QmlCompiler: Wrap sequences with unknown elemnts in QVariantList

Otherwise we later try to perform value type lookups on them. That won't
work.

Task-number: QTBUG-110438
Change-Id: I1690a3375841ba5a1ff1a471a7f88bd2023ab4c4
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c9b8b06117)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Ulf Hermann 2023-01-23 14:29:27 +01:00 committed by Qt Cherry-pick Bot
parent ebbbe3ce0e
commit b3f81380bd
3 changed files with 3 additions and 0 deletions

View File

@ -733,6 +733,7 @@ QQmlJSScope::ConstPtr QQmlJSTypeResolver::genericType(
break;
}
}
return m_variantListType;
}
return m_varType;

View File

@ -3,4 +3,5 @@ import TestTypes
Person {
property Person other: Person { id: oo }
barzles: oo.barzles
property int l: oo.barzles.length
}

View File

@ -2473,6 +2473,7 @@ void tst_QmlCppCodegen::badSequence()
other->setBarzles(barzles);
QCOMPARE(self->barzles(), barzles);
QCOMPARE(self->property("l").toInt(), 2);
}
void tst_QmlCppCodegen::enumLookup()