aboutsummaryrefslogtreecommitdiffstats
path: root/external/contributions/Google/sputniktests/tests/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T1.js
blob: 28e118c870b2719d02e88f18e8d41647804adc8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
* @name: S12.6.1_A13_T1;
* @section: 12.6.1, 13;
* @assertion: FunctionDeclaration within a "do-while" Block in strict
*             code is not allowed;
* @description: Declaring function within a "do-while" loop;
* @negative SyntaxError;
*/

"use strict";
if (!strict_mode) { throw new SyntaxError('unspecified case'); }

do{
    function __func(){};
} while(0);