diff options
| author | Matthew Lugg <mlugg@mlugg.co.uk> | 2024-11-11 20:00:00 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-11 20:00:00 +0000 |
| commit | 28bdab385a80aaff736707a9227af2d1a17e7fa4 (patch) | |
| tree | 66e6d8479ad4152b9fee6f958f1061f86c180584 /test/incremental/function_becomes_inline | |
| parent | 560d6b99d5be8e906b7d8d70a2b2e1f1d4da4f89 (diff) | |
| parent | 6e56bc1096eb99a065bc7222bf3264142251da6d (diff) | |
| download | zig-28bdab385a80aaff736707a9227af2d1a17e7fa4.tar.gz zig-28bdab385a80aaff736707a9227af2d1a17e7fa4.zip | |
Merge pull request #21961 from mlugg/incr-cases
incremental: remove legacy cases, add some new ones
Diffstat (limited to 'test/incremental/function_becomes_inline')
| -rw-r--r-- | test/incremental/function_becomes_inline | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/incremental/function_becomes_inline b/test/incremental/function_becomes_inline new file mode 100644 index 0000000000..b7e604bfac --- /dev/null +++ b/test/incremental/function_becomes_inline @@ -0,0 +1,35 @@ +//#target=x86_64-linux-selfhosted +#target=x86_64-linux-cbe +#target=x86_64-windows-cbe +#update=non-inline version +#file=main.zig +pub fn main() !void { + try foo(); +} +fn foo() !void { + try std.io.getStdOut().writer().writeAll("Hello, World!\n"); +} +const std = @import("std"); +#expect_stdout="Hello, World!\n" + +#update=make function inline +#file=main.zig +pub fn main() !void { + try foo(); +} +inline fn foo() !void { + try std.io.getStdOut().writer().writeAll("Hello, World!\n"); +} +const std = @import("std"); +#expect_stdout="Hello, World!\n" + +#update=change string +#file=main.zig +pub fn main() !void { + try foo(); +} +inline fn foo() !void { + try std.io.getStdOut().writer().writeAll("Hello, `inline` World!\n"); +} +const std = @import("std"); +#expect_stdout="Hello, `inline` World!\n" |
