| ... | ... | @@ -396,3 +396,12 @@ test "slice as parameter type" { |
| 396 | 396 | try expect(S.internComptimeString(source_a[1..2]) == S.internComptimeString(source_a[1..2])); |
| 397 | 397 | try expect(S.internComptimeString(source_a[2..4]) != S.internComptimeString(source_a[5..7])); |
| 398 | 398 | } |
| 399 | |
| 400 | test "null sentinel pointer passed as generic argument" { |
| 401 | const S = struct { |
| 402 | fn doTheTest(a: anytype) !void { |
| 403 | try std.testing.expect(@ptrToInt(a) == 8); |
| 404 | } |
| 405 | }; |
| 406 | try S.doTheTest((@intToPtr([*:null]const [*c]const u8, 8))); |
| 407 | } |