Bug 23777 – Can't strip shared qualifier from static array type

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-03-13T22:39:17Z
Last change time
2024-12-13T19:27:47Z
Assigned to
No Owner
Creator
Paul Backus
Moved to GitHub: dmd#20247 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20247 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB