D - Interfaces problem
- Vathix (11/11) Mar 02 2004 Should this cast work? the assertion fails:
- Justin Henzie (2/13) Mar 03 2004
- Sean Kelly (5/6) Mar 03 2004 Deliberate. D uses a few odd comparison operators to differentiate
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>