Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 1.18 KB

i.8.7.3-general-assignment-compatibility.md

File metadata and controls

17 lines (9 loc) · 1.18 KB

I.8.7.3 General assignment compatibility

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:

  1. T is identical to U. [Note: this is reflexivity. end note]

  2. There exists some V such that T is assignable-to V and V is assignable-to U. [Note: this is transitivity. end note]

  3. T has intermediate type V, U has intermediate type W, and V is identical to W.

  4. T has intermediate type native int and U has intermediate type int32, or vice-versa.

  5. 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]