Thread overview
enum forward reference
Feb 11, 2006
Frank Benoit
Feb 11, 2006
Hasan Aljudy
Feb 12, 2006
Thomas Kuehne
February 11, 2006
I cannot cut that down. In a programm >20 files I had the error

Without giving filename and filenumber there was this message: | enum MyOwnEnum is forward referenced

Followed with multiple template errors, which compiled before and are not
affected in any way by the enum.:
| filename.d(16): template instance cannot resolve forward reference
....


After putting the enum in a seperate module and importing that, all compiles well.

Has anyone seen this behaviour before?

Frank


-- 
D goes real-time: http://www.drealtime.com
February 11, 2006
Frank Benoit wrote:
> I cannot cut that down. In a programm >20 files I had the error
> 
> Without giving filename and filenumber there was this message:
> | enum MyOwnEnum is forward referenced
> 
> Followed with multiple template errors, which compiled before and are not
> affected in any way by the enum.:
> | filename.d(16): template instance cannot resolve forward reference
> ....
> 
> 
> After putting the enum in a seperate module and importing that, all compiles
> well.
> 
> Has anyone seen this behaviour before?
> 
> Frank
> 
> 

Yeah, I've seen it ..
I have no idea why this occurs, seems very inconsistent .. and unexpected in D.

I hope that Walter consideres it a bug, not a feature; so that someday it might be fixed.
February 12, 2006
Frank Benoit schrieb am 2006-02-11:
> I cannot cut that down. In a programm >20 files I had the error
>
> Without giving filename and filenumber there was this message:
>| enum MyOwnEnum is forward referenced
>
> Followed with multiple template errors, which compiled before and are not affected in any way by the enum.:
>| filename.d(16): template instance cannot resolve forward reference
> ....
>
>
> After putting the enum in a seperate module and importing that, all compiles well.
>
> Has anyone seen this behaviour before?
>
> Frank

Might be related to: http://dstress.kuehne.cn/run/forward_reference_09.d

Thomas