www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17865] New: property/non-property overloads not detected


          Issue ID: 17865
           Summary: property/non-property overloads not detected until
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: nicolas.jinchereau gmail.com

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"

Sep 28 2017