fix @embedFile("") not giving a proper error

Currently, in a debug build of the compiler, `@embedFile("")` is a crash;
in a release build the compiler, `@embedFile("")` is "error: unable to open '': OutOfMemory".
This commit is contained in:
r00ster91
2023-07-21 23:08:04 +02:00
parent 279ebabd7d
commit 72ac37952e
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
const resource = @embedFile("");
export fn entry() usize {
return @sizeOf(@TypeOf(resource));
}
// error
// backend=stage2
// target=native
//
// :1:29: error: file path name cannot be empty