summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2014-07-20 14:49:10 +0200
committerPhilipp Hagemeister <[email protected]>2014-07-20 14:49:10 +0200
commit0d989011fffd768116d0ca81f6c067c7e0876f36 (patch)
tree00f000b4f7b0c789b95102db0de0576e4015a683 /test
parent01b4b745749bb92b4a56b4201d699740cbf450ab (diff)
downloadyoutube-dl-0d989011fffd768116d0ca81f6c067c7e0876f36.tar.gz
youtube-dl-0d989011fffd768116d0ca81f6c067c7e0876f36.zip
[swfinterp] Add support for calling methods on objects
Diffstat (limited to 'test')
-rw-r--r--test/swftests/PrivateCall.as21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/swftests/PrivateCall.as b/test/swftests/PrivateCall.as
new file mode 100644
index 000000000..f1c110a37
--- /dev/null
+++ b/test/swftests/PrivateCall.as
@@ -0,0 +1,21 @@
+// input: []
+// output: 9
+
+package {
+public class PrivateCall {
+ public static function main():int{
+ var f:OtherClass = new OtherClass();
+ return f.func();
+ }
+}
+}
+
+class OtherClass {
+ private function pf():int {
+ return 9;
+ }
+
+ public function func():int {
+ return this.pf();
+ }
+}