S12.11_A2_T1.js (575B)
1 // |reftest| error:SyntaxError 2 // Copyright 2009 the Sputnik authors. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 info: There can be only one DefaultClause 7 es5id: 12.11_A2_T1 8 description: Duplicate DefaultClause 9 negative: 10 phase: parse 11 type: SyntaxError 12 ---*/ 13 14 $DONOTEVALUATE(); 15 16 function SwitchTest(value){ 17 var result = 0; 18 19 switch(value) { 20 case 0: 21 result += 2; 22 default: 23 result += 32; 24 break; 25 default: 26 result += 32; 27 break; 28 } 29 30 return result; 31 } 32 33 var x = SwitchTest(0);