Mike Pennisi 021ed85d97 Add syntax tests for declaration restrictions
Assert that declarations are not permitted in positions reserved for
statements only.
2016-03-11 12:23:15 -05:00

11 lines
313 B
JavaScript

// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Generator declaration not allowed in statement position
esid: sec-while-statement
es6id: 13.7.3
negative: SyntaxError
---*/
while (false) function* g() {}