www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12277] New: static opCall is hidden by disabled constructors and can never be called

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12277

           Summary: static opCall is hidden by  disabled constructors and
                    can never be called
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: remotion4d gmail.com



struct S
{
     disable this();
     disable this(this);

    this(int i){ }
    static S opCall(){
        S s = S(123);
        return s;
    }
}

This fails to compile with "static opCall is hidden by constructors and can
never be called".
But the default ctor is disabled.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 28 2014
parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12277


Remo <remotion4d gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 28 2014