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 — Segfault / RecursionError when calling an instance whose class declares __call__ as an attribute of its own type · Issue #22361 · python/mypy Open DescriptionCrash Report mypy crashes when an instance is called and its class declares Possibly related to the closed callable-protocol-with- Traceback On master (pure Python): case.py:5: error: INTERNAL ERROR -- Please try using mypy master on GitHub: ... File ".../mypy/expandtype.py", line 654, in expand_self_type return expand_type(typ, {var.info.self_type.id: replacement}) File ".../mypy/expandtype.py", line 74, in expand_type return typ.accept(ExpandTypeVisitor(env, normalize_callables)) RecursionError: maximum recursion depth exceeded Compiled wheels (2.4.0, 2.4.1) print no traceback and exit with To Reproduce class C: __call__: "C" def f(x: C) -> None: x() Run: Also crashes with mypy-play: https://mypy-play.net/?gist=e7b53eb68b638455a3bac9a39f9f0a79 Expected Behavior No crash. Either an error about the call or accepting it would be better than a crash. Your Environment
Activity
MetadataMetadataAssigneesProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — 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. |