diff options
author | Jake Leahy <jake@leahy.dev> | 2022-12-12 00:44:41 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-11 14:44:41 +0100 |
commit | c7493bbdd0a9b8d63d6851971f2294923cf2e3a7 (patch) | |
tree | ca672dabe2aa8bb594989e6632b5092177b4ae30 /lib/pure | |
parent | 1585bfec3bf6d6ad59f2bcbc82be2b2ba87f7313 (diff) | |
download | Nim-c7493bbdd0a9b8d63d6851971f2294923cf2e3a7.tar.gz |
`multisync` now allows tuples in return type (#21074)
* Add test case * Use .toStrLit() on param node first This means that more complex types are fully rendered
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/asyncmacro.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/asyncmacro.nim b/lib/pure/asyncmacro.nim index fa5d981a7..c4f6fd80e 100644 --- a/lib/pure/asyncmacro.nim +++ b/lib/pure/asyncmacro.nim @@ -286,8 +286,8 @@ macro async*(prc: untyped): untyped = proc splitParamType(paramType: NimNode, async: bool): NimNode = result = paramType if paramType.kind == nnkInfix and paramType[0].strVal in ["|", "or"]: - let firstAsync = "async" in paramType[1].strVal.normalize - let secondAsync = "async" in paramType[2].strVal.normalize + let firstAsync = "async" in paramType[1].toStrLit().strVal.normalize + let secondAsync = "async" in paramType[2].toStrLit().strVal.normalize if firstAsync: result = paramType[if async: 1 else: 2] |