[Issue 8793] New: Another problem with pure inference of inner delegate
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 10 04:45:14 PDT 2012
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 at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-10-10 04:21:08 PDT ---
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: -------
More information about the Digitalmars-d-bugs
mailing list