Symbol[] tparams = typeParams(); if (template != null) { switch (template) { case TypeRef(_, _, Type[] targs): if (targs.length == tparams.length) return template; } } if (tparams.length == 0) template = typeConstructor(); else template = Type.TypeRef( owner().thisType(), this, type(tparams)); return template;
return primaryConstructor().type().resultType();
    public Type type() {        Symbol[] tparams = typeParams();        if (template != null) {            switch (template) {            case TypeRef(_, _, Type[] targs):                if (targs.length == tparams.length)                    return template;            }        }        if (tparams.length == 0)            template = typeConstructor();        else            template = Type.TypeRef(                owner().thisType(), this, type(tparams));        return template;    }