translate-c: fix redefinition of label on left recursive comma operator
Closes #13239
This commit is contained in:
@@ -499,20 +499,20 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
|
||||
\\int baz(int x, int y) { return 0; }
|
||||
\\#define bar(x) (&x, +3, 4 == 4, 5 * 6, baz(1, 2), 2 % 2, baz(1,2))
|
||||
, &[_][]const u8{
|
||||
\\pub const foo = blk: {
|
||||
\\pub const foo = blk_1: {
|
||||
\\ _ = @TypeOf(foo);
|
||||
\\ break :blk bar;
|
||||
\\ break :blk_1 bar;
|
||||
\\};
|
||||
,
|
||||
\\pub inline fn bar(x: anytype) @TypeOf(baz(@as(c_int, 1), @as(c_int, 2))) {
|
||||
\\ return blk: {
|
||||
\\ return blk_1: {
|
||||
\\ _ = &x;
|
||||
\\ _ = @as(c_int, 3);
|
||||
\\ _ = @as(c_int, 4) == @as(c_int, 4);
|
||||
\\ _ = @as(c_int, 5) * @as(c_int, 6);
|
||||
\\ _ = baz(@as(c_int, 1), @as(c_int, 2));
|
||||
\\ _ = @as(c_int, 2) % @as(c_int, 2);
|
||||
\\ break :blk baz(@as(c_int, 1), @as(c_int, 2));
|
||||
\\ break :blk_1 baz(@as(c_int, 1), @as(c_int, 2));
|
||||
\\ };
|
||||
\\}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user