https://issues.dlang.org/show_bug.cgi?id=17865

          Issue ID: 17865
           Summary: property/non-property overloads not detected until
                    used
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

class C {
    @property void fun(int x){  }
    int fun(){ return 0; }
}

int main(string[] argv)
{
    C c = new C();
    //c.fun = 0;
    return 0;
}

This code should not compile, but it does.

You have to un-comment the second line of main before you get the proper error:

"Error: cannot overload both property and non-property functions"

--

Reply via email to