From 59e9196edc2885fa92da2e527d16218e1adfb5c9 Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Mon, 24 Mar 2025 19:41:56 +1100 Subject: [PATCH] fix eventually symbol resolution Because `eventuallySafe` calls the symbol `eventually`, it should be declared before `proc eventually` is declared to avoid ambiguous symbol lookups. --- tests/asynctest.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/asynctest.nim b/tests/asynctest.nim index 39492fa6..6f9d2d42 100644 --- a/tests/asynctest.nim +++ b/tests/asynctest.nim @@ -2,12 +2,12 @@ import pkg/asynctest/chronos/unittest2 export unittest2 except eventually -template eventually*(expression: untyped, timeout = 5000, pollInterval = 10): bool = - ## Fast defaults, do not use with HTTP connections! - eventually(expression, timeout, pollInterval) - template eventuallySafe*( expression: untyped, timeout = 5000, pollInterval = 1000 ): bool = ## More sane defaults, for use with HTTP connections - eventually(expression, timeout = timeout, pollInterval = pollInterval) + eventually(expression, timeout, pollInterval) + +template eventually*(expression: untyped, timeout = 5000, pollInterval = 10): bool = + ## Fast defaults, do not use with HTTP connections! + eventually(expression, timeout, pollInterval)