tinvwhen.nim 495 B

12345678910111213141516
  1. discard """
  2. file: "tinvwhen.nim"
  3. line: 11
  4. errormsg: "invalid indentation"
  5. """
  6. # This was parsed even though it should not!
  7. proc chdir(path: cstring): cint {.importc: "chdir", header: "dirHeader".}
  8. proc getcwd(buf: cstring, buflen: cint): cstring
  9. when defined(unix): {.importc: "getcwd", header: "<unistd.h>".} #ERROR_MSG invalid indentation
  10. elif defined(windows): {.importc: "getcwd", header: "<direct.h>"}
  11. else: {.error: "os library not ported to your OS. Please help!".}