http://d.puremagic.com/issues/show_bug.cgi?id=4976
Summary: Can't use auto on const member functions. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: peter.alexander...@gmail.com --- Comment #0 from Peter Alexander <peter.alexander...@gmail.com> 2010-10-02 17:26:27 PDT --- When you try to use type inference on a const member function, you get a compiler error: class Foo { public: auto foo() const { return 0; } } Compiling gives: test.d(4): no identifier for declarator foo test.d(4): semicolon expected, not 'const' test.d(4): Declaration expected, not 'return' Removing the 'const' allows it to compile, but the function can no longer be called on const objects. The same applies for structs and @property methods. This is using DMD 2.049. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------