https://issues.dlang.org/show_bug.cgi?id=13435
Issue ID: 13435
Summary: Strange error if struct is a class member and opAssign
applied
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
import std.stdio;
struct S(T) {
void opAssign(T[] arg) {}
}
class B {
this(int[] d) {
S!int c;
//_a = d; // Error: cannot implicitly convert expression (d) of type
int[] to S!int
c = d; // compiles OK
}
S!int _a;
}
void main() {
}
--