What you want simply isn't possible. An interface binds at runtime, and you need to declare types at compile-time. You can't use an interface method to define the type of y.
Here's the method that is used in Phobos:
http://forum.dlang.org/thread/[email protected]#post-zkdhdiszjklaepgkbxpj:40forum.dlang.org
