digitalmars.D.bugs - [Issue 7820] New: regression(DMD 2.059head) Wrong error on forward reference to 'front' with -property switch
- d-bugmail puremagic.com (30/30) Apr 04 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7820
- d-bugmail puremagic.com (10/10) Apr 05 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7820
- d-bugmail puremagic.com (9/9) Apr 05 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7820
- d-bugmail puremagic.com (9/9) Apr 05 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7820
- d-bugmail puremagic.com (7/8) Apr 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7820
- d-bugmail puremagic.com (8/8) Apr 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7820
- d-bugmail puremagic.com (21/21) Apr 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7820
- d-bugmail puremagic.com (9/9) Apr 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7820
- d-bugmail puremagic.com (9/9) Apr 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7820
http://d.puremagic.com/issues/show_bug.cgi?id=7820 Summary: regression(DMD 2.059head) Wrong error on forward reference to 'front' with -property switch Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: regression Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: timon.gehr gmx.ch --- Comment #0 from timon.gehr gmx.ch 2012-04-04 10:56:44 PDT --- The following code does not compile with DMD 2.059head, when passed the -property switch. int[] array; pragma(msg, typeof(array.front)); property ref T front(T)(T[] a){return a[0];} Moving the declaration of front to the top fixes the error. This was reduced from a template matching failure (std.algorithm.canFind cannot be instantiated with built-in array types). The same code compiles fine with DMD 2.058. Another manifestation of what looks like the same issue: pragma(msg, typeof(x)); // prints 'int' instead of 'const(int)' const int x; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 04 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7820 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla digitalmars.com --- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2012-04-05 23:27:20 PDT --- The second issue is not the same and isn't a regression. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 05 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7820 --- Comment #2 from github-bugzilla puremagic.com 2012-04-05 23:28:16 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6fc972df155d69de9b001b28dc6f5a7d16faf351 fix Issue 7820 - regression(DMD 2.059head) Wrong error on forward reference to 'front' with -property switch -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 05 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7820 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 05 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7820 --- Comment #3 from timon.gehr gmx.ch 2012-04-06 02:26:40 PDT --- (In reply to comment #1)The second issue is not the same and isn't a regression.OK. Reposted as issue 7846. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7820 --- Comment #4 from timon.gehr gmx.ch 2012-04-06 02:40:25 PDT --- The code this was reduced from still does not compile with -property for the same reason. I will try to create another reduced example and then reopen the issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7820 timon.gehr gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #5 from timon.gehr gmx.ch 2012-04-06 04:33:19 PDT --- These snippets still expose the buggy behavior even after the fix: --- int[] array; pragma(msg, typeof(array.front)); property int front(int[] a){return a[0];} --- --- import std.algorithm; alias find!("a == b",int[],int) test; --- I assume it is the same bug in both cases. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7820 --- Comment #6 from github-bugzilla puremagic.com 2012-04-06 14:54:52 PDT --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/37c1856876382d820372dec621c46e884e5c97ab fix Issue 7820 - regression(DMD 2.059head) Wrong error on forward reference to 'front' with -property switch -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7820 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 06 2012