Bug 8793 – Another problem with pure inference of inner delegate

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-10-10T04:21:00Z
Last change time
2012-10-10T09:49:20Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-10-10T04:21:08Z
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
Comment #1 by k.hara.pg — 2012-10-10T05:17:04Z
Comment #2 by github-bugzilla — 2012-10-10T08:23:38Z
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 Merge pull request #1171 from 9rnsr/fix8793 Issue 8793 - Another problem with pure inference of inner delegate
Comment #3 by bearophile_hugs — 2012-10-10T09:49:20Z
Now it works, thank you Kenji Hara :-)