2 import flash.display.MovieClip;
3 import flash.utils.ByteArray;
5 public class Main extends flash.display.MovieClip {
7 // test whether local variables with default value "null"
8 // will be coerced to their object
9 public function test1() {
12 dataBuffer = new Array();
19 public function test2() {
20 var output:String = "";
21 while(output.length<1) {
22 output += "abc".charAt(0);
27 public function test3() {
31 for (var k:uint = 0; k < 4; k++) {
38 public var b:Boolean = false;
40 public function test4() {
49 public function test5() {
59 public function test6() {
61 var j:uint = b?3:"abc";
64 public function test7() {
71 public function s():String {
74 public function test8() {
75 var x:String = "abcd";
77 var i:String = "test";
78 // test return types of system libraries
83 // test return types of system libraries
88 // ...and local functions
95 public function test_add() {
100 var xml:XML = <test/>
101 var xmllist:XMLList = XMLList(<test/>)
102 var d1:Date = new Date();
103 var d2:Date = new Date();
104 var array1:Array = [1];
105 var array2:Array = [1,2];
189 z11a = array1+array2;
190 z11b = array1+array2;
195 public function Main() {