www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - enum forward reference

reply Frank Benoit <frank_DELETE_ _DELETE_drealtime.com> writes:
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
Feb 11 2006
next sibling parent Hasan Aljudy <hasan.aljudy gmail.com> writes:
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.
Feb 11 2006
prev sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 -----BEGIN PGP SIGNATURE----- iD8DBQFD7vSG3w+/yD4P9tIRAksNAJ9gisIYgK6VlGxGZjTAjAKUGDQ9VgCePRDI +50w47TAsfFhnl/qq1SQ3Jk= =Vhjd -----END PGP SIGNATURE-----
Feb 12 2006