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: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-07-27 09:03:53 PDT ---
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: -------

Reply via email to