It doesn't work.
I'm not sure what you can do as far as declaring typeless variables (as it's something I don't do), but another possible solution is to create an abstract base type and then derive everything from that, and only use variables of the base type. Then you can assign it to objects of any subtype you want.
Of course, you'll have to rely on either methods derived from the base class, or casting the object anytime you want to do anything with it.
I'm not sure what you can do as far as declaring typeless variables (as it's something I don't do), but another possible solution is to create an abstract base type and then derive everything from that, and only use variables of the base type. Then you can assign it to objects of any subtype you want.
Of course, you'll have to rely on either methods derived from the base class, or casting the object anytime you want to do anything with it.