From 52e11f201102e03d9ae1fcf670a021cc3b13e0e5 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 7 Nov 2023 10:41:47 +0100 Subject: [PATCH] Fix compilation issue with Nim 1.6.16 Workaround for https://github.com/nim-lang/Nim/issues/22897 --- .github/workflows/ci.yml | 2 +- questionable/binding.nim | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2238c8..12a81fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - nim: [stable, 1.6.14, 1.4.8, 1.2.18] + nim: [stable, 1.6.16, 1.4.8, 1.2.18] steps: - uses: actions/checkout@v2 - uses: iffy/install-nim@v3 diff --git a/questionable/binding.nim b/questionable/binding.nim index bdd0ee1..3a68107 100644 --- a/questionable/binding.nim +++ b/questionable/binding.nim @@ -8,7 +8,7 @@ proc option[T](option: Option[T]): Option[T] = proc placeholder(T: type): T = discard -template bindLet(name, expression): bool = +template bindLet(name, expression): untyped = let evaluated = expression let option = evaluated.option type T = typeof(option.unsafeGet()) @@ -19,7 +19,7 @@ template bindLet(name, expression): bool = placeholder(T) option.isSome -template bindVar(name, expression): bool = +template bindVar(name, expression): untyped = let evaluated = expression let option = evaluated.option type T = typeof(option.unsafeGet())