Bug 23975 – Using struct as an expression gives alias this type has no value error

Status
NEW
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-06-06T19:47:15Z
Last change time
2024-12-13T19:29:36Z
Keywords
diagnostic
Assigned to
No Owner
Creator
Nick Treleaven
Moved to GitHub: dmd#20297 →

Comments

Comment #0 by nick — 2023-06-06T19:47:15Z
struct P { alias q this; Q q; struct Q { } } void f() { auto rc = P; // Error: type `Q` has no value } It should say type `P` has no value. (Note P can be a more complex expression that resolves to the struct type).
Comment #1 by robert.schadek — 2024-12-13T19:29:36Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20297 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB