digitalmars.D - Forward declarations under certain situations?
- Geordi (11/11) Jan 12 2005 Apologies if this has already been asked,
- Stewart Gordon (8/15) Jan 12 2005 See my post today on digitalmars.D.bugs.
- Walter (8/19) Jan 12 2005 Am I
Apologies if this has already been asked, code: class A{ B b; enum B { x,y,z } } Produces this error: enum B is forward referenced It was my understanding that D did not require forward declarations, the existance of this error message implies that this is an error by design. Am I missing something?
Jan 12 2005
Geordi wrote:Apologies if this has already been asked,See my post today on digitalmars.D.bugs. <snip>Produces this error: enum B is forward referenced It was my understanding that D did not require forward declarations, the existance of this error message implies that this is an error by design. Am I missing something?This aspect of the language is slowly working its way in. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Jan 12 2005
"Geordi" <Geordi_member pathlink.com> wrote in message news:cs37sk$1lll$1 digitaldaemon.com...Apologies if this has already been asked, code: class A{ B b; enum B { x,y,z } } Produces this error: enum B is forward referenced It was my understanding that D did not require forward declarations, the existance of this error message implies that this is an error by design.Am Imissing something?No, you're not missing anything. Enums just haven't gotten the attention they need in the internal compiler workings to support forward referencing yet. The last compiler update went through some significant internal work to get structs to forward reference right. It'll happen for enums, too, it's just a lower priority.
Jan 12 2005