summary refs log blame commit diff stats
path: root/tests/parser/tinvwhen.nim
blob: 99701bdf52e6e5fff9beb0210499f3a9a42a9db8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13




                                 







                                                                                                  

 
discard """
  file: "tinvwhen.nim"
  line: 11
  errormsg: "invalid indentation"
"""
# This was parsed even though it should not!

proc chdir(path: cstring): cint {.importc: "chdir", header: "dirHeader".}

proc getcwd(buf: cstring, buflen: cint): cstring
    when defined(unix): {.importc: "getcwd", header: "<unistd.h>".} #ERROR_MSG invalid indentation
    elif defined(windows): {.importc: "getcwd", header: "<direct.h>"}
    else: {.error: "os library not ported to your OS. Please help!".}