For some reason, the error is just wrong. Simply putting a discard statement in 
front of your bottom expression works:
    
    
    import asyncdispatch
    
    template test: untyped =
      return true
    
    proc main(): Future[bool] {.async.} =
      test
    
    discard waitFor main()
    
    
    Run

Reply via email to