aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compilercontext_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4compilercontext_p.h')
-rw-r--r--src/qml/compiler/qv4compilercontext_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compilercontext_p.h b/src/qml/compiler/qv4compilercontext_p.h
index 796d5e274c..d36ef0f447 100644
--- a/src/qml/compiler/qv4compilercontext_p.h
+++ b/src/qml/compiler/qv4compilercontext_p.h
@@ -75,7 +75,8 @@ enum class ContextType {
// * return statements are allowed everywhere (like in FunctionCode)
// * variable declarations are treated as true locals (like in FunctionCode)
Block,
- ESModule
+ ESModule,
+ ScriptImportedByQML,
};
struct Context;
@@ -313,7 +314,7 @@ struct Context {
bool requiresImplicitReturnValue() const {
return contextType == ContextType::Binding ||
contextType == ContextType::Eval ||
- contextType == ContextType::Global;
+ contextType == ContextType::Global || contextType == ContextType::ScriptImportedByQML;
}
void addUsedVariable(const QString &name) {