[Issue 23975] New: Using struct as an expression gives alias this type has no value error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 6 19:47:15 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23975
Issue ID: 23975
Summary: Using struct as an expression gives alias this type
has no value error
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: nick at geany.org
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).
--
More information about the Digitalmars-d-bugs
mailing list