protected function resolve(string $abstract, ReflectionParameter $dependency)
    {
        $key = $abstract.$dependency->name;

        if (! isset($this->resolved[$key])) {
            $this->resolved[$key] = $this->generate($abstract, $dependency);
        }

        return $this->resolved[$key]($this);
    }