mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 03:34:08 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			701 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			701 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| // Copyright (C) 2017 the V8 project authors, 2017 Igalia S.L. All rights reserved.
 | |
| // This code is governed by the BSD license found in the LICENSE file.
 | |
| 
 | |
| /*---
 | |
| path: language/statements/class/fields-after-same-line-static-method-
 | |
| name: field definitions after a static method in the same line
 | |
| features: [class-fields]
 | |
| esid: prod-FieldDefinition
 | |
| ---*/
 | |
| 
 | |
| class C {
 | |
|   static m() { return 42; } /*{ fields }*/;
 | |
| }
 | |
| 
 | |
| var c = new C();
 | |
| 
 | |
| assert.sameValue(C.m(), 42);
 | |
| assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
 | |
| assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false);
 | |
| 
 | |
| verifyProperty(C, "m", {
 | |
|   enumerable: false,
 | |
|   configurable: true,
 | |
|   writable: true,
 | |
| });
 | |
| 
 | |
| /*{ assertions }*/
 |