Type attributes must match.
- Problem with type structures:
- class R = record var X: int,
var Y: int end;
var E: R,
var F: record var X: int,
var Y: int end,
var G: record var Y: int,
var X: int end,
proc P(Q: {X: intloc, Y:
intloc}) = ...
- Structural type equivalence:
- All have same type attribtute.
- E, F, G can bind to Q.
- Current typing rules.
- Name (occurence) equivalence:
- Each class definition names new type.
- Type structures used in place of type attributes.
- proc P(Q: R) = ...
- Only E can bind to Q!