Regression: importc functions are not declared in generated C code #5136

Closed
yglukhov opened this Issue Dec 21, 2016 · 0 comments

Projects

None yet

1 participant

@yglukhov
Member

This code should print "Hello world", but crashes instead

{.compile: "foo.c".}
proc myFunc(): cstring {.importc.}
echo myFunc()
// foo.c
char* myFunc() {
    return "Hello world";
}
@Araq Araq added a commit that closed this issue Dec 21, 2016
@Araq Araq fixes #5136 d2fe857
@Araq Araq closed this in d2fe857 Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment