diff options
Diffstat (limited to 'src/qml/compiler/qv4compilerscanfunctions.cpp')
-rw-r--r-- | src/qml/compiler/qv4compilerscanfunctions.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp index 349bd08dcf..e0a745ebb1 100644 --- a/src/qml/compiler/qv4compilerscanfunctions.cpp +++ b/src/qml/compiler/qv4compilerscanfunctions.cpp @@ -414,6 +414,17 @@ bool ScanFunctions::visit(TemplateLiteral *ast) } +bool ScanFunctions::visit(SuperLiteral *) +{ + Context *c = _context; + while (c && (c->contextType != ContextType::Function || c->isArrowFunction)) + c = c->parent; + + if (c) + c->requiresExecutionContext = true; + + return false; +} bool ScanFunctions::enterFunction(FunctionExpression *ast, bool enterName) { if (_context->isStrict && (ast->name == QLatin1String("eval") || ast->name == QLatin1String("arguments"))) |