www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

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

↑ ↓ ← "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
↑ ↓ → "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