Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csources2 #251

Open
2 tasks done
timotheecour opened this issue May 25, 2020 · 2 comments
Open
2 tasks done

csources2 #251

timotheecour opened this issue May 25, 2020 · 2 comments

Comments

@timotheecour
Copy link
Owner

timotheecour commented May 25, 2020

@timotheecour
Copy link
Owner Author

timotheecour commented Jan 31, 2021

const nimHasImportcLet = compiles(block:
  let foo {.nodecl, importc.}: cint) # xxx move, and replace with `nimVersionCT`
    # pending bootstrap >= https://github.com/nim-lang/Nim/pull/14258, remove this

@timotheecour
Copy link
Owner Author

  • runnableExamples("-r:off") requires nim >= 1.4.0 to work properly, eg:

nim c main gives: Error: undeclared identifier: 'bar'
for nim 1.2 (and bin/nim_csources_a8a5241f9475099c823cfe1a5e0ca4022ac201ff), but works with 1.4; this caused me to use a workaround (if false) in nim-lang#17468

proc foo*[T](a: T) =
  runnableExamples("-r:off"):
    bar()
  discard

proc bar*() = discard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant