The following should work, according to the scoping rules:
-----------x.d------------
import y;
//struct ns
extern (C++, ns)
{
class X { y.ns.Y a; }
}
----------y.d------------
import x;
//struct ns
extern (C++, ns)
{
class Y { x.ns.X b; }
}
It does work if the struct is used.