In this section the relation assignable-to is defined which extends compatible-with to cover the primitive value type assignments supported by the semantics of the various load and store instructions (§III.3), implicit argument coercion (§III.1.6), and method return (§III.3.57).
A location type T is assignable-to a location type U if one of the following holds:
-
T is identical to U. [Note: this is reflexivity. end note]
-
There exists some V such that T is assignable-to V and V is assignable-to U. [Note: this is transitivity. end note]
-
T has intermediate type V, U has intermediate type W, and V is identical to W.
-
T has intermediate type
native int
and U has intermediate typeint32
, or vice-versa. -
T is compatible-with U.
[Note: an assignment governed by assignable-to which involves an application of rules that use the intermediate type may change the representation and meaning of the assigned value as it is translated to and then from the intermediate type. end note]