Check file exists in {.compile.} pragma (#21105)

* Add test

* Check file exists before adding it into compilation

* Make error message look like other error messages

i.e. following the format `error msg: file`
This commit is contained in:
Jake Leahy 2022-12-16 05:22:45 +11:00 • committed by GitHub
commit d00477dffb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -0,0 +1,5 @@
discard """
joinable: false
errormsg: "cannot find: noexist.c"
"""
{.compile: "noexist.c".}