D Language Foundation October Monthly Meeting Summary

ryuukk_ ryuukk.dev at gmail.com
Sun Dec 31 15:48:12 UTC 2023


On Sunday, 31 December 2023 at 11:12:23 UTC, Mike Parker wrote:

> (__UPDATE__: Both [the Bugzilla 
> issue](https://issues.dlang.org/show_bug.cgi?id=24153) and [the 
> pull request](https://github.com/dlang/dmd/pull/15627) have 
> since been closed, as the issue is no longer reproducible.)


I just tested, and the issue happens again, i don't know what 
yielded it to disapear previously, maybe a mistake on my end (i 
probably forgot -inline)

Anyways, here is the code that reproduces the issue:


```D
struct InvBoneBindInfo
{
}


struct Test(Value)
{
     void test()
     {
         auto t = Value.init; // <--- it's because of this
     }
}

extern(C) void main()
{
     Test!(InvBoneBindInfo[32]) test;
     test.test();
}
```

Compile it with:

``dmd -betterC -inline -run test.d``

You will get:

```
test.d(1): Error: `TypeInfo` cannot be used with -betterC
```

The issue remains because of the ``Value.init``, wich is a static 
array, dmd for some reasons require the typeinfo


More information about the Digitalmars-d-announce mailing list