test262/test/language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.js
Mike Pennisi 136110378b Rename negative test "phase" for parsing
Early errors may result from parsing the source text of a test file, but
they may also result from parsing some other source text as referenced
through the ES2015 module syntax. The latter form of early error is not
necessarily detectable by ECMAScript parsers, however. Because of this,
the label "early" is not sufficiently precise for all Test262 consumers
to correctly interpret all tests.

Update the "phase" name of "early" to "parse" for all those negative
tests that describe errors resulting from parsing of the file's source
text directly. A forthcoming commit will update the remaining tests to
use a "phase" name that is more specific to module resolution.
2018-01-05 15:17:50 -05:00

33 lines
1.0 KiB
JavaScript

// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-pattern-semantics
es6id: 21.2.2
description: >
NonEmptyClassRangesNoDash production cannot specify a multi-character set
("A" parameter)
info: |
The production
NonemptyClassRangesNoDash::ClassAtomNoDash-ClassAtomClassRanges evaluates
as follows:
1. Evaluate ClassAtomNoDash to obtain a CharSet A.
2. Evaluate ClassAtom to obtain a CharSet B.
3. Evaluate ClassRanges to obtain a CharSet C.
4. Call CharacterRange(A, B) and let D be the resulting CharSet.
21.2.2.15.1 Runtime Semantics: CharacterRange Abstract Operation
1. If A does not contain exactly one character or B does not contain
exactly one character, throw a SyntaxError exception.
The `u` flag precludes the Annex B extension that enables this pattern.
negative:
phase: parse
type: SyntaxError
---*/
throw "Test262: This statement should not be evaluated.";
/[\d-a]/u;