October 05, 2013 [Issue 11175] New: format prints null for all objects inheriting IUnknown | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=11175 Summary: format prints null for all objects inheriting IUnknown Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: andrej.mitrovich@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-10-05 11:15:15 PDT --- This really had me stumped: ----- import std.stdio; interface IWhatever { } class C : IWhatever { } interface IUnknown { } class D : IUnknown { } void main() { IWhatever iw = new C; writefln("iw is: %s. iw is not null: %s", iw, iw !is null); IUnknown iu = new D; writefln("iu is: %s. iu is not null: %s", iu, iu !is null); } ----- Prints: iw is: test.C. iw is not null: true iu is: null. iu is not null: true What in the world?? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 05, 2013 [Issue 11175] format prints null for all objects inheriting IUnknown | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=11175 --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-10-05 11:22:38 PDT --- I don't even see any special code handling in Phobos that would cause this. It seems like a compiler issue? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation