www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8793] New: Another problem with pure inference of inner delegate

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

           Summary: Another problem with pure inference of inner delegate
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



This is a spinoff of Issue 8751


alias bool delegate(in int) pure Dg;
Dg foo1(immutable Dg f) pure {
    return x => f(x); // OK
}
Dg foo2(const Dg f) pure {
    return x => f(x); // error
}
void main() {}


DMD2.060alpha gives:

temp.d(6): Error: cannot implicitly convert expression (__lambda4) of type bool
delegate(const(int) x)  system to bool delegate(const(int)) pure

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


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

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



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

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




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

https://github.com/D-Programming-Language/dmd/commit/c08e1507ac2ce890f2434ca677a05fad6d8f1827
fix Issue 8793 - Another problem with pure inference of inner delegate

https://github.com/D-Programming-Language/dmd/commit/9abc6c0ee4ce8d2f14a243f5fbde7e24671caf0b


Issue 8793 - Another problem with pure inference of inner delegate

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


bearophile_hugs eml.cc changed:

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



Now it works, thank you Kenji Hara :-)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 10 2012