mirror of
				https://github.com/tc39/test262.git
				synced 2025-11-04 05:33:50 +01:00 
			
		
		
		
	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.
		
			
				
	
	
		
			33 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
// This file was procedurally generated from the following sources:
 | 
						|
// - src/dstr-binding/ary-ptrn-rest-init-obj.case
 | 
						|
// - src/dstr-binding/default/var-stmt.template
 | 
						|
/*---
 | 
						|
description: Reset element (nested object pattern) does not support initializer (`var` statement)
 | 
						|
esid: sec-variable-statement-runtime-semantics-evaluation
 | 
						|
es6id: 13.3.2.4
 | 
						|
features: [destructuring-binding]
 | 
						|
flags: [generated]
 | 
						|
negative:
 | 
						|
  phase: parse
 | 
						|
  type: SyntaxError
 | 
						|
info: |
 | 
						|
    VariableDeclaration : BindingPattern Initializer
 | 
						|
 | 
						|
    1. Let rhs be the result of evaluating Initializer.
 | 
						|
    2. Let rval be GetValue(rhs).
 | 
						|
    3. ReturnIfAbrupt(rval).
 | 
						|
    4. Return the result of performing BindingInitialization for
 | 
						|
       BindingPattern passing rval and undefined as arguments.
 | 
						|
 | 
						|
    13.3.3 Destructuring Binding Patterns
 | 
						|
    ArrayBindingPattern[Yield] :
 | 
						|
        [ Elisionopt BindingRestElement[?Yield]opt ]
 | 
						|
        [ BindingElementList[?Yield] ]
 | 
						|
        [ BindingElementList[?Yield] , Elisionopt BindingRestElement[?Yield]opt ]
 | 
						|
---*/
 | 
						|
throw "Test262: This statement should not be evaluated.";
 | 
						|
 | 
						|
var [...{ x } = []] = [];
 | 
						|
 | 
						|
 |