Thread overview |
---|
October 23, 2007 [Issue 1609] New: TypeInfo_Typedef has incorrect implementation of next() | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1609 Summary: TypeInfo_Typedef has incorrect implementation of next() Product: D Version: 1.022 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: bugzilla@digitalmars.com ReportedBy: tomas@famolsen.dk This assertion fails: assert(typeid(int_t).next is typeid(int)); It should be defined as: TypeInfo next() { return base; } Not: TypeInfo next() { return base.next(); } .. as it is now. -- |
October 23, 2007 [Issue 1609] TypeInfo_Typedef has incorrect implementation of next() | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1609 ------- Comment #1 from tomas@famolsen.dk 2007-10-23 18:30 ------- oups forgot something. the test case is: typedef int int_t; assert(typeid(int_t).next is typeid(int)); -- |
July 11, 2008 [Issue 1609] TypeInfo_Typedef has incorrect implementation of next() | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1609 tomas@famolsen.dk changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |trivial ------- Comment #2 from tomas@famolsen.dk 2008-07-11 13:55 ------- again so trivial, yet fixing has taken almost a year and has still not happened. -- |
January 06, 2009 [Issue 1609] TypeInfo_Typedef has incorrect implementation of next() | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1609 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #3 from bugzilla@digitalmars.com 2009-01-06 04:13 ------- This is actually the intended behavior. All the virtual functions for a typedef "see through" any layers of typedefs and work on the base type. This makes code that walks the typeinfo's simpler. To get the base of a typedef, cast the TypeInfo to a TypeInfo_Typedef, and get the .base. -- |
Copyright © 1999-2021 by the D Language Foundation