Fix Bugzilla 24599 - Wrongly elided TypeInfo emission (#15868)

Reverting #14844, which caused such missing TypeInfos, *and* making
sure the special TypeInfo members are fully analyzed and ready for
codegen (otherwise hitting an assertion for the real-world project).
This commit is contained in:
Martin Kinkelin 2024-07-02 19:31:34 +02:00 committed by GitHub
parent 6a8ce7c32a
commit 7ab98b931a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 37 additions and 30 deletions

View file

@ -1,13 +0,0 @@
// https://issues.dlang.org/show_bug.cgi?id=23650
__gshared int x;
void main()
{
static assert(__traits(compiles,
{
struct S { int *p = &x; }
auto t = typeid(S);
}));
}

View file

@ -0,0 +1,24 @@
module mod;
struct Variable
{
size_t toHash() const { return 0; }
}
enum hasInoutConstruction(T) = __traits(compiles, { struct S { T a; } });
struct Algebraic(T)
{
static if (hasInoutConstruction!T)
{
}
}
Algebraic!Variable foo();
struct S
{
Variable[] symbols;
}
void main() {}