closed ambiguous enum defaults to first overload (#20457)

* closed ambiguous enum defaults to first overload

* add warning

* turn to hint

* work around config
This commit is contained in:
metagn 2022-10-01 14:30:23 +03:00 • committed by GitHub
commit cfff454cf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 37 additions and 8 deletions

View file

@ -8,3 +8,8 @@ template t =
doAssert some(Success)
t()
block: # legacy support for behavior before overloadableEnums
# warning: ambiguous enum field 'Success' assumed to be of type MyEnum
let x = {Success}
doAssert x is set[MyEnum]