[Issue 8225] New: UFCS when the first argument is a function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 11 13:33:58 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8225
Summary: UFCS when the first argument is a function
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-06-11 13:36:07 PDT ---
Is this supposed to be supported?
int apply(int function(int) f, int x) { return f(x); }
enum bar = (int x) => x;
void main() {
assert(apply(bar, 10) == 10); // OK
assert(bar.apply(5) == 5); // line 5, error
}
dmd 2.060alpha gives:
test.d(5): Error: no property 'apply' for type 'pure nothrow @safe int(int x)'
--
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