---------------------
import vibe.core.net;
TCPConnection mySocket;

void main() {
    auto b = mySocket is null;
}
---------------------

That's giving me:

---------------------
Error: incompatible types for (mySocket) is (null): TCPConnection and typeof(null)
---------------------

WTF?!?!

The type in question (vibe.core.net.TCPConnection) is an interface:
http://vibed.org/api/vibe.core.net/TCPConnection
https://github.com/vibe-d/vibe.d/blob/master/core/vibe/core/net.d#L344

The following works just fine:
---------------------
interface IFoo {}

void main() {
    IFoo i;
    auto b = i is null;
}
---------------------

  • Can't "is null&quo... Nick Sabalausky (Abscissa) via Digitalmars-d-learn

Reply via email to