I think I'm merely running up against the limitations of 'alias' here. Can 'alias' be used to alias variables? And if so, what are the restrictions? The spec isn't of much use here. For reference, here is a shortened test case that exhibits the problem. Why can I alias 'i' but not 's.i'? Is it merely a scope issue?
C:\code\d\bugs>type 145_2.d
void main()
{
struct S { int i; }
S s;
int i;
alias i a1;
alias s.i a2;
}
C:\code\d\bugs>dmd 145_2.d
145_2.d(8): s.i is used as a type
C:\code\d\bugs>
DStress test cases:
http://dstress.kuehne.cn/run/a/alias_29_A.dhttp://dstress.kuehne.cn/run/a/alias_29_B.d