summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--changelog.md4
-rw-r--r--compiler/semstmts.nim5
-rw-r--r--doc/manual.rst2
3 files changed, 8 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md
index ea2c8a927..47d4460df 100644
--- a/changelog.md
+++ b/changelog.md
@@ -33,6 +33,7 @@
   tree from the symbol declaration instead of just the initializer portion.
 
 - To use multi-methods, explicit `--multimethods:on` is now needed.
+- Generic methods are now deprecated; they never worked well.
 
 - Compile time checks for integer and float conversions are now stricter.
   For example, `const x = uint32(-1)` now gives a compile time error instead
@@ -45,7 +46,8 @@
 - A bug allowed `macro foo(): int = 123` to compile even though a
   macros has to return a `NimNode`. This has been fixed.
 
-- With the exception of `uint` and `uint64`, conversion to unsigned types are now range checked during runtime.
+- With the exception of `uint` and `uint64`, conversion to unsigned types
+  are now range checked during runtime.
 
 #### Breaking changes in the standard library
 
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index be7d9a1bf..1aa5c9fec 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -1712,8 +1712,9 @@ proc semMethodPrototype(c: PContext; s: PSym; n: PNode) =
         if x.kind == tyObject and t.len-1 == n.sons[genericParamsPos].len:
           foundObj = true
           x.methods.add((col,s))
-    if not foundObj:
-      message(c.config, n.info, warnDeprecated, "generic method not attachable to object type is deprecated")
+    message(c.config, n.info, warnDeprecated, "generic methods are deprecated")
+    #if not foundObj:
+    #  message(c.config, n.info, warnDeprecated, "generic method not attachable to object type is deprecated")
   else:
     # why check for the body? bug #2400 has none. Checking for sfForward makes
     # no sense either.
diff --git a/doc/manual.rst b/doc/manual.rst
index 53f900ae3..00635fefc 100644
--- a/doc/manual.rst
+++ b/doc/manual.rst
@@ -3526,6 +3526,8 @@ the effects that a call to ``m`` might cause.
 
 **Note**: Compile-time execution is not (yet) supported for methods.
 
+**Note**: Starting from Nim 0.20, generic methods are deprecated.
+
 
 Inhibit dynamic method resolution via procCall
 -----------------------------------------------