From c9eddf9268559c7b1221a71ee80ae46658ac7d30 Mon Sep 17 00:00:00 2001 From: halw Date: Wed, 29 Sep 2010 14:39:30 +0000 Subject: [PATCH] Clarification of Note on implementation of non-conforming inheritance Author:halw Date:2010-09-29T14:39:30.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@682 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../current/method/eiffel-tutorial-et/et-inheritance.wiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/current/method/eiffel-tutorial-et/et-inheritance.wiki b/documentation/current/method/eiffel-tutorial-et/et-inheritance.wiki index 04765f6e..e7bfac94 100644 --- a/documentation/current/method/eiffel-tutorial-et/et-inheritance.wiki +++ b/documentation/current/method/eiffel-tutorial-et/et-inheritance.wiki @@ -998,7 +998,7 @@ Here there are two inherit clauses, one to specify conforming paren So, in this case, at runtime it is valid for a direct instance of MY_HEIR_CLASS to be attached to an entity of type MY_CONFORMING_PARENT, but not to an entity of type MY_NON_CONFORMING_PARENT. Accordingly, the compiler would reject any code in which an instance of MY_HEIR_CLASS could become attached to an entity of type MY_NON_CONFORMING_PARENT. Because the polymorphic attachment cannot be made, the possibility of a catcall is avoided. -{{note|As implemented, non-conforming inheritance mimics a copy/paste operation in which the features of the parent class are copied to the non-conforming heir class with no inheritance linkage maintained. You should keep this fact in mind when using non-conforming inheritance. For example, once functions are replicated as unrelated features in the heir classes, so they are executed for each type.}} +{{note|As implemented, non-conforming inheritance mimics a copy/paste operation in which the features of the parent class are copied to the non-conforming heir class with no inheritance linkage maintained. You should keep this fact in mind when using non-conforming inheritance. In particular, once routines are replicated as unrelated features in the heir classes, so they share neither freshness status nor computed value (in the case of functions). Thus, a once function that comes from a non-conforming parent yields a result that is not related to the one returned by the parent's version.}}