Version
Types
Common ancestor type
A common ancestor type is a type computed for a list of types using the following algorithm:
- Add
NONE
to the list of types (to make sure the list is never empty). - If there is a separate type in the list, add a mark
separate
in front of all non-separate types in the list. - If there is a detachable type in the list, add a mark
detachable
in front of all attached types in the list. - If there is a type in the list to which all other types conform, it is the common ancestor type.
- Otherwise, add
ANY
to the list and repeat steps starting from step #2.
Here are some examples:
Type list | Common ancestor type |
---|---|
(empty) | |
| |
| |
| |
| |
| |
| |
| |
Back to Quick Reference
cached: 12/21/2024 11:25:13.000 AM