You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related:
It seems that only generic functions have parameters available right after they have been analyzed, while normal functions do not allow this. Is this intended?
// error: use of undeclared identifier 'b'
pub fn a(b: u8, c: @typeOf(b)) void {}
test "" {
a(2, 2);
}
// Works, even though b is not generic
pub fn a(comptime Q: type, b: u8, c: @typeOf(b)) void {}
test "" {
a(u8, 2, 2);
}
@andrewrk I don't really have a usecase other than consistency, but I don't think it matters to much. Was just making sure that was how it should work.
The text was updated successfully, but these errors were encountered: