summary refs log tree commit diff stats
path: root/changelogs
diff options
context:
space:
mode:
authorPhilippMDoerner <philippmdoerner@web.de>2023-02-26 09:57:51 +0100
committerGitHub <noreply@github.com>2023-02-26 16:57:51 +0800
commit425225119a383511ac6f84ba5c02a691e6c51aea (patch)
tree6def2c58565eb6fff9c18787ff3170edaac0e5a3 /changelogs
parentb2edfe7a02f49f07eb9fcf71cd500215725c217e (diff)
downloadNim-425225119a383511ac6f84ba5c02a691e6c51aea.tar.gz
Add mention of breaking change about `[_]` in generics to changelog (#21437)
Add mention of breaking change to changelog

As described by #21435 , generic proc declarations making use of `_` as generic
parameter are no longer possible. This is a change that was introduced by 
#21192 . During the debate over if this should be part of the intended spec in
#21435 we concluded that it is and thus should be mentioned as a breaking
change in the changelogs.
Diffstat (limited to 'changelogs')
-rw-r--r--changelogs/changelog_2_0_0.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/changelogs/changelog_2_0_0.md b/changelogs/changelog_2_0_0.md
index c8427cc2a..e081865be 100644
--- a/changelogs/changelog_2_0_0.md
+++ b/changelogs/changelog_2_0_0.md
@@ -149,6 +149,13 @@
   proc foo(_, _: int): int = 123
   echo foo(1, 2)
   ```
+- Underscores (`_`) as generic parameters are not supported and cannot be used.
+  Generics that use `_` as parameters will no longer compile requires you to replace `_` with something else:
+  
+  ```nim
+  proc foo[_](t: typedesc[_]): string = "BAR" # Can not compile
+  proc foo[T](t: typedesc[T]): string = "BAR" # Can compile
+  ```
 
 - - Added the `--legacy:verboseTypeMismatch` switch to get legacy type mismatch error messages.