www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19233] New: name conflict for init

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

          Issue ID: 19233
           Summary: name conflict for init
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bitworld qq.com

// Test code

class ExtensionConfig {

        void init(string s) {
        }
}

void main()
{
        ExtensionConfig config = ExtensionConfig.init;
}

// error message
source\app.d(49,27): Error: function app.ExtensionConfig.init(string s) is not
callable using argument types ()

See also:
https://issues.dlang.org/show_bug.cgi?id=17954

--
Sep 07 2018