< prev index next >

test/script/basic/es6/destructuring.js

Print this page




  45 check("for (var { x: y } of obj) ;");
  46 check("for (let { x: y } of obj) ;");
  47 check("var { x, y } = obj;");
  48 check("let { x, y } = obj;");
  49 check("const { x, y } = obj;");
  50 check("({ x, y }) = obj;");
  51 check("for (var { x, y } of obj) ;");
  52 check("for (let { x, y } of obj) ;");
  53 check("var [a, b] = obj;");
  54 check("let [a, b] = obj;");
  55 check("const [a, b] = obj;");
  56 check("[a, b] = obj;");
  57 check("for ([a, b] of obj) ;");
  58 check("for (var [a, b] of obj) ;");
  59 check("for (let [a, b] of obj) ;");
  60 check("(function({ x: y }) { return x; })()");
  61 check("(function({ x }) { return x; })()");
  62 check("(function([x]) { return x; })()");
  63 check("for (var [[x, y, z] = [4, 5, 6]] = [7, 8, 9]; iterCount < 1; ) ;");
  64 check("for ([ arrow = () => {} ] of [[]]) ;");







  65 


  45 check("for (var { x: y } of obj) ;");
  46 check("for (let { x: y } of obj) ;");
  47 check("var { x, y } = obj;");
  48 check("let { x, y } = obj;");
  49 check("const { x, y } = obj;");
  50 check("({ x, y }) = obj;");
  51 check("for (var { x, y } of obj) ;");
  52 check("for (let { x, y } of obj) ;");
  53 check("var [a, b] = obj;");
  54 check("let [a, b] = obj;");
  55 check("const [a, b] = obj;");
  56 check("[a, b] = obj;");
  57 check("for ([a, b] of obj) ;");
  58 check("for (var [a, b] of obj) ;");
  59 check("for (let [a, b] of obj) ;");
  60 check("(function({ x: y }) { return x; })()");
  61 check("(function({ x }) { return x; })()");
  62 check("(function([x]) { return x; })()");
  63 check("for (var [[x, y, z] = [4, 5, 6]] = [7, 8, 9]; iterCount < 1; ) ;");
  64 check("for ([ arrow = () => {} ] of [[]]) ;");
  65 check("try { throw null;} catch({}) { }");
  66 check("try { throw {} } catch ({}) { }");
  67 check("try { throw [] } catch ([,]) { }");
  68 check("try { throw { w: [7, undefined, ] }} catch ({ w: [x, y, z] = [4, 5, 6] }) { }");
  69 check("try { throw { a: 2, b: 3} } catch ({a, b}) { }");
  70 check("try { throw [null] } catch ([[x]]) { }");
  71 check("try { throw { w: undefined } } catch ({ w: { x, y, z } = { x: 4, y: 5, z: 6 } }) { }");
  72 
< prev index next >