zig/test/incremental/modify_inline_fn
mlugg a99ad52b36
Sema: register correct dependencies for inline calls
And add a corresponding test case.
2024-08-21 01:30:46 +01:00

23 lines
495 B
Text

#target=x86_64-linux
#update=initial version
#file=main.zig
const std = @import("std");
pub fn main() !void {
const str = getStr();
try std.io.getStdOut().writeAll(str);
}
inline fn getStr() []const u8 {
return "foo\n";
}
#expect_stdout="foo\n"
#update=change the string
#file=main.zig
const std = @import("std");
pub fn main() !void {
const str = getStr();
try std.io.getStdOut().writeAll(str);
}
inline fn getStr() []const u8 {
return "bar\n";
}
#expect_stdout="bar\n"