| author | |
| committer | |
| log | 26064984097889353dda38423ac8b876f373526f |
| tree | 074e8206bc4d4329665b14a9faabfae8666e795c |
| parent | 20cc69318f4661795aaacdc55bcaabb5f2e6484e |
Closes #15572.2 files changed, 22 insertions(+), 0 deletions(-)
src/Module.zig+2| ... | @@ -6115,6 +6115,8 @@ pub const PeerTypeCandidateSrc = union(enum) { | ... | @@ -6115,6 +6115,8 @@ pub const PeerTypeCandidateSrc = union(enum) { |
| 6115 | return null; | 6115 | return null; |
| 6116 | }, | 6116 | }, |
| 6117 | .override => |candidate_srcs| { | 6117 | .override => |candidate_srcs| { |
| 6118 | if (candidate_i >= candidate_srcs.len) | ||
| 6119 | return null; | ||
| 6118 | return candidate_srcs[candidate_i]; | 6120 | return candidate_srcs[candidate_i]; |
| 6119 | }, | 6121 | }, |
| 6120 | .typeof_builtin_call_node_offset => |node_offset| { | 6122 | .typeof_builtin_call_node_offset => |node_offset| { |
test/cases/compile_errors/issue_15572_break_on_inline_while.zig created+20| ... | @@ -0,0 +1,20 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | |||
| 3 | pub const DwarfSection = enum { | ||
| 4 | eh_frame, | ||
| 5 | eh_frame_hdr, | ||
| 6 | }; | ||
| 7 | |||
| 8 | pub 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 | // backend=stage2 | ||
| 18 | // target=native | ||
| 19 | // | ||
| 20 | // :9:28: error: incompatible types: 'builtin.Type.EnumField' and 'void' | ||