File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -2939,7 +2939,25 @@ class Gleemer:
29392939
29402940
29412941[case testPartialTypeProtocolHashable]
2942- # flags: --no-strict-optional
2942+ # flags: --no-strict-optional --no-local-partial-types
2943+ from typing import Protocol
2944+
2945+ class Hashable(Protocol):
2946+ def __hash__(self) -> int: ...
2947+
2948+ class ObjectHashable:
2949+ def __hash__(self) -> int: ...
2950+
2951+ class DataArray(ObjectHashable):
2952+ __hash__ = None
2953+
2954+ def f(self, x: Hashable) -> None:
2955+ reveal_type([self, x]) # N: Revealed type is "builtins.list[builtins.object]"
2956+ [builtins fixtures/tuple.pyi]
2957+
2958+
2959+ [case testPartialTypeProtocolHashableLocalPartialTypes]
2960+ # flags: --no-strict-optional --local-partial-types
29432961from typing import Protocol
29442962
29452963class Hashable(Protocol):
You can’t perform that action at this time.
0 commit comments