www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20715] New: `Error: TypeInfo cannot be used with -betterC`


          Issue ID: 20715
           Summary: `Error: TypeInfo cannot be used with -betterC` for
                    array of struct = void with copy constructor disabled
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: andy.pj.hanson gmail.com

extern(C) void main() {
        A a;

struct A {
        B[4] data = void;

struct B {
         disable this(ref B b);
        ~this() {}

Compile with `dmd -betterC app.d`. Testing with dmd v2.091.0.
This code fails with:
Error: TypeInfo cannot be used with -betterC

There is no error location either!

Mar 31 2020