Bug 18557 – Types with 0 size should not be usable as aa key types

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-03-05T09:42:57Z
Last change time
2024-12-13T18:57:37Z
Assigned to
No Owner
Creator
Walter Bright
Moved to GitHub: dmd#19403 →

Comments

Comment #0 by bugzilla — 2018-03-05T09:42:57Z
Summary says it all. struct S { } int[S] aa; // should fail to compile
Comment #1 by bugzilla — 2018-03-06T06:08:06Z
Comment #2 by bugzilla — 2018-03-06T06:11:48Z
Comment #3 by ketmar — 2018-03-06T23:12:49Z
this patch breaks Variant: it is legal to use `This[This]` as a placeholder type in Variant, and with the patch applied that code doesn't compiles anymore ('cause `This` is defined as `struct This;`). adding real definition to `This` doesn't help too, 'cause then dmd errored with "recursive template expansion".
Comment #4 by robert.schadek — 2024-12-13T18:57:37Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19403 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB