mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 08:14:48 +00:00
stage2: augment stage2 test to test optional payload lowering
This commit is contained in:
parent
0e3cd5bb1e
commit
557268a448
@ -1709,6 +1709,8 @@ pub fn addCases(ctx: *TestContext) !void {
|
||||
\\ var x: u32 = undefined;
|
||||
\\ const maybe_x = byPtr(&x);
|
||||
\\ assert(maybe_x != null);
|
||||
\\ maybe_x.?.* = 123;
|
||||
\\ assert(x == 123);
|
||||
\\}
|
||||
\\
|
||||
\\fn byPtr(x: *u32) ?*u32 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user