aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4symbol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4symbol.cpp')
-rw-r--r--src/qml/jsruntime/qv4symbol.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4symbol.cpp b/src/qml/jsruntime/qv4symbol.cpp
index bdefe1eb9e..d5ae094e1f 100644
--- a/src/qml/jsruntime/qv4symbol.cpp
+++ b/src/qml/jsruntime/qv4symbol.cpp
@@ -80,6 +80,11 @@ ReturnedValue QV4::SymbolCtor::virtualCall(const QV4::FunctionObject *f, const Q
return Symbol::create(scope.engine, desc)->asReturnedValue();
}
+ReturnedValue SymbolCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *, int, const Value *)
+{
+ return f->engine()->throwTypeError(QStringLiteral("Symbol can't be used together with |new|."));
+}
+
ReturnedValue SymbolCtor::method_for(const FunctionObject *f, const Value *, const Value *argv, int argc)
{
Scope scope(f);