case MethodType(Symbol[] vparams, Type result): return methodType(pos, vparams, result, owner, env);
        private Tree typeAsValue(int pos, Type tp, Symbol owner, TEnv env) {            switch (tp) {            case ConstantType(Type base, _):                return typeAsValue(pos, base, owner, env);            case TypeRef(Type pre, Symbol sym, Type[] args):                if (env.definesVar(sym)) {                    assert args.length == 0;                    return env.treeForVar(sym);                } else if (basicTypes.containsKey(sym)) {                    return gen.mkGlobalRef(pos, (Symbol)basicTypes.get(sym));                } else if (sym.isJava()) {                    assert args.length == 0                        : Debug.show(sym) + " " + args.length;                    return javaType(pos, sym);                } else if (!sym.owner().isMethod()) {                    // Reference to a "global" type.                    if (owner == null)                        throw new Error("null owner for " + Debug.show(tp));                    return scalaClassType(pos, tp, owner, env);                } else {                    assert !isValuePrefix(pre) : tp;                    return gen.mkLocalRef(pos, getAccessorSym(sym));                }            case SingleType(Type pre, Symbol sym):                return singleType(pos, pre, sym);            case CompoundType(Type[] parts, Scope members):                return compoundType(pos, parts, members, owner, env);            case MethodType(Symbol[] vparams, Type result):                return methodType(pos, vparams, result, owner, env);            default:                throw Debug.abortIllegalCase(tp);            }        }