Unused druntime code: Barrier, ReadWriteMutex, Condition
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Thu Jun 18 03:48:34 UTC 2026
On 18/06/2026 7:19 AM, Nick Treleaven wrote:
> On Tuesday, 16 June 2026 at 10:41:00 UTC, Richard (Rikki) Andrew
> Cattermole wrote:
>> ```d
>> version(NoBarrier) {
>> @disable
>> class Barrier {}
>> } else {
>> ```
>
> `@disable` doesn't work with types. You can do `@disable new();` though.
>
> The spec should be clearer:
>
>> A reference to a declaration marked with the @disable attribute causes
>> a compile time error.
>
> https://dlang.org/spec/attribute.html#disable
That should really be fixed to make @disable work on types.
More information about the Digitalmars-d
mailing list