GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — Regression: specialised self overloads erase container types and suppress attribute errors · Issue #11731 · microsoft/pyright Open DescriptionDescribe the bugStarting with Pyright 1.1.412, Code or Screenshotsfrom typing import Any, Generic, Never, TypeVar, overload, reveal_type T = TypeVar("T") class Container(Generic[T]): @overload def copy(self: "Container[Never]") -> "Container[Any]": ... @overload def copy(self: "Container[int]") -> "Container[int]": ... @overload def copy(self: "Container[float]") -> "Container[float]": ... def copy(self) -> "Container[Any]": return self def example(value: Container[Any], concrete: Container[int]) -> None: reveal_type(value.copy()) reveal_type(concrete.copy()) value.copy().nonexistent_member() VS Code extension or command-line
Version 1.1.411 exits with status 1; the later versions exit with status 0.
All four versions infer #11601 intentionally handles ambiguity from nested On unchanged Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | |||||||||
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |