digitalmars.D.bugs - [Issue 9215] New: [2.061 beta] isDymanicArray/DynamicArrayTypeOf broken for classes/interfaces with AliasThis
- d-bugmail puremagic.com (39/39) Dec 26 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9215
- d-bugmail puremagic.com (15/15) Dec 26 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9215
- d-bugmail puremagic.com (14/14) Dec 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9215
- d-bugmail puremagic.com (18/22) Dec 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9215
- d-bugmail puremagic.com (15/15) Dec 27 2012 http://d.puremagic.com/issues/show_bug.cgi?id=9215
http://d.puremagic.com/issues/show_bug.cgi?id=9215 Summary: [2.061 beta] isDymanicArray/DynamicArrayTypeOf broken for classes/interfaces with AliasThis Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: code klickverbot.at --- Comment #0 from David Nadlinger <code klickverbot.at> 2012-12-26 18:17:53 PST --- Using DMD 2.061 beta 1, this code --- import std.traits : DynamicArrayTypeOf; interface Foo { final int aliasThis() property { return 0; } alias aliasThis this; } pragma(msg, DynamicArrayTypeOf!(Foo[])); --- leads to a rather interesting error message (note the missing location information): --- Error: function test.Foo.aliasThis () is not callable using argument types () inout test.d(8): Error: template instance std.traits.DynamicArrayTypeOf!(Foo[]) error instantiating test.d(8): while evaluating pragma(msg, DynamicArrayTypeOf!(Foo[])) --- The culprit lies in the implementation of DynamicArrayTypeOf, but I didn't have a closer look at it yet to figure out whether it is a DMD or a Phobos bug. This issue causes isDynamicArray to silently return false for Foo[] as defined above. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 26 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9215 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Component|Phobos |DMD Resolution| |DUPLICATE Severity|regression |normal --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-12-26 20:13:44 PST --- This is a dup of bug 9177 (it's a dmd bug), and is not a regression. It reproduces from 2.057. *** This issue has been marked as a duplicate of issue 9177 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 26 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9215 David Nadlinger <code klickverbot.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|DUPLICATE | --- Comment #2 from David Nadlinger <code klickverbot.at> 2012-12-27 03:30:03 PST --- Reopened, as the issue wih isDynamicArray _is_ a regression, and for example breaks std.array.popFront for arrays of classes with alias this. If DynamicArrayTypeOf is broken, then please try to find a way to implement isDynamicArray without relying on it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 27 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9215 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid Severity|normal |regression --- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2012-12-27 05:17:23 PST --- (In reply to comment #2)Reopened, as the issue wih isDynamicArray _is_ a regression, and for example breaks std.array.popFront for arrays of classes with alias this. If DynamicArrayTypeOf is broken, then please try to find a way to implement isDynamicArray without relying on it.OK. The regression of isDynamicArray has been introduced by this Phobos change. https://github.com/D-Programming-Language/phobos/commit/43fdbc83a1e710f30f8fc6cf464636f69487267b After that, isDynamicArray depends on DynamicArrayTypeOf, and now the bug 9177 affects to both templates. We would be able to revert the Phobos change to fix the regression, but I'd like to recommend fixing bug 9177 to remove root issue. https://github.com/D-Programming-Language/dmd/pull/1385 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 27 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9215 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #4 from Kenji Hara <k.hara.pg gmail.com> 2012-12-27 23:48:02 PST --- OK, by fixing bug 9177: https://github.com/D-Programming-Language/dmd/commit/9f2d9eafacd75c22ea7a705151ee2a8e20a1638c These results were also fixed as expected. pragma(msg, DynamicArrayTypeOf!(Foo[])); // prints "Foo[]" pragma(msg, isDynamicArray!(Foo[])); // prints "true" -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 27 2012