Skip to content

Commit c5a0d71

Browse files
Add catch to analysis tests for peer type resolution with error sets
1 parent 58b10fd commit c5a0d71

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/analysis/peer_type_resolution.zig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,35 +131,35 @@ pub fn main() !void {
131131
// ^^^^^^^^^^^^^^ (error{A,B}!error{B,A}!?S)()
132132

133133
const error_union_16 = if (runtime_bool) error.A else s;
134-
_ = error_union_16;
134+
_ = error_union_16 catch {};
135135
// ^^^^^^^^^^^^^^ (error{A}!S)()
136136

137137
const error_union_17 = if (runtime_bool) s else error.A;
138-
_ = error_union_17;
138+
_ = error_union_17 catch {};
139139
// ^^^^^^^^^^^^^^ (error{A}!S)()
140140

141141
const error_union_18 = if (runtime_bool) error.A else @as(i32, 0);
142-
_ = error_union_18;
142+
_ = error_union_18 catch {};
143143
// ^^^^^^^^^^^^^^ (error{A}!i32)()
144144

145145
const error_union_19 = if (runtime_bool) @as(i32, 0) else error.A;
146-
_ = error_union_19;
146+
_ = error_union_19 catch {};
147147
// ^^^^^^^^^^^^^^ (error{A}!i32)()
148148

149149
const error_union_20 = if (runtime_bool) error.A else @as(error{B}!S, s);
150-
_ = error_union_20;
150+
_ = error_union_20 catch {};
151151
// ^^^^^^^^^^^^^^ (error{A,B}!S)()
152152

153153
const error_union_21 = if (runtime_bool) @as(error{B}!S, s) else error.A;
154-
_ = error_union_21;
154+
_ = error_union_21 catch {};
155155
// ^^^^^^^^^^^^^^ (error{A,B}!S)()
156156

157157
const error_union_22 = if (runtime_bool) error.A else @as(error{B}!i32, 0);
158-
_ = error_union_22;
158+
_ = error_union_22 catch {};
159159
// ^^^^^^^^^^^^^^ (error{A,B}!i32)()
160160

161161
const error_union_23 = if (runtime_bool) @as(error{B}!i32, 0) else error.A;
162-
_ = error_union_23;
162+
_ = error_union_23 catch {};
163163
// ^^^^^^^^^^^^^^ (error{A,B}!i32)()
164164

165165
const noreturn_0 = if (runtime_bool) s else return;

0 commit comments

Comments
 (0)