private static function processType(Type $type)
    {
        // TODO type-resolver v1 compat
        // if ($type instanceof AbstractList) {
        if ($type instanceof Array_) {
            return self::flatmap(function ($t) {
                return self::processType($t);
            }, [$type->getKeyType(), $type->getValueType()]);
        }

        if ($type instanceof Compound) {
            return self::flatmap(function ($t) {
                return self::processType($t);
            }, iterator_to_array($type));
        }

        if ($type instanceof Nullable) {
            return self::processType($type->getActualType());
        }

        if ($type instanceof Object_) {
            if (($fq = $type->getFqsen()) !== null) {
                return [ltrim((string) $fq, '\\')];
            }
        }

        return [];
    }