patch 9.0.1974: vim9: using contra-variant type-checks
Problem: vim9: using contra-variant type-checks (after v9.0.1959)
Solution: Use invariant type checking instead
closes: #13248
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt
index 0660254..d8bd032 100644
--- a/runtime/doc/vim9class.txt
+++ b/runtime/doc/vim9class.txt
@@ -547,11 +547,9 @@
is not possible to override them (unlike some other languages).
*E1356* *E1357* *E1358*
-Object methods of the base class can be overruled. The number of arguments
-must be exactly the same. The method argument type can be a contra-variant
-type of the base class method argument type. The method return value type can
-be a covariant type of the base class method return value type. The method of
-the base class can be called by prefixing "super.".
+Object methods of the base class can be overruled. The signature (arguments,
+argument types and return type) must be exactly the same. The method of the
+base class can be called by prefixing "super.".
*E1377*
The access level of a method (public or private) in a child class should be