summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorRyan McConnell <rammcconnell@gmail.com>2023-09-30 04:34:14 +0000
committerGitHub <noreply@github.com>2023-09-30 06:34:14 +0200
commitb2ca6bedae6420396682cbf06b3c628cfcf9baf1 (patch)
tree09670f62e1e800412978097ca2e4893613c6e777 /doc
parent714630782371565e3982a3e70e288c7d1e2dd88b (diff)
downloadNim-b2ca6bedae6420396682cbf06b3c628cfcf9baf1.tar.gz
Make `typeRel` behave to spec (#22261)
The goal of this PR is to make `typeRel` accurate to it's definition for
generics:
```
# 3) When used with two type classes, it will check whether the types
# matching the first type class (aOrig) are a strict subset of the types matching
# the other (f). This allows us to compare the signatures of generic procs in
# order to give preferrence to the most specific one:
```

I don't want this PR to break any code, and I want to preserve all of
Nims current behaviors. I think that making this more accurate will help
serve as ground work for the future. It may not be possible to not break
anything but this is my attempt.

So that it is understood, this code was part of another PR (#22143) but
that problem statement only needed this change by extension. It's more
organized to split two problems into two PRs and this issue, being
non-breaking, should be a more immediate improvement.

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'doc')
-rw-r--r--doc/manual_experimental.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/manual_experimental.md b/doc/manual_experimental.md
index d05a693bb..41d463ff8 100644
--- a/doc/manual_experimental.md
+++ b/doc/manual_experimental.md
@@ -919,6 +919,7 @@ The concept matches if:
 
 a) all expressions within the body can be compiled for the tested type
 b) all statically evaluable boolean expressions in the body are true
+c) all type modifiers specified match their respective definitions
 
 The identifiers following the `concept` keyword represent instances of the
 currently matched type. You can apply any of the standard type modifiers such