diff options
author | Linus Groh <mail@linusgroh.de> | 2021-03-16 22:03:31 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-16 22:12:56 +0100 |
commit | 47645fc976f2020e3b2ddbda3d4b7c69e35cbcd8 (patch) | |
tree | 3f8921a0f3dc1faee0acc0d5398e59eac0a49339 /Userland | |
parent | 88a3267e469bae52634cd787940ed6b26ca82ff3 (diff) | |
download | serenity-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.h | 1 |
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; |