Pārlūkot izejas kodu

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.
Linus Groh 4 gadi atpakaļ
vecāks
revīzija
47645fc976
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      Userland/Libraries/LibJS/AST.h

+ 1 - 0
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;