http://d.puremagic.com/issues/show_bug.cgi?id=8597
Summary: UFCS fails when used with a pointer to enum and implicit dereferencing Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: tommitiss...@hotmail.com --- Comment #0 from Tommi <tommitiss...@hotmail.com> 2012-08-28 23:03:03 PDT --- module main; enum MyEnum { first, second, third } MyEnum next(MyEnum myenum) { return cast(MyEnum) (myenum + 1); } void main() { auto myenum = MyEnum.second; auto ptrEnum = &myenum; auto maxEnum = ptrEnum.max; // #0: OK auto nextExplicit = (*ptrEnum).next(); // #1: OK auto nextImplicit = ptrEnum.next(); // #2 } #2: Error: function main.next (MyEnum myenum) is not callable using argument types (MyEnum*) #2: Error: cannot implicitly convert expression (ptrEnum) of type MyEnum* to MyEnum -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------