aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 99811c3779..2b6bda1de3 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2363,6 +2363,9 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast,
Reference arg = referenceForName(e->name, true);
initializeAndDestructureBindingElement(e, arg);
} else {
+ if (!formals->next)
+ // trailing comma
+ break;
Q_UNREACHABLE();
}
formals = formals->next;