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
struct T {
int k,i = 2;
}
struct S {
int x;
T t;
alias ti = t.i;
}
int main() {
T t = T(1, 2);
S s;
assert(s.ti == 2); // Error: accessing non-static variable `i` requires an instance of `T`
return 0;
}