D - Interfaces problem
- Vathix <vathix dprogramming.com> Mar 02 2004
- Justin Henzie <Justin_member pathlink.com> Mar 03 2004
- Sean Kelly <sean ffwd.cx> Mar 03 2004
Should this cast work? the assertion fails:
interface IFoo { }
class Foo: IFoo { }
int main()
{
IFoo f = new Foo;
assert(cast(Foo)f !== null);
return 0;
}
--
Christopher E. Miller
Mar 02 2004
is the !== deliberate or a typo? In article <c21jug$1dhe$1 digitaldaemon.com>, Vathix says...Should this cast work? the assertion fails: interface IFoo { } class Foo: IFoo { } int main() { IFoo f = new Foo; assert(cast(Foo)f !== null); return 0; } -- Christopher E. Miller
Mar 03 2004
Justin Henzie wrote:is the !== deliberate or a typo?
Deliberate. D uses a few odd comparison operators to differentiate whether the objects themselves are being compared or jus the references to them. Sean
Mar 03 2004








Sean Kelly <sean ffwd.cx>