4test appears to have a small set of built types which you cannot add to. If you write your own class it is not considered to be a type, as it is in Java or C++ etc. . 4test has many reasonable things about it. This is not one of them. Assigning to a 'window' reference means you have lost type information. Duh...!