juancarlospaco / nim-contra

Lightweight Self-Documenting Design by Contract Programming and Security Hardened mode.
https://dev.to/juancarlospaco/design-by-contract-immutability-side-effects-and-gulag-44fk
MIT License
54 stars 3 forks source link

Using assercho fails compilation #2

Open Udiknedormin opened 4 years ago

Udiknedormin commented 4 years ago

For Nim 1.2.0 and file "assertecho_test.nim":

import contra

let foo = 42
let bar = 9
assercho(foo > bar, "Assercho for all the Brochachos!")

Compilation aborts with:

$ nim c -r assertecho_test.nim
(...)/assertecho_test.nim(5, 9) template/generic instantiation of `assercho` from here
(...)/nim-1.2.0/lib/core/macros.nim(565, 1) Error: undeclared identifier: 'internalAssercho'

I run it on Linux, Nim's default C compiler is gcc.

slowpoke-lizard commented 3 years ago

Same error in nim 1.4, Debian and gcc as well.