Skip to content

Commit 04c0df5

Browse files
committed
Methods may be inferred as callables with a 'Self' TypeVar that has a bound of the class
1 parent 593d74d commit 04c0df5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

conformance/tests/generics_defaults.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,6 @@ def meth(self, /) -> Self:
168168
attr: DefaultIntT
169169

170170

171-
assert_type(Foo7.meth, Callable[[Foo7[int]], Foo7[int]])
171+
foo7 = Foo7()
172+
assert_type(Foo7.meth(foo7), Foo7[int])
172173
assert_type(Foo7().attr, int)

0 commit comments

Comments
 (0)