From 007c5e3071efb8f8ed8da172d7b6b1f6e31db903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mamy=20Andr=C3=A9-Ratsimbazafy?= Date: Sun, 28 Apr 2019 14:12:46 +0200 Subject: [PATCH] Fix booleans initialization --- constantine/word_types.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/constantine/word_types.nim b/constantine/word_types.nim index 43cb2b6..4eb0187 100644 --- a/constantine/word_types.nim +++ b/constantine/word_types.nim @@ -15,11 +15,11 @@ type ## by conditional branches, we don't use booleans. ## We use an int to prevent compiler "optimization" and introduction of branches -func ctrue*(T: type(Ct)): auto {.inline.}= - (CTBool[T])(true) +func ctrue*(T: typedesc[BaseUint]): auto {.inline.}= + (CTBool[Ct[T]])(true) -func cfalse*(T: type(Ct)): auto {.inline.}= - (CTBool[T])(false) +func cfalse*(T: typedesc[BaseUint]): auto {.inline.}= + (CTBool[Ct[T]])(false) func ct*[T: BaseUint](x: T): Ct[T] {.inline.}= (Ct[T])(x)