| 1 | #update=initial version |
| 2 | #file=main.zig |
| 3 | const foo = @import("foo.zig"); |
| 4 | pub fn main() !void { |
| 5 | try foo.hello(); |
| 6 | } |
| 7 | #file=foo.zig |
| 8 | const std = @import("std"); |
| 9 | fn hello() !void { |
| 10 | try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n"); |
| 11 | } |
| 12 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 13 | #expect_error=main.zig:3:12: error: 'hello' is not marked 'pub' |
| 14 | #expect_error=foo.zig:2:1: note: declared here |
| 15 | |
| 16 | #update=make hello pub |
| 17 | #file=foo.zig |
| 18 | const std = @import("std"); |
| 19 | pub fn hello() !void { |
| 20 | try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n"); |
| 21 | } |
| 22 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 23 | #expect_stdout="Hello, World!\n" |