test262/test/language/module-code/import-as-stmt-list-item.js
Mike Pennisi b8b462316b Add tests for early errors in module syntax
Introduce the `module` flag to unambiguously identify tests that are
intended to be interpreted as module code.
2015-06-03 13:15:15 -04:00

15 lines
395 B
JavaScript

// Copyright (C) Copyright 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 15.2
description: >
An ImportDeclaration is not a valid StatementListItem and is therefore
restricted from appearing within statements in a ModuleBody.
flags: [module]
negative: SyntaxError
---*/
{
import { x } from 'y';
}