aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/test_inline_switch.zig
diff options
context:
space:
mode:
Diffstat (limited to 'doc/langref/test_inline_switch.zig')
-rw-r--r--doc/langref/test_inline_switch.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/langref/test_inline_switch.zig b/doc/langref/test_inline_switch.zig
index a8ffdb8175..b19c467ef5 100644
--- a/doc/langref/test_inline_switch.zig
+++ b/doc/langref/test_inline_switch.zig
@@ -3,11 +3,11 @@ const expect = std.testing.expect;
const expectError = std.testing.expectError;
fn isFieldOptional(comptime T: type, field_index: usize) !bool {
- const fields = @typeInfo(T).Struct.fields;
+ const fields = @typeInfo(T).@"struct".fields;
return switch (field_index) {
// This prong is analyzed twice with `idx` being a
// comptime-known value each time.
- inline 0, 1 => |idx| @typeInfo(fields[idx].type) == .Optional,
+ inline 0, 1 => |idx| @typeInfo(fields[idx].type) == .optional,
else => return error.IndexOutOfBounds,
};
}