if (sym == Symbol.NONE) return type; else return new Type.ThisType(getClassSym(sym));
return new Type.ThisType(getClassSym(sym));
    protected Type fixClassSymbols(Type type) {        switch (type) {        case Type.NoType:            return type;        case ThisType(Symbol sym):            if (sym == Symbol.NONE)                return type;            else                return new Type.ThisType(getClassSym(sym));        case TypeRef(Type pre, Symbol sym, Type[] args):            return new Type.TypeRef(fixClassSymbols(pre), getClassSym(sym), args);        case SingleType(Type pre, Symbol sym):            return Type.singleType(fixClassSymbols(pre), getClassSym(sym));        case CompoundType(Type[] parts, Scope members):            return Type.compoundType(fixClassSymbols(parts),                                     members,                                     getClassSym(type.symbol()));        case MethodType(Symbol[] vparams, Type result):            return new Type.MethodType(vparams, fixClassSymbols(result));        case PolyType(Symbol[] tparams, Type result):            return new Type.PolyType(tparams, fixClassSymbols(result));        default:            throw global.fail("unexpected type ",type);        }    }