Cω - Reference

Descendant Member Access

Descendant member acces (using "triple dot" ...) select all recursively reachable statically accessible members. Member access involving wild-cards and transitive member access is restricted to field and property members only; that is member lookup for the name m in the primary expression e...m does not take methods into account.

We have already seen an example of descendant member access above where we selected all Title members from a Book instance using b...Title. In that particular example all accessible members were all of type string.

In general there can be several recursively accessible members with different types, in which case the result type will be a stream of choices. For example given the type hierarchy

 
 class A { public B x;} 
 class B { public C x;} 
 class C { public A x;}

the type of the query z...x on an instance z of type struct{A;B;C;} would be choice{A;B;C;}*.