mirror of
				https://github.com/tc39/test262.git
				synced 2025-11-04 05:33:50 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			943 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			943 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
// This file was procedurally generated from the following sources:
 | 
						|
// - src/dstr-binding/obj-init-undefined.case
 | 
						|
// - src/dstr-binding/error/async-gen-func-expr-dflt.template
 | 
						|
/*---
 | 
						|
description: Value specifed for object binding pattern must be object coercible (undefined) (async generator function expression (default parameter))
 | 
						|
esid: sec-asyncgenerator-definitions-evaluation
 | 
						|
features: [async-iteration]
 | 
						|
flags: [generated]
 | 
						|
info: |
 | 
						|
    AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
 | 
						|
        AsyncGeneratorBody }
 | 
						|
 | 
						|
        [...]
 | 
						|
        3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
 | 
						|
           AsyncGeneratorBody, scope, strict).
 | 
						|
        [...]
 | 
						|
 | 
						|
    Runtime Semantics: BindingInitialization
 | 
						|
 | 
						|
    ObjectBindingPattern : { }
 | 
						|
 | 
						|
    1. Return NormalCompletion(empty).
 | 
						|
---*/
 | 
						|
 | 
						|
 | 
						|
var f = async function*({} = undefined) {
 | 
						|
  
 | 
						|
};
 | 
						|
 | 
						|
assert.throws(TypeError, function() {
 | 
						|
  f();
 | 
						|
});
 |