Tested on DMD 2.079.
void main(){
// failure: template testme.takePointer cannot deduce function from argument types
//!()(typeof(null)), candidates are: ...
takePointer(null);
takePointer2(null);
}
void takePointer(T)(shared(T)* ptr){}
void takePointer2(T)(shared T* ptr){}
// same problem in the "real" world
void inPhobos(){
import core.atomic;
shared Object abc;
shared Object b = new Object;
cas(&abc, b, null); // doesn't compile
cas(&abc, b, cast(shared)null); // this compiles
atomicStore(abc, null); // this compiles as well
}