aboutsummaryrefslogtreecommitdiff
path: root/test/incremental/change_generic_line_number
blob: f1920c67e6a4df53f8669f9e971899f5ad95d1cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#target=x86_64-linux-selfhosted
#target=x86_64-windows-selfhosted
#target=wasm32-wasi-selfhosted
#update=initial version
#file=main.zig
const std = @import("std");
fn Printer(message: []const u8) type {
    return struct {
        fn print() !void {
            try std.fs.File.stdout().writeAll(message);
        }
    };
}
pub fn main() !void {
    try Printer("foo\n").print();
    try Printer("bar\n").print();
}
#expect_stdout="foo\nbar\n"
#update=change line number
#file=main.zig
const std = @import("std");

fn Printer(message: []const u8) type {
    return struct {
        fn print() !void {
            try std.fs.File.stdout().writeAll(message);
        }
    };
}
pub fn main() !void {
    try Printer("foo\n").print();
    try Printer("bar\n").print();
}
#expect_stdout="foo\nbar\n"