class X has forward references

bauss jj_1337 at live.dk
Tue Jun 12 20:39:26 UTC 2018


On Tuesday, 12 June 2018 at 20:30:22 UTC, Steven Schveighoffer 
wrote:
> On 6/12/18 4:14 PM, bauss wrote:
>> What could cause that error?
>> 
>> I cannot find anything in the documentation nor does the error 
>> message itself give much information.
>
> A forward reference that can't be figured out by the compiler. 
> This is one of the DMD front end's real weak spots.
>
>> I can't really give a good example, but I can tell as much as 
>> I have a few inheritances of classes using templates.
>
> Yes, I've had weird forward reference errors in the past, and 
> the only way I've been able to solve them is to move stuff 
> around.
>
>> I just don't think that would be the issue.
>> 
>> When I try to make a minimized example it doesn't happen, so 
>> I'm going to assume it's either a function or a member or 
>> something in one of the inheritances that does it.
>> 
>> It would be really helpful if I knew what I was looking for, 
>> because it's thousands of lines of code I have to dig through 
>> with trial and error.
>
> Have you tried dustmite?
>
> I would think at least it should print the symbol it's not able 
> to resolve.
>
> -Steve

Yeah I get the symbol that it cannot resolve.

I'm moving stuff around now and the error has disappeared.

Now I just have to fix all the errors related to moving stuff 
around.

Thanks though!


More information about the Digitalmars-d-learn mailing list