mirror of
				https://github.com/tc39/test262.git
				synced 2025-11-03 21:24:30 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			685 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			685 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
// Copyright (C) 2018 Leo Balter. All rights reserved.
 | 
						|
// This code is governed by the BSD license found in the LICENSE file.
 | 
						|
 | 
						|
/*---
 | 
						|
esid: sec-method-definitions-static-semantics-early-errors
 | 
						|
description: >
 | 
						|
  Throws an early SyntaxError if a method definition has a private name even
 | 
						|
  inside a class body. (async generator)
 | 
						|
info: |
 | 
						|
  Static Semantics: Early Errors
 | 
						|
 | 
						|
  PropertyDefinition : MethodDefinition
 | 
						|
    It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
 | 
						|
negative:
 | 
						|
  phase: parse
 | 
						|
  type: SyntaxError
 | 
						|
features: [class-methods-private, async-iteration, class, class-fields-public]
 | 
						|
---*/
 | 
						|
 | 
						|
$DONOTEVALUATE();
 | 
						|
 | 
						|
class C {
 | 
						|
  field = {
 | 
						|
    async * #m() {}
 | 
						|
  }
 | 
						|
}
 |