aboutsummaryrefslogtreecommitdiff
path: root/test/swftests
diff options
context:
space:
mode:
Diffstat (limited to 'test/swftests')
-rw-r--r--test/swftests/StaticAssignment.as13
-rw-r--r--test/swftests/StaticRetrieval.as16
2 files changed, 29 insertions, 0 deletions
diff --git a/test/swftests/StaticAssignment.as b/test/swftests/StaticAssignment.as
new file mode 100644
index 000000000..b061c219d
--- /dev/null
+++ b/test/swftests/StaticAssignment.as
@@ -0,0 +1,13 @@
+// input: [1]
+// output: 1
+
+package {
+public class StaticAssignment {
+ public static var v:int;
+
+ public static function main(a:int):int{
+ v = a;
+ return v;
+ }
+}
+}
diff --git a/test/swftests/StaticRetrieval.as b/test/swftests/StaticRetrieval.as
new file mode 100644
index 000000000..c8352d819
--- /dev/null
+++ b/test/swftests/StaticRetrieval.as
@@ -0,0 +1,16 @@
+// input: []
+// output: 1
+
+package {
+public class StaticRetrieval {
+ public static var v:int;
+
+ public static function main():int{
+ if (v) {
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+}
+}