| ... | @@ -316,7 +316,7 @@ pub fn formatType( | ... | @@ -316,7 +316,7 @@ pub fn formatType( |
| 316 | options: FormatOptions, | 316 | options: FormatOptions, |
| 317 | out_stream: var, | 317 | out_stream: var, |
| 318 | max_depth: usize, | 318 | max_depth: usize, |
| 319 | ) !void { | 319 | ) @TypeOf(out_stream).Error!void { |
| 320 | if (comptime std.mem.eql(u8, fmt, "*")) { | 320 | if (comptime std.mem.eql(u8, fmt, "*")) { |
| 321 | try out_stream.writeAll(@typeName(@TypeOf(value).Child)); | 321 | try out_stream.writeAll(@typeName(@TypeOf(value).Child)); |
| 322 | try out_stream.writeAll("@"); | 322 | try out_stream.writeAll("@"); |
| ... | @@ -1472,19 +1472,19 @@ test "enum" { | ... | @@ -1472,19 +1472,19 @@ test "enum" { |
| 1472 | try testFmt("E.Two", "{}", .{inst}); | 1472 | try testFmt("E.Two", "{}", .{inst}); |
| 1473 | } | 1473 | } |
| 1474 | | 1474 | |
| 1475 | // test "struct.self-referential" { | 1475 | test "struct.self-referential" { |
| 1476 | // const S = struct { | 1476 | const S = struct { |
| 1477 | // const SelfType = @This(); | 1477 | const SelfType = @This(); |
| 1478 | // a: ?*SelfType, | 1478 | a: ?*SelfType, |
| 1479 | // }; | 1479 | }; |
| 1480 | | 1480 | |
| 1481 | // var inst = S{ | 1481 | var inst = S{ |
| 1482 | // .a = null, | 1482 | .a = null, |
| 1483 | // }; | 1483 | }; |
| 1484 | // inst.a = &inst; | 1484 | inst.a = &inst; |
| 1485 | | 1485 | |
| 1486 | // try testFmt("S{ .a = S{ .a = S{ .a = S{ ... } } } }", "{}", .{inst}); | 1486 | try testFmt("S{ .a = S{ .a = S{ .a = S{ ... } } } }", "{}", .{inst}); |
| 1487 | // } | 1487 | } |
| 1488 | | 1488 | |
| 1489 | test "struct.zero-size" { | 1489 | test "struct.zero-size" { |
| 1490 | const A = struct { | 1490 | const A = struct { |