mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 11:44:31 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			349 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			349 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| var a = {};
 | |
| 
 | |
| function foo() {
 | |
|     return Array.prototype.splice.apply([], a);
 | |
| }
 | |
| noInline(foo);
 | |
| 
 | |
| function bar(b) {
 | |
|     with({});
 | |
|     a = arguments;
 | |
|     a.__defineGetter__("length", String.prototype.valueOf);
 | |
|     foo();
 | |
| }
 | |
| 
 | |
| var exception;
 | |
| try {
 | |
|     bar();
 | |
| } catch (e) {
 | |
|     exception = e;
 | |
| }
 | |
| 
 | |
| if (exception != "TypeError: Type error")
 | |
|     throw "FAIL";
 |