diff options
author | metagn <metagngn@gmail.com> | 2022-12-01 10:01:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-01 08:01:13 +0100 |
commit | 2449c37137c001e5c645978a6bf09c4b1d87dea7 (patch) | |
tree | 4e74a41e7daea447ab4dd897a67eaf02367098d2 /doc | |
parent | b36f5119ae3e4f450960a86ff77eaae4e9b05fcd (diff) | |
download | Nim-2449c37137c001e5c645978a6bf09c4b1d87dea7.tar.gz |
better procvar ambiguity errors, clean up after #20457 (#20932)
* better procvar ambiguity errors, clean up after #20457 fixes #6359, fixes #13849 * only trigger on closedsymchoice again * new approach * add manual entry for ambiguous enums too * add indent [skip ci] * move to proc
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/manual.md b/doc/manual.md index a4f864eaa..378aaed90 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -1365,6 +1365,23 @@ ambiguous, a static error will be produced. p value2 ``` +In some cases, ambiguity of enums is resolved depending on the relation +between the current scope and the scope the enums were defined in. + + ```nim + # a.nim + type Foo* = enum abc + + # b.nim + import a + type Bar = enum abc + echo abc is Bar # true + + block: + type Baz = enum abc + echo abc is Baz # true + ``` + To implement bit fields with enums see [Bit fields]. |