diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-11-17 07:54:06 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-11-17 07:54:06 +0100 |
commit | fbf94a78158ea2ea70dcbc1599036a64bb3321c3 (patch) | |
tree | 2e52203fa45a3519c6dbf3dd87d5c607c9f1dc9f /test/swftests/ConstArrayAccess.as | |
parent | 1921b24551424d4bb17356c4c7c1ad374d4f899b (diff) |
[swfinterp] Add more builtins and improve static variables
Diffstat (limited to 'test/swftests/ConstArrayAccess.as')
-rw-r--r-- | test/swftests/ConstArrayAccess.as | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/swftests/ConstArrayAccess.as b/test/swftests/ConstArrayAccess.as new file mode 100644 index 000000000..07dc3f460 --- /dev/null +++ b/test/swftests/ConstArrayAccess.as @@ -0,0 +1,18 @@ +// input: [] +// output: 4 + +package { +public class ConstArrayAccess { + private static const x:int = 2; + private static const ar:Array = ["42", "3411"]; + + public static function main():int{ + var c:ConstArrayAccess = new ConstArrayAccess(); + return c.f(); + } + + public function f(): int { + return ar[1].length; + } +} +} |