overloadable enums no longer experimental (#20298)

depends on #20126
This commit is contained in:
metagn 2022-09-06 00:38:38 +03:00 • committed by GitHub
commit 5ebd1248df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 27 additions and 41 deletions

View file

@ -89,8 +89,6 @@ No Unicode normalization step is performed.
Overloadable enum value names
=============================
Enabled via `{.experimental: "overloadableEnums".}`.
Enum value names are overloadable, much like routines. If both of the enums
`T` and `U` have a member named `foo`, then the identifier `foo` corresponds
to a choice between `T.foo` and `U.foo`. During overload resolution,
@ -98,7 +96,6 @@ the correct type of `foo` is decided from the context. If the type of `foo` is
ambiguous, a static error will be produced.
```nim test = "nim c $1"
{.experimental: "overloadableEnums".}
type
E1 = enum
@ -124,6 +121,9 @@ ambiguous, a static error will be produced.
p value2
```
Previously required `{.experimental: "overloadableEnums".}` to enable,
now always enabled.
Top-down type inference
=======================