mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 11:42:33 +00:00
* 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
14 lines
171 B
Nim
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()
|
|
|