[Issue 20715] `Error: TypeInfo cannot be used with -betterC` for array of struct = void with copy constructor disabled
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 7 10:03:20 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=20715
--- Comment #2 from Tomáš Chaloupka <chalucha at gmail.com> ---
One more test case for probably same issue:
```D
struct Foo {
this(ref return scope Foo rhs) {}
~this() {}
}
struct Bar {
@disable this(this);
Foo[2] foos = void;
}
extern (C)
void main() {}
```
I've tracked this down to this line:
https://github.com/dlang/dmd/blob/a6f49dade85452d61d9ebcf329e2567ecacd5fab/src/dmd/e2ir.d#L2606
So it has something to do with array copy constructor for `foos` array that it
generates either though Bar has disabled copying?
And missing location in error output is not helping at all to figure out where
is the problem :(
--
More information about the Digitalmars-d-bugs
mailing list