D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3349 - typeid(shared(T)) generates wrong value
Summary: typeid(shared(T)) generates wrong value
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2009-09-28 09:16 UTC by Kasumi Hanazuki
Modified: 2015-06-09 01:26 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kasumi Hanazuki 2009-09-28 09:16:19 UTC
Typeid of a shared type is incorrect.
Its .next seems referring to it circularly.

----

void main() {
    auto ti = typeid(shared(int));
    
    assert(cast(TypeInfo_Shared)ti);
    
    assert((cast(TypeInfo_Shared)ti).next == typeid(int));
        // object.Error: Stack Overflow
}
Comment 1 Leandro Lucarella 2009-10-29 06:45:51 UTC
Related svn revision: 224
http://www.dsource.org/projects/dmd/changeset/224
Comment 2 Walter Bright 2009-11-06 11:34:05 UTC
Fixed dmd 2.036