digitalmars.D.bugs - [Issue 7098] New: Annoying Forward Reference Error When Compiling Multiple Files
- d-bugmail puremagic.com (50/50) Dec 11 2011 http://d.puremagic.com/issues/show_bug.cgi?id=7098
http://d.puremagic.com/issues/show_bug.cgi?id=7098 Summary: Annoying Forward Reference Error When Compiling Multiple Files Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: dsimcha yahoo.com --- Comment #0 from David Simcha <dsimcha yahoo.com> 2011-12-11 18:20:41 PST --- // hash.d. This is part of a library, not the application. Therefore, it // is in the import path but is not explicitly passed to DMD struct HashRange(K, S, ) { size_t _length; this(S* set) { this._length = set.length; } } struct StackSet(K) { HashRange!(K, typeof(this)) elems() { assert(0); } property size_t length() { assert(0); } } // a.d. This is part of the application. import hash; // b.d. This is also part of the application. import hash; void fun() { StackSet!string alreadyDone; } $ dmd -c a.d b.d hash.d(11): Error: struct hash.StackSet!(string).StackSet no size yet for forward reference hash.d(5): Error: cannot implicitly convert expression ((*set).length()) of type size_t to ulong hash.d(13): Error: template instance hash.HashRange!(string,StackSet!(string)) error instantiating b.d(4): instantiated from here: StackSet!(string) b.d(4): Error: template instance hash.StackSet!(string) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 11 2011