master
 1const std = @import("std");
 2
 3pub const DwarfSection = enum {
 4    eh_frame,
 5    eh_frame_hdr,
 6};
 7
 8pub fn main() void {
 9    const section = inline for (@typeInfo(DwarfSection).@"enum".fields) |section| {
10        if (std.mem.eql(u8, section.name, "eh_frame")) break section;
11    };
12
13    _ = section;
14}
15
16// error
17// target=x86_64-linux
18//
19// :9:28: error: incompatible types: 'builtin.Type.EnumField' and 'void'