On Wed, 29 Jul 2009 14:39:07 -0400, Ary Borenszweig <[email protected]> wrote:

a.b.c = d;

If b is anything that has a struct type, and c is anything else, the statement must report an error.

struct S
{
  int *x;
  void c(int n) {*x = n;}
}

struct S2
{
  int n;
  S b() { return S(&n);}
}

void main()
{
  S2 a;
  a.b.c = 5;
}

Why should this not be allowed?

Reply via email to