6.9 Strict dialect and static types

In the strict dialect, both expressions and properties have types. To be used to compute the value of a property, the expression must have a static type that is compatible with the type of the property. One way to think about static types of expressions and values is that the static type is a conservative approximation of the set of values that will result from that expression.

There are three special cases where static type rules are ignored, possibly allowing runtime errors to occur:

An explicit cast to a user-defined type is only useful in the strict dialect. This is because the effect of an explicit cast is to defer type checking until runtime, which is already the case in the standard dialect. This is not necessarily the case for built-in types that have special conversion behavior.


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/specs/actionscript/3/as3_specification61.html