From e8fda46156d4cf188c9c12fe345f7db66d711ce9 Mon Sep 17 00:00:00 2001 From: eiffel-org Date: Fri, 29 Sep 2023 14:14:23 +0000 Subject: [PATCH] Small change to explanation of covariance and catcalls Updated wikipage Eiffel for .NET Integration. (Signed-off-by:bmeyer). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2412 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../dotnet/eiffel-net-language/eiffel-net-integration.wiki | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration.wiki b/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration.wiki index 93b0457b..550adfe1 100644 --- a/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration.wiki +++ b/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration.wiki @@ -1,4 +1,4 @@ -[[Property:modification_date|Fri, 29 Sep 2023 08:01:26 GMT]] +[[Property:modification_date|Fri, 29 Sep 2023 14:14:22 GMT]] [[Property:publication_date|Wed, 27 Sep 2023 19:33:07 GMT]] [[Property:title|Eiffel for .NET Integration]] [[Property:weight|3]] @@ -47,11 +47,11 @@ Using the metadata tag is the most general way of applying a custom ===Covariance=== -The CLR (Common Language Runtime) does not support [[ET: Inheritance#Covariance and anchored declarations|covariance]] due to a type safety issue that full covariance implies (known as a polymorphic [[ET: Inheritance#Catcalls|catcall]] in Eiffel). Although very rare, catcalls are not suitable to .NET where safety is one of the primary goals. +The CLR (Common Language Runtime) does not support [[ET: Inheritance#Covariance and anchored declarations|covariance]] due to a different view of type safety (the issue is known known as a polymorphic [[ET: Inheritance#Catcalls|catcall]] in Eiffel). Catcalls are possible (although very rare) in Eiffel but not in .NET. Eiffel for .NET implements a safe variant of covariance that will always perform a check on the types to avoid a catcall. So when a catcall is going to be performed a `Invalid Cast Exception` will be raised by the CLR instead of an unexpected behavior as is the default behavior in classic Eiffel (i.e., the behavior without catcall detection explicitly enabled). -Another advantage of Eiffel for .NET's implementation of covariance is that it can be easily understood by CLS compliant consumer tools. These tools will actually benefit from the Eiffel for .NET covariance. +Another advantage of Eiffel for .NET's implementation of covariance is that it can be easily understood by CLS-compliant consumer tools. These tools will actually benefit from the Eiffel for .NET covariance. ===Genericity===