Summary: enforce breaks compilation of property function
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD

--- Comment #0 from Andrej Mitrovic <> 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:
------- You are receiving this mail because: -------

Reply via email to