http://d.puremagic.com/issues/show_bug.cgi?id=8162
Summary: [TDPL] -property fails to give an error when a property function is called with parens Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis <jmdavisp...@gmx.com> 2012-05-29 22:44:59 PDT --- This code struct R42 { @property int front() @safe const pure nothrow { return 42; } @property bool empty() @safe const pure nothrow { return false; } void popFront() @safe pure nothrow { } } void main() { R42 r; auto e = r.empty(); } shouldn't compile, since empty is a property and therefore must not compile with parens per strict property enforcement as described in TDPL. _Not_ calling popFront with parens _does_ result in an error with -property, but calling either of the property functions _with_ parens doesn't. So -property seems to be doing half of its job but not all of it. With -property, @property functions should never be callable with parens, and non-@property functions should never be callable without them. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------