The current default implementation for template RTInfo always sets the value 0x12345678, so this should work:
////////////////
module s;
struct S
{
int x;
void* p;
}
///////////////
module test;
import s;
struct T
{
int x;
void* p;
}
void main()
{
assert(typeid(T).rtInfo == cast(void*)0x12345678); // ok
assert(typeid(S).rtInfo == cast(void*)0x12345678); // fails
}
////////////////
but the second assertion triggers if compiled with
dmd test.d
If you add s.d to the command line, it does not fail.