Fix compilation issue with Nim 1.6.16

Workaround for https://github.com/nim-lang/Nim/issues/22897
This commit is contained in:
Mark Spanbroek 2023-11-07 10:41:47 +01:00 committed by markspanbroek
parent af4f194597
commit 52e11f2011
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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())