A bug in 0.17's dereferencing comptime slices?
Ziggit
A bug in 0.17's dereferencing comptime slices?
const print = @import("std").debug.print; var x: [2]bool = .{false, true}; // global runtime value pub fn main() void { // 's' is a comptime slice. const s: []bool = &x; print("{}\n", .{ @TypeOf(s) }); // []bool print("{}\n", .{ s[0] }); // false print("{}\n", .{ @TypeOf(s[0]) }); // bool print("{}\n", .{ @TypeOf(s.*) }); // bool (should be '[]bool'?) }
0 comments
No comments yet.