diff --git a/documentation/current/examples/example-polymorphism.wiki b/documentation/current/examples/example-polymorphism.wiki index 290c1ee3..3896a8a2 100644 --- a/documentation/current/examples/example-polymorphism.wiki +++ b/documentation/current/examples/example-polymorphism.wiki @@ -8,7 +8,7 @@ Create a class POINT and its heir CIRCLE to demonstrate polymorphic attachment a ==Source== -Problem description from [http://rosettacode.org/wiki/Polymorphism Rosetta Code] +Problem description from [http://rosettacode.org/wiki/Polymorphism Rosetta Code: Polymorphism] Solution varies from Rosetta Code description (e. g., feature out is redefined in this solution, versus feature print.) diff --git a/documentation/current/method/eiffel-tutorial-et/et-inheritance.wiki b/documentation/current/method/eiffel-tutorial-et/et-inheritance.wiki index be5ea0e3..c172ea31 100644 --- a/documentation/current/method/eiffel-tutorial-et/et-inheritance.wiki +++ b/documentation/current/method/eiffel-tutorial-et/et-inheritance.wiki @@ -983,7 +983,11 @@ Likewise the compiler in EiffelStudio will produce warnings in cases in which ca So far, our experience with inheritance is that of "conforming" inheritance ... the most commonly used type of inheritance. Conforming inheritance is what allows a direct instance (in the '''catcall''' example above) of COW to be attached at runtime to an entity of type ANIMAL. This can be a powerful modeling capability, but it is this same polymorphism facilitated by conforming inheritance that puts us in the danger of using polymorphic '''catcalls'''. -In cases in which polymorphic attachment is not anticipated, the possibility of catcalls can be avoided by using '''non-conforming inheritance'''. Non-conforming inheritance is just a more restrictive form of inheritance. It allows features to be inherited from parent to heir, but it disallows polymorphic attachment of a direct instance of an heir to an entity based on a non-conforming parent. +In cases in which polymorphic attachment is not anticipated, the possibility of catcalls can be avoided by using '''non-conforming inheritance'''. Non-conforming inheritance is just a more restrictive form of inheritance. + + +:'''Non-conforming inheritance allows features to be inherited from parent to heir, but it disallows polymorphic attachment of a direct instance of an heir to an entity based on a non-conforming parent.''' + In order to use non-conforming inheritance for a particular parent, we use the marker {NONE} in the appropriate inheritance part of the class: