This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Main { | |
| static function main(){ | |
| var aString : Dynamic = "a string"; | |
| var anArrayOfStrings : Dynamic = ["array", "of", "strings"]; | |
| var correctlyTypedVar:Array<String> = anArrayOfStrings; | |
| var incorrectlyTypedVar:Array<String> = aString; | |
| //Type.typeof(correctlyTypedVar) // This is an Array at runtime | |
| //Type.typeof(incorrectlyTypedVar) // This is a String at runtime |