aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/compiler/qv4compileddata.cpp31
-rw-r--r--tests/auto/qml/ecmascripttests/TestExpectations7
2 files changed, 30 insertions, 8 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index 33e463c76a..10799f70da 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -394,6 +394,11 @@ QStringList CompilationUnit::moduleRequests() const
requests << stringAt(entry.moduleRequest);
}
+ for (uint i = 0; i < data->starExportEntryTableSize; ++i) {
+ const ExportEntry &entry = data->starExportEntryTable()[i];
+ requests << stringAt(entry.moduleRequest);
+ }
+
return requests;
}
@@ -490,7 +495,31 @@ const Value *CompilationUnit::resolveExportRecursively(QV4::String *exportName,
return dependentModuleUnit->resolveExportRecursively(importName, resolveSet);
}
- return nullptr;
+
+ if (exportName->toQString() == QLatin1String("default"))
+ return nullptr;
+
+ const Value *starResolution = nullptr;
+
+ for (uint i = 0; i < data->starExportEntryTableSize; ++i) {
+ const CompiledData::ExportEntry &entry = data->starExportEntryTable()[i];
+ auto dependentModuleUnit = engine->loadModule(QUrl(stringAt(entry.moduleRequest)), this);
+ if (!dependentModuleUnit)
+ return nullptr;
+
+ const Value *resolution = dependentModuleUnit->resolveExportRecursively(exportName, resolveSet);
+ // ### handle ambiguous
+ if (resolution) {
+ if (!starResolution) {
+ starResolution = resolution;
+ continue;
+ }
+ if (resolution != starResolution)
+ return nullptr;
+ }
+ }
+
+ return starResolution;
}
const ExportEntry *CompilationUnit::lookupNameInExportTable(const ExportEntry *firstExportEntry, int tableSize, QV4::String *name) const
diff --git a/tests/auto/qml/ecmascripttests/TestExpectations b/tests/auto/qml/ecmascripttests/TestExpectations
index f9bcd62d3d..cd528a2692 100644
--- a/tests/auto/qml/ecmascripttests/TestExpectations
+++ b/tests/auto/qml/ecmascripttests/TestExpectations
@@ -2164,7 +2164,6 @@ language/module-code/eval-rqstd-order.js strictFails
language/module-code/instn-iee-bndng-cls.js strictFails
language/module-code/instn-iee-bndng-const.js strictFails
language/module-code/instn-iee-bndng-let.js strictFails
-language/module-code/instn-iee-star-cycle.js strictFails
language/module-code/instn-iee-trlng-comma.js strictFails
language/module-code/instn-local-bndng-cls.js strictFails
language/module-code/instn-local-bndng-const.js strictFails
@@ -2184,14 +2183,8 @@ language/module-code/instn-named-bndng-dflt-named.js strictFails
language/module-code/instn-named-bndng-dflt-star.js strictFails
language/module-code/instn-named-bndng-let.js strictFails
language/module-code/instn-named-id-name.js strictFails
-language/module-code/instn-named-star-cycle.js strictFails
language/module-code/instn-same-global.js strictFails
-language/module-code/instn-star-ambiguous.js strictFails
language/module-code/instn-star-equality.js strictFails
-language/module-code/instn-star-props-circular.js strictFails
-language/module-code/instn-star-props-dflt-skip.js strictFails
-language/module-code/instn-star-props-nrml.js strictFails
-language/module-code/instn-star-star-cycle.js strictFails
language/module-code/namespace/internals/define-own-property.js strictFails
language/module-code/namespace/internals/delete-exported-uninit.js strictFails
language/module-code/namespace/internals/enumerate-binding-uninit.js strictFails