[swfinterp] Add support for calls to instance methods
This commit is contained in:
		
							
								
								
									
										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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user