[Issue 10442] RTInfo generation can fail for structs defined in imported modules
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 30 02:34:14 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=10442
Mike Franklin <slavo5150 at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |slavo5150 at yahoo.com
--- Comment #5 from Mike Franklin <slavo5150 at yahoo.com> ---
The following example results in an assertion failure:
struct T
{
int x;
void* p;
}
void main()
{
assert(typeid(T).rtInfo == cast(void*)0x12345678); // Fail
}
However, the following passes:
struct T
{
int x;
void* p;
}
void main()
{
assert(typeid(T).rtInfo is null);
}
This is consistent with what I see in the runtime:
https://github.com/dlang/druntime/blob/544946df1c68727d84cdee11502b244bde0bc22e/src/object.d#L3419
So, I don't understand what the problem is and what the result should be.
--
More information about the Digitalmars-d-bugs
mailing list