summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-03-16 22:03:31 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-16 22:12:56 +0100
commit47645fc976f2020e3b2ddbda3d4b7c69e35cbcd8 (patch)
tree3f8921a0f3dc1faee0acc0d5398e59eac0a49339 /Userland
parent88a3267e469bae52634cd787940ed6b26ca82ff3 (diff)
downloadserenity-47645fc976f2020e3b2ddbda3d4b7c69e35cbcd8.zip
LibJS: Ensure SequenceExpression has two or more expressions
Just a sanity check, as we should be able to make this assumption elsewhere - this way we can catch silly mistakes early.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/AST.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/AST.h b/Userland/Libraries/LibJS/AST.h
index 1c7267ff16..78f9c8dd40 100644
--- a/Userland/Libraries/LibJS/AST.h
+++ b/Userland/Libraries/LibJS/AST.h
@@ -563,6 +563,7 @@ public:
: Expression(move(source_range))
, m_expressions(move(expressions))
{
+ VERIFY(m_expressions.size() >= 2);
}
virtual void dump(int indent) const override;