mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 19:53:50 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			516 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			516 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // Copyright (C) 2015 the V8 project authors. All rights reserved.
 | |
| // This code is governed by the BSD license found in the LICENSE file.
 | |
| 
 | |
| /*---
 | |
| description: >
 | |
|     In the presence of the "use strict" directive, generator functions declared
 | |
|     as methods obey "strict" ThisMode semantics.
 | |
| es6id: 14.4.13
 | |
| flags: [noStrict]
 | |
| features: [generators]
 | |
| ---*/
 | |
| 
 | |
| var thisValue = null;
 | |
| var method = {
 | |
|   *method() {
 | |
|     'use strict';
 | |
|     thisValue = this;
 | |
|   }
 | |
| }.method;
 | |
| 
 | |
| method().next();
 | |
| 
 | |
| assert.sameValue(thisValue, undefined);
 |