diff --git a/documentation/trunk/eiffel/Language_reference/quick-reference-eiffel-programming-language/Types.wiki b/documentation/trunk/eiffel/Language_reference/quick-reference-eiffel-programming-language/Types.wiki index b7c2f11f..9367b14a 100644 --- a/documentation/trunk/eiffel/Language_reference/quick-reference-eiffel-programming-language/Types.wiki +++ b/documentation/trunk/eiffel/Language_reference/quick-reference-eiffel-programming-language/Types.wiki @@ -5,11 +5,41 @@ == Common ancestor type == -A *common ancestor type* is a type computed for a list of types using the following algorithm: +A '''common ancestor type''' is a type computed for a list of types using the following algorithm: -1. Temporary ignore whether any types are detachable or separate. -2. Add a type `NONE` to the list of types (this makes sure the list is never empty). -3. If there is a type in the list to which all other types conform, remember it as T. -4. Otherwise, use `ANY` for T. -5. If there is a detachable or separate type in the list, use the corresponding detachable and/or separate version of type T. +# Temporary ignore whether any types are detachable or separate. +# Add a type `NONE` to the list of types (to make sure the list is never empty). +# If there is a type in the list to which all other types conform, remember it as T. +# Otherwise, use `ANY` for T. +# If there is a detachable or separate type in the list, use the corresponding detachable and/or separate version of T. + +Here are some examples: +{| +! Type list +! Common ancestor type +|- +| (empty) +| NONE +|- +| BOOLEAN +| BOOLEAN +|- +| BOOLEAN, BOOLEAN +| BOOLEAN +|- +| INTEGER_32, REAL_64, COMPARABLE +| COMPARABLE +|- +| INTEGER_32, REAL_64 +| ANY +|- +| INTEGER_32, detachable COMPARABLE +| detachable COMPARABLE +|- +| INTEGER_32, separate COMPARABLE +| separate COMPARABLE +|- +| detachable STRING, separate COMPARABLE +| detachable separate COMPARABLE +|} \ No newline at end of file