It just works; the compiler should not do anything special simply because self is a static member of Test and is of type Test . I see no reason why this special case should be specifically prohibited.
Now there is a problem with Test::self in that you declare a variable but cannot define it. However, this is just a bug in the code and is easily fixed:
class Test { ... }; Test Test::self;
source share