[Issue 10442] New: RTInfo generation can fail for structs defined in imported modules
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 22 01:34:12 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10442
Summary: RTInfo generation can fail for structs defined in
imported modules
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: r.sagitario at gmx.de
--- Comment #0 from Rainer Schuetze <r.sagitario at gmx.de> 2013-06-22 01:34:11 PDT ---
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.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list