null and IFTI

Max Samukha samukha at voliacable.com.removethis
Fri Oct 3 23:50:33 PDT 2008


It is unclear from the specs if null should be exact matched against
nullable types during IFTI. Now it works only for void*.

class C
{
}

void foo(T)(T x, C c) // C - a nullable type
{
}

void main()
{
    foo(1, null); // fails
    foo(1, cast(C)null); // ok
}

Is it by design?



More information about the Digitalmars-d mailing list