aboutsummaryrefslogtreecommitdiff
path: root/test/swftests
diff options
context:
space:
mode:
Diffstat (limited to 'test/swftests')
-rw-r--r--test/swftests/ConstArrayAccess.as18
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;
+ }
+}
+}