www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8453] New: Associative array keys refused as property by sort

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8453

           Summary: Associative array keys refused as property by sort
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



AA.keys is specified as property, and this program used to work in 2.059, but
in dmd 2.060beta there is an error on the line of bar2:


import std.algorithm: sort;
void main() {
    int[int] foo;
    auto bar1 = foo.keys().sort(); // OK
    auto bar2 = foo.keys.sort(); // Error
}


DMD 2.060beta gives:

temp.d(5): Error: function expected before (), not
_adSort(foo.keys(),&D10TypeInfo_i6__initZ) of type int[]
...\dmd2\src\phobos\std\format.d(1460): Error: template std.algorithm.find does
not match any function template declaration
...\dmd2\src\phobos\std\algorithm.d(2944): Error: template std.algorithm.find
cannot deduce template function from argument types !()(string,char)
...\dmd2\src\phobos\std\format.d(2782): Error: template instance
std.format.formatValue!(void delegate(const(char)[]),const(real),char) error
instantiating
...\dmd2\src\phobos\std\format.d(421):        instantiated from here:
formatGeneric!(void delegate(const(char)[]),const(real),char)
...\dmd2\src\phobos\std\complex.d(144):        instantiated from here:
formattedWrite!(void delegate(const(char)[]),char,const(real))
...\dmd2\src\phobos\std\complex.d(649):        instantiated from here:
Complex!(real)
...\dmd2\src\phobos\std\format.d(421): Error: template instance
std.format.formatGeneric!(void delegate(const(char)[]),const(real),char) error
instantiating
...\dmd2\src\phobos\std\complex.d(144):        instantiated from here:
formattedWrite!(void delegate(const(char)[]),char,const(real))
...\dmd2\src\phobos\std\complex.d(649):        instantiated from here:
Complex!(real)
...\dmd2\src\phobos\std\complex.d(144): Error: template instance
std.format.formattedWrite!(void delegate(const(char)[]),char,const(real)) error
instantiating
...\dmd2\src\phobos\std\complex.d(649):        instantiated from here:
Complex!(real)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 27 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8453


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid
           Platform|x86                         |All
         OS/Version|Windows                     |All



https://github.com/D-Programming-Language/dmd/pull/1066

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 28 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8453




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9ea5769d50ed4dcd085dad05a40dd013f9fd52f8
fix Issue 8453 - Associative array keys refused as property by sort

This is a regression of refactoring around UFCS mechanism.
Introduced commit: e9538dc00db8789ab1f686f0a0a2bed7316ee794

https://github.com/D-Programming-Language/dmd/commit/988414c6564fb4a4ab091bb63df4fbded9645be8


Issue 8453 - Associative array keys refused as property by sort

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 28 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8453


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: -------
Jul 28 2012