Shalom, That's a good point. Not to mention that the assignment statements actually exercise 6.9.3 (assignment compatibility). To be pedantic, I'd suggest moving this whole example into 6.9.3. Or perhaps to beyond 6.9.5, where we have type incompatibility finally defined, so the "illegal" lines are supportable. It could then be expanded to include packed type coercions. Rather than rely solely on full section numbers in the comment lines, I'd add the formal words match, equivalent, or compatible: Bresticker, Shalom wrote: > The example at the end of 6.9.2 contains the following code: > > s1.v1 = s2.v1; // legal - both types from package p1 (rule 8) // types from package p1 match (6.9.1(8)) > s1.v2 = s2.v2; // legal - both types from $unit (rule 4) // types from $unit match (6.9.1(4)) > s1.v3 = s2.v3; // legal - both types from top (rule 2) // type parameters from top match (6.9.1(2)) > s1.v4 = s2.v4; // legal - both types are int (rule 1) // typedefs of int always match (6.9.1(1)) > s1.v5 = s2.v5; // illegal - types from s1 and s2 (rule 4) // types declared by instances s1 and s2 // are incompatible (6.9 intro) To add further examples, we'd need to rework the it more thoroughly... is that within the committee's charter? > > The problem is that these comments are referencing rules in 6.9.1, > whereas 6.9.2 has a different set of rules. > > Shalom Bresticker > Intel Jerusalem LAD DA > +972 2 589-6852 > +972 54 721-1033 > I don't represent Intel >Received on Mon Nov 28 10:05:42 2005
This archive was generated by hypermail 2.1.8 : Mon Nov 28 2005 - 10:07:23 PST