www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14087] New: disable this hides static opCall

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

          Issue ID: 14087
           Summary:  disable this hides static opCall
           Product: D
           Version: future
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: acehreli yahoo.com

This seems to be a regression due to the following change:

 
https://github.com/D-Programming-Language/dmd/commit/79ae211e71cf0937523010e39f7f0981e9550904

struct S
{
     disable this();

    static void opCall()
    {}
}

void main()
{}

Error: struct deneme.S static opCall is hidden by constructors and can never be
called

It doesn't seem right to me that a disabled constructor hides opCall.

Ali

--
Jan 30 2015