www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11850] New: [ICE] Problem with filter with signed-unsigned array comparison

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

           Summary: [ICE] Problem with filter with signed-unsigned array
                    comparison
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



import std.algorithm: filter;
void main() {
    filter!(a => a < [0])([[0u]]);
}


DMD 2.065alpha gives the errors and then crashes:

temp.d(3): Error: incompatible types for ((a) < ([0])): 'uint[]' and 'int[]'
...\dmd2\src\phobos\std\algorithm.d(1396):        instantiated from here:
FilterResult!(__lambda1, uint[][])
temp.d(3):        instantiated from here: filter!(uint[][])
temp.d(3): Error: template instance temp.main.filter!((a) => a <
[0]).filter!(uint[][]) error instantiating

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 30 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11850


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice, pull
           Platform|x86                         |All
         OS/Version|Windows                     |All
           Severity|normal                      |regression



This is git-head only regression, caused by:
https://github.com/D-Programming-Language/dmd/pull/3020

Compiler fix:
https://github.com/D-Programming-Language/dmd/pull/3034

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 31 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11850




Perhaps this is the same bug:


void main() {
    import std.algorithm: map, filter;
    [[1]].filter!(a => a.map!q(x => x));
}



temp.d(3): Error: undefined identifier q
...\dmd2\src\phobos\std\algorithm.d(1396):        instantiated from here:
FilterResult!(__lambda1, int[][])
temp.d(3):        instantiated from here: filter!(int[][])
temp.d(3): Error: template instance temp.main.filter!((a) => a.map!q((x) =>
x)).filter!(int[][]) error instantiating

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 04 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11850


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



Fixed commit:
https://github.com/D-Programming-Language/dmd/commit/24c1dff4856983533e813b89c1d8adf9492936d0

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 12 2014