digitalmars.D.bugs - [Issue 4015] New: forward reference in alias causes error
- d-bugmail puremagic.com (38/38) Mar 27 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4015
- d-bugmail puremagic.com (12/12) May 10 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4015
http://d.puremagic.com/issues/show_bug.cgi?id=4015 Summary: forward reference in alias causes error Product: D Version: 2.041 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: r.sagitario gmx.de PDT --- The code alias A B; const int A = 1; causes error test.d(1): Error: alias test.B forward reference of A This is caused by dmd not trusting it's forward reference capabilities and issuing the error without even trying: Index: declaration.c =================================================================== --- declaration.c (revision 421) +++ declaration.c (working copy) -500,7 +500,7 //printf("alias is a symbol %s %s\n", s->kind(), s->toChars()); type = NULL; VarDeclaration *v = s->isVarDeclaration(); - if (v && v->linkage == LINKdefault) + if (0) { error("forward reference of %s", v->toChars()); s = NULL; (I thought this would be a duplicate, but the patch does not apply to any other bug i've tried). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 27 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4015 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED 16:10:25 PDT --- changelog 482 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 10 2010