Closed
Description
const S = struct {
T: type
};
// error: expected type 'type', found '&const type'
// V
fn takeS(comptime s: S, a: &s.T) void { }
test "" {
var a : u8 = 0;
const s = S { .T = u8 };
takeS(s, &a);
}
Deref the &const type
, and we get this error:
const S = struct {
T: type
};
fn takeS(comptime s: S, a: &*s.T) void { }
test "" {
var a : u8 = 0;
const s = S { .T = u8 };
takeS(s, &a); // error: expected type 'u8', found '&u8'
}
Metadata
Metadata
Assignees
Labels
No labels