Comment #0 by snarwin+bugzilla — 2023-03-13T22:39:17Z
As of DMD 2.102.2, the following programs fail to compile:
---
// example 1
static if (is(shared(int[1]) == shared(T), T))
static assert(is(T == int[1]));
---
---
// example 2
shared(int[1]) a;
static assert(is(typeof(cast() a) == int[1]));
---
---
// example 3
alias Unshared(T : shared(U), U) = U;
static assert(is(Unshared!(shared(int[1])) == int[1]));
---
In all cases, the error message is as follows:
---
bug.d(2): Error: static assert: `is(shared(int[1]) == int[1])` is false
---
In each of these programs, the 'shared' qualifier should be stripped from the type on the left-hand side of the assert expression, but it is not.
Comment #1 by robert.schadek — 2024-12-13T19:27:47Z