aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.1_The_do_while_Statement/S12.6.1_A13_T1.js
blob: cb6740bdfc117206986254bad43cb18ff59fd007 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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);