digitalmars.D.bugs - [Issue 8439] New: typeid fail to resolve symbol properly
- d-bugmail puremagic.com (49/49) Jul 25 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8439
- d-bugmail puremagic.com (13/13) Sep 26 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8439
http://d.puremagic.com/issues/show_bug.cgi?id=8439 Summary: typeid fail to resolve symbol properly Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: deadalnix gmail.com --- Comment #0 from deadalnix <deadalnix gmail.com> 2012-07-25 11:44:50 PDT --- To trigger the bug, I need 2 modules : module a; class Type { } // TODO: allow type change only for ambiguous types. class Expression { Type type; } ********************************************************* module b; auto dispatch( alias unhandled = function typeof(null)(t){ throw new Exception(t.toString); }, V, T )(V visitor, ref T t) { return unhandled(t); } import a; Expression buildCast(bool isExplicit )(Type type, Expression e) { auto tid = typeid(e.type); // dito class CastFrom { Expression visit(Type t) { return this.dispatch(t); } } return (new CastFrom()).visit(type); } alias buildCast!false buildImplicitCast; I got the following errors : Error: need 'this' to access member type removing the typeid solve the issue. Remplacing it by auto tid = typeid({ return e.type; }()); do solve it too. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 25 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8439 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |DUPLICATE --- Comment #1 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-09-26 07:14:46 PDT --- Fixed by pull in Issue 11010. *** This issue has been marked as a duplicate of issue 11010 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 26 2013