From d5bc90fef22cc32ef5ce4a037a852fd081dd5c0c Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Wed, 20 Mar 2024 12:08:26 +0100 Subject: [PATCH] Work around type resolution with empty generic (#522) * Work around type resolution with empty generic * workaround --- chronos/internal/raisesfutures.nim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chronos/internal/raisesfutures.nim b/chronos/internal/raisesfutures.nim index 2e09a1db..07e3438e 100644 --- a/chronos/internal/raisesfutures.nim +++ b/chronos/internal/raisesfutures.nim @@ -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...