test1:
--------------------
module test1;
import test2;
enum X = getR(1,3);
void main(string[] args){}

test2:
--------------------
module test2;
struct R {
        int i;
}
R[] getR(int a, int b){
        R[] r;
        r       ~= R(a);
        r       ~= R(b);
        return r;
}


to build without betterC:  ldmd2 ./test.d -I.
to build with betterC: ldmd2 ./test.d -I.  -betterC


If build without betterC, all work fine.  if with betterC:

test2.d(3): Error: TypeInfo cannot be used with -betterC



Reply via email to