Files
Nim/tests/async/t21893.nim
Jake Leahy a8718d8a9e Fix const in async regression (#21898)
* Add test case for a const being used inside an async proc

* Use `typeof` to get the type of the block instead of overloaded templates

This removes the problem with the symbol having different types

I am unsure why I didn't use this in the first place. IIRC I had problems with `typeof` when I first tried to use it in the original implementation
2023-05-25 07:08:36 +02:00

14 lines
171 B
Nim

discard """
output: "@[97]\ntrue"
"""
import asyncdispatch
proc test(): Future[bool] {.async.} =
const S4 = @[byte('a')]
echo S4
return true
echo waitFor test()