@Override
    public Type resolve(Scope s, int tag) {
        if (target == null) {
            Util.msg("target is null!");
        }
        Type targetType = resolveExpr(target, s, tag);
        if (targetType.isUnionType()) {
            Set<Type> types = targetType.asUnionType().getTypes();
            Type retType = Indexer.idx.builtins.unknown;
            for (Type tt : types) {
                retType = UnionType.union(retType, getAttrType(tt));
            }
            return retType;
        } else {
            return getAttrType(targetType);
        }
    }