Is this a bug?
Andrey via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Apr 28 01:58:40 PDT 2014
Could anyone please explain to me, why do I have error message on
this piece of code?
alias short Type1;
alias Type1[100]* Type2; // pointer to an array
struct Type3
{
Type2 f
}
void foo()
{
Type3* b;
Type1 d;
d = b.f[10]; // compilation error: cannot implicitly convert
expression ((*b).f[10]) of type short[100] to short
d = b.f[0][10]; // ok
}
Thank you in advance
More information about the Digitalmars-d-learn
mailing list