[Issue 13552] New: Type deduction doesn't fall back to alias this if postblit is disabled
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Sun Sep 28 12:54:50 PDT 2014
    
    
  
https://issues.dlang.org/show_bug.cgi?id=13552
          Issue ID: 13552
           Summary: Type deduction doesn't fall back to alias this if
                    postblit is disabled
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: schuetzm at gmx.net
In the following code, the line with `i` compiles, but the line with `j`
doesn't. It complains that "struct xx.S is not copyable because it is annotated
with @disable".
    struct S {
        int x;
        @disable this(this);
        alias x this;
    }
    void main() {
        S s;
        int i = s;
        auto j = s;
    }
I think it should compile and infer `j` to be `int`.
--
    
    
More information about the Digitalmars-d-bugs
mailing list