Bug 11175 – Format should support IUnknown classes

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-05T11:15:00Z
Last change time
2014-04-24T15:46:31Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2013-10-05T11:15:15Z
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??
Comment #1 by andrej.mitrovich — 2013-10-05T11:22:38Z
I don't even see any special code handling in Phobos that would cause this. It seems like a compiler issue?
Comment #2 by yebblies — 2013-11-15T08:57:12Z
(In reply to comment #1) > I don't even see any special code handling in Phobos that would cause this. It > seems like a compiler issue? Does D still derive from Object? If not, that's probably the answer.
Comment #3 by github-bugzilla — 2014-04-24T15:46:31Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/c434dfac4b4b30bf6f1fa645c71fa320c14ee0fc Fix Issue 11175 - Format should support IUnknown classes. https://github.com/D-Programming-Language/phobos/commit/b4123688cfb591bd93d0158fd1721f0b3a656a2d Merge pull request #2090 from AndrejMitrovic/Fix11175 Issue 11175 - Format should support IUnknown classes