http://d.puremagic.com/issues/show_bug.cgi?id=8413
Summary: enforce breaks compilation of property function Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2012-07-22 14:56:18 PDT --- struct Foo { int[] arr; @property int front(string file = __FILE__, size_t line = __LINE__)() { enforce(arr.length, format("%s(%s): Cannot call back on empty array.", file, line)); return arr.front; } } void main() { Foo foo; auto x = foo.front; } test.d(28): Error: cannot resolve type for foo.front(string file = __FILE__,uint line = __LINE__) If you remove enforce it compiles with no problems. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------