www.digitalmars.com         C & C++   DMDScript  

D - might be not a bug, but...

reply "Pavel Minayev" <evilone omen.ru> writes:
The following piece of code compiles fine:

    alias ABC* LPABC;
    class ABC { }

On other hand, this one gives a "symbol used as a type" error:

    alias ABC* LPABC;
    struct ABC { }

Going further, this doesn't work:

    struct ABC
    {
     XYZ* x;
    }

    struct XYZ
    {
     ABC* a;
    }

The same thing made with classes work...

Don't you think it's a bit inconsistent and too discriminative
to stuctures? =)
Dec 20 2001
parent "Walter" <walter digitalmars.com> writes:
It does look like a bug. I'll check into it.

"Pavel Minayev" <evilone omen.ru> wrote in message
news:9vsrrg$11ku$1 digitaldaemon.com...
 The following piece of code compiles fine:

     alias ABC* LPABC;
     class ABC { }

 On other hand, this one gives a "symbol used as a type" error:

     alias ABC* LPABC;
     struct ABC { }

 Going further, this doesn't work:

     struct ABC
     {
      XYZ* x;
     }

     struct XYZ
     {
      ABC* a;
     }

 The same thing made with classes work...

 Don't you think it's a bit inconsistent and too discriminative
 to stuctures? =)
Dec 20 2001