diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-09-01 10:35:47 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-09-04 18:25:19 +0000 |
commit | 656e50abb15e2df1fb47b158bd79dc3590220175 (patch) | |
tree | 59b83fa572902f365f3acbae00a64fa10a78bd4d /src/qml/jsruntime/qv4functionobject.cpp | |
parent | a3225954d1049d9e4fea3171de00b24318a5ff31 (diff) |
Arrow and generator functions don't have a prototype property
Change-Id: Icbc25f1f723fe45a8c265f1b4bdf5f3fad3c4775
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 04fbe2d1e3..a2afeb87d7 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -521,7 +521,7 @@ void Heap::ScriptFunction::init(QV4::ExecutionContext *scope, Function *function ScopedString name(s, n ? n->d() : function->name()); if (name) f->setName(name); - if (makeConstructor) + if (makeConstructor && !function->isArrowFunction()) f->createDefaultPrototypeProperty(Heap::FunctionObject::Index_ProtoConstructor); Q_ASSERT(internalClass && internalClass->find(s.engine->id_length()->propertyKey()) == Index_Length); |