May 06, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1339


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |clugdbug@yahoo.com.au


--- Comment #10 from Don <clugdbug@yahoo.com.au> 2010-05-06 13:33:54 PDT ---
Dunno why I bothered with this one, since we should just ditch .sort and
.reverse.
But anyway...

PATCH: expression.c  DotIdExp::semantic(), around line 6113.

    else if (t1b->ty == Tarray ||
             t1b->ty == Tsarray ||
             t1b->ty == Taarray)
    {   /* If ident is not a valid property, rewrite:
         *   e1.ident
         * as:
         *   .ident(e1)
         */
        TypeArray *tarr = (TypeArray *)t1b;
        if (ident == Id::sort && !tarr->next->isMutable()) {
            error(".sort only applies to mutable arrays");
            return new ErrorExp();
        }
        if (ident == Id::reverse && !tarr->next->isMutable()) {
            error(".reverse only applies to mutable arrays");
            return new ErrorExp();
        }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 06, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1339



--- Comment #11 from Steven Schveighoffer <schveiguy@yahoo.com> 2010-05-06 13:38:49 PDT ---
Don, while you are looking at this, have a look at related bug 3550

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 06, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1339


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc


--- Comment #12 from bearophile_hugs@eml.cc 2010-05-06 13:59:43 PDT ---
I think array reverse can be kept.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 10, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1339



--- Comment #13 from Don <clugdbug@yahoo.com.au> 2010-05-10 01:44:42 PDT ---
There's a bit of code in druntime, in rt/adi.d which is affected by this.

extern (C) long _adSortChar(char[] a)
{
    if (a.length > 1)
    {
-        dstring da = toUTF32(a);
+        dchar [] da = cast(dchar[])(toUTF32(a));
        da.sort;


and likewise for _adSortWChar.

But it'd probably be better to modify rt/util/utf/toUTF32().

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 07, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=1339



--- Comment #14 from bearophile_hugs@eml.cc 2011-04-06 16:56:23 PDT ---
The same happens with enum arrays:

enum int[] data = [3, 1, 2];
void main() {
    data.sort;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 09, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=1339



--- Comment #15 from Stewart Gordon <smjg@iname.com> 2011-04-09 08:13:36 PDT ---
(In reply to comment #14)
> The same happens with enum arrays:
> 
> enum int[] data = [3, 1, 2];
> void main() {
>     data.sort;
> }

Array enums have enough problems of their own.  See issue 2331, issue 2414 and probably others.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 09, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=1339


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies@gmail.com


--- Comment #16 from yebblies <yebblies@gmail.com> 2011-07-09 13:48:06 EST ---
https://github.com/D-Programming-Language/dmd/pull/219 https://github.com/D-Programming-Language/druntime/pull/37

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 03, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=1339


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #17 from Walter Bright <bugzilla@digitalmars.com> 2011-10-02 22:34:22 PDT ---
https://github.com/D-Programming-Language/dmd/commit/f6fe4cc94d3210e260905ddf4c56a332c3d4f961

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2
Next ›   Last »