Work around type resolution with empty generic (#522)

* Work around type resolution with empty generic

* workaround
This commit is contained in:
Jacek Sieka 2024-03-20 12:08:26 +01:00 committed by GitHub
parent 035288f3f0
commit d5bc90fef2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,12 @@ type
## This type gets injected by `async: (raises: ...)` and similar utilities
## and should not be used manually as the internal exception representation
## is subject to change in future chronos versions.
# TODO https://github.com/nim-lang/Nim/issues/23418
# TODO https://github.com/nim-lang/Nim/issues/23419
when E is void:
dummy: E
else:
dummy: array[0, E]
proc makeNoRaises*(): NimNode {.compileTime.} =
# An empty tuple would have been easier but...