[swfinterp] Add support for calls to instance methods
This commit is contained in:
		
							parent
							
								
									70f767dc65
								
							
						
					
					
						commit
						01b4b74574
					
				
					 2 changed files with 77 additions and 57 deletions
				
			
		
							
								
								
									
										17
									
								
								test/swftests/ClassCall.as
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								test/swftests/ClassCall.as
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
// input: []
 | 
			
		||||
// output: 121
 | 
			
		||||
 | 
			
		||||
package {
 | 
			
		||||
public class ClassCall {
 | 
			
		||||
    public static function main():int{
 | 
			
		||||
    	var f:OtherClass = new OtherClass();
 | 
			
		||||
        return f.func(100,20);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class OtherClass {
 | 
			
		||||
	public function func(x: int, y: int):int {
 | 
			
		||||
		return x+y+1;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue