Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
July 20, 2010 [Issue 190] Cannot forward reference typedef/alias in default value for function parameter | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=190 Rainer Schuetze <r.sagitario@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.sagitario@gmx.de --- Comment #3 from Rainer Schuetze <r.sagitario@gmx.de> 2010-07-20 14:07:12 PDT --- The problem of the original test case is the default initializer. It is evaluated when the type of the function is inferred, but the referenced variable has not yet been semantically analyzed. Here's a patch: Index: expression.c =================================================================== --- expression.c (revision 576) +++ expression.c (working copy) @@ -4350,6 +4350,8 @@ } #endif } + if(type && !type->deco) + type = type->semantic(loc, sc); /* Fix for 1161 doesn't work because it causes protection * problems when instantiating imported templates passing private @@ -6046,7 +6048,8 @@ e->type = v->type; } } - return e->deref(); + e = e->deref(); + return e->semantic(sc); } FuncDeclaration *f = s->isFuncDeclaration(); The test case in comment 2 is something different and compiles with DMD 2.047. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 27, 2010 [Issue 190] Cannot forward reference typedef/alias in default value for function parameter | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=190 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from Walter Bright <bugzilla@digitalmars.com> 2010-08-27 16:03:09 PDT --- http://www.dsource.org/projects/dmd/changeset/634 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 30, 2010 [Issue 190] Cannot forward reference typedef/alias in default value for function parameter | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=190 Brad Roberts <braddr@puremagic.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |braddr@puremagic.com Resolution|FIXED | --- Comment #5 from Brad Roberts <braddr@puremagic.com> 2010-08-30 00:41:06 PDT --- Reopening due to a regression it causes. See bug 4753 for the details. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 30, 2010 [Issue 190] Cannot forward reference typedef/alias in default value for function parameter | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=190 --- Comment #6 from Walter Bright <bugzilla@digitalmars.com> 2010-08-30 14:01:53 PDT --- reversion: http://www.dsource.org/projects/dmd/changeset/652 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 01, 2010 [Issue 190] Cannot forward reference typedef/alias in default value for function parameter | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=190 --- Comment #7 from Brad Roberts <braddr@puremagic.com> 2010-08-31 23:00:44 PDT --- A recursion limiting patch has been added to bug 4753. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 03, 2011 [Issue 190] Cannot forward reference typedef/alias in default value for function parameter | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=190 --- Comment #8 from Brad Roberts <braddr@puremagic.com> 2011-01-02 19:43:03 PST --- Created an attachment (id=858) Updated patch Incorporates the fixes from bug 4753 for the regression from the previous version of the patch. Tested against the code in bugs 190, 4573, and all the unit tests for dmd, druntime, and phobos. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 03, 2011 [Issue 190] Cannot forward reference typedef/alias in default value for function parameter | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=190 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #9 from Walter Bright <bugzilla@digitalmars.com> 2011-01-03 00:33:59 PST --- http://www.dsource.org/projects/dmd/changeset/842 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation