cptn-abrupt-empty.js (699B)
1 // Copyright (C) 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 es6id: 13.12.11 5 description: > 6 Completion value when case block is empty 7 info: | 8 SwitchStatement : switch ( Expression ) CaseBlock 9 10 [...] 11 8. Let R be the result of performing CaseBlockEvaluation of CaseBlock with 12 argument switchValue. 13 9. Set the running execution context’s LexicalEnvironment to oldEnv. 14 10. Return R. 15 16 17 13.12.9 Runtime Semantics: CaseBlockEvaluation 18 19 CaseBlock : { } 20 21 1. Return NormalCompletion(undefined). 22 ---*/ 23 24 assert.sameValue(eval('1; switch(null) {}'), undefined); 25 26 reportCompare(0, 0);