Known limitation: does not work for struct with postblit or dtor.
gcc/d/ChangeLog:
PR d/100964
* dmd/expression.c (Expression::checkPostblit): Don't generate
TypeInfo when RTTI is disabled.
gcc/testsuite/ChangeLog:
PR d/100964
* gdc.test/compilable/betterCarray.d: Add test cases.
(cherry picked from commit
10d4f283f4177d80cec3c9e8bf447a48cab5bb47)
t = t->baseElemOf();
if (t->ty == Tstruct)
{
- // Bugzilla 11395: Require TypeInfo generation for array concatenation
- semanticTypeInfo(sc, t);
+ if (global.params.useTypeInfo)
+ {
+ // Bugzilla 11395: Require TypeInfo generation for array concatenation
+ semanticTypeInfo(sc, t);
+ }
StructDeclaration *sd = ((TypeStruct *)t)->sym;
if (sd->postblit)
{
return a[i];
}
+
+/**********************************************/
+// https://issues.dlang.org/show_bug.cgi?id=19234
+void issue19234()
+{
+ static struct A {}
+ A[10] a;
+ A[10] b;
+ b[] = a[];
+}