digitalmars.D.bugs - [Issue 13552] New: Type deduction doesn't fall back to alias this if
- via Digitalmars-d-bugs (29/29) Sep 28 2014 https://issues.dlang.org/show_bug.cgi?id=13552
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 puremagic.com Reporter: schuetzm 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`. --
Sep 28 2014