Skip to content

intersections don't work with ParamSpecs and type #864

@DetachHead

Description

@DetachHead
from __future__ import annotations

from typing import Callable


class Foo: ...


def foo[**P, T](fn: Callable[P, T] & type[T]): ...


foo(Foo) # error
Argument 1 to "foo" has incompatible type "type[Foo]"; expected "(*Never, **Never) -> Never & type[Never]" [arg-type]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions