digitalmars.D.bugs - [Issue 8147] New: Blah!R.init now requires parens - (Blah!R).init
- d-bugmail puremagic.com (36/36) May 25 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8147
- d-bugmail puremagic.com (13/13) May 25 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8147
- d-bugmail puremagic.com (13/13) May 25 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8147
- d-bugmail puremagic.com (10/10) May 25 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8147
http://d.puremagic.com/issues/show_bug.cgi?id=8147 Summary: Blah!R.init now requires parens - (Blah!R).init Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: jmdavisProg gmx.com --- Comment #0 from Jonathan M Davis <jmdavisProg gmx.com> 2012-05-25 02:56:38 PDT --- In 2.059, this compiles: import std.algorithm; import std.conv; enum A { a, b, c } void main() { map!"to!string(a)"([A.a]); } But with the latest head, you get this error: /home/jmdavis/dmd2/linux/bin/../../src/phobos/std/algorithm.d(382): Error: undefined identifier 'init' q.d(8): Error: template instance std.algorithm.map!("to!string(a)").map!(A[]) error instantiating The offending line is line# 382 of std.algorithm: alias typeof(_fun(.ElementType!R.init)) ElementType; If you put parens around .ElementType!R, then it compiles, but without them, it now fails. So, from the looks of it, the compiler now associates the .init with R instead of the result of .ElementType!R. If this was a purposeful change, then map needs to be changed. However, if it was an accidental change (as I assume that it was), then dmd needs to be fixed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 25 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8147 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-05-25 05:30:43 PDT --- https://github.com/D-Programming-Language/dmd/pull/966 This is a regression of fixing bug 7911, but real problem had been in AliasDeclaration::toAlias(). I think this bug exists also in D1 branch. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 25 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8147 --- Comment #2 from github-bugzilla puremagic.com 2012-05-25 13:46:57 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c8550ba2d3e8bdb4074ba82843a872168c87dff5 fix Issue 8147 - Blah!R.init now requires parens - (Blah!R).init We should not call AliasDeclaratation::semantic() twice, even if Dsymbol::scope != NULL. https://github.com/D-Programming-Language/dmd/commit/dfb9f29179b3f2a923d6edf2c4b21be50e7f1a29 Merge pull request #966 from 9rnsr/fix8147 Issue 8147 - Blah!R.init now requires parens - (Blah!R).init -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 25 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8147 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 25 2012