code: private void visitArrayLitContainingSpread(Node spreadParent) {
      checkArgument(spreadParent.isArrayLit());
  
      List<Node> groups = extractSpreadGroups(spreadParent);
  
      final Node baseArrayLit;
      if (groups.get(0).isArrayLit()) {
        // g0.concat(g1, g2, ..., gn)
        baseArrayLit = groups.remove(0);
      } else {
        // [].concat(g0, g1, g2, ..., gn)
        baseArrayLit = arrayLitWithJSType();
      }
  
      final Node joinedGroups;
      if (groups.isEmpty()) {
        joinedGroups = baseArrayLit;
      } else {
        Node concat = IR.getprop(baseArrayLit, IR.string("concat")).setJSType(concatFnType);
        joinedGroups = IR.call(concat, groups.toArray(new Node[0]));
      }
  
      joinedGroups.useSourceInfoIfMissingFromForTree(spreadParent);
      joinedGroups.setJSType(arrayType);
  
      spreadParent.replaceWith(joinedGroups);
      compiler.reportChangeToEnclosingScope(joinedGroups);
    }
docs: Processes array literals containing spreads.
  
  <p>Example:
  
  <pre><code>
  [1, 2, ...x, 4, 5] => [1, 2].concat($jscomp.arrayFromIterable(x), [4, 5])
  </code></pre>