Implicit coercions removed
In 9.0, all implicit coercions are eliminated, as well many explicit coercions using the
as keyword. Different coercions have different types of
replacements. The application automatically upgrades these coercions in your Gosu code
as specified in the following table. Unless otherwise specified in the rightmost column,
both implicit and explicit coercions are prohibited.
|
Previous coercion from this type |
Previous coercion to this type |
Upgrader replaces implicit coercions with this new Gosu code |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
For For example, consider a variable declared as the typelist type
For non-constant values, the upgrade tool converts the implicit
coercion to
|
|
|
|
|
|
|
|
Direct reference to the constant on the enumeration class. |
|
Numeric value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Implicit coercion is replaced by an explicit cast: This is one of the few implicit coercions that can be replaced by an
explicit coercion using the |
|
|
|
|
|
|
|
|
|
Numeric values |
Numeric values |
Replaced by method calls on the class
gw.api.upgrade.Coercions. The method names
have the form
This is one of the few implicit coercions that can be replaced by an
explicit coercion using the |
PolicyCenter business data coercions
Previous coercion from this type |
Previous coercion to this type |
Upgrader replaces implicit coercions with this new Gosu code |
|---|---|---|
|
|
|
|
|
|
|
|
