Title: Crash in incremental mode when binder interacts with callable types · Issue #4599 · python/mypy · GitHub
Open Graph Title: Crash in incremental mode when binder interacts with callable types · Issue #4599 · python/mypy
X Title: Crash in incremental mode when binder interacts with callable types · Issue #4599 · python/mypy
Description: There is one more crash without a simple repro: Traceback (most recent call last): File "[somewhere]/mypy/main.py", line 80, in main type_check_only(sources, bin_dir, options, flush_errors) File "[somewhere]/mypy/main.py", line 129, in t...
Open Graph Description: There is one more crash without a simple repro: Traceback (most recent call last): File "[somewhere]/mypy/main.py", line 80, in main type_check_only(sources, bin_dir, options, flush_errors) File "[...
X Description: There is one more crash without a simple repro: Traceback (most recent call last): File "[somewhere]/mypy/main.py", line 80, in main type_check_only(sources, bin_dir, options, flush_error...
Opengraph URL: https://github.com/python/mypy/issues/4599
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash in incremental mode when binder interacts with callable types","articleBody":"There is one more crash without a simple repro:\r\n```\r\nTraceback (most recent call last):\r\n File \"[somewhere]/mypy/main.py\", line 80, in main\r\n type_check_only(sources, bin_dir, options, flush_errors)\r\n File \"[somewhere]/mypy/main.py\", line 129, in type_check_only\r\n flush_errors=flush_errors)\r\n File \"[somewhere]/mypy/build.py\", line 172, in build\r\n result = _build(sources, options, alt_lib_path, bin_dir, saved_cache, flush_errors)\r\n File \"[somewhere]/mypy/build.py\", line 258, in _build\r\n graph = dispatch(sources, manager)\r\n File \"[somewhere]/mypy/build.py\", line 2048, in dispatch\r\n process_graph(graph, manager)\r\n File \"[somewhere]/mypy/build.py\", line 2349, in process_graph\r\n process_stale_scc(graph, scc, manager)\r\n File \"[somewhere]/mypy/build.py\", line 2525, in process_stale_scc\r\n graph[id].type_check_first_pass()\r\n File \"[somewhere]/mypy/build.py\", line 1923, in type_check_first_pass\r\n self.type_checker().check_first_pass()\r\n File \"[somewhere]/mypy/checker.py\", line 228, in check_first_pass\r\n self.accept(d)\r\n File \"[somewhere]/mypy/checker.py\", line 323, in accept\r\n stmt.accept(self)\r\n File \"[somewhere]/mypy/nodes.py\", line 701, in accept\r\n return visitor.visit_class_def(self)\r\n File \"[somewhere]/mypy/checker.py\", line 1251, in visit_class_def\r\n self.accept(defn.defs)\r\n File \"[somewhere]/mypy/checker.py\", line 323, in accept\r\n stmt.accept(self)\r\n File \"[somewhere]/mypy/nodes.py\", line 763, in accept\r\n return visitor.visit_block(self)\r\n File \"[somewhere]/mypy/checker.py\", line 1371, in visit_block\r\n self.accept(s)\r\n File \"[somewhere]/mypy/checker.py\", line 323, in accept\r\n stmt.accept(self)\r\n File \"[somewhere]/mypy/nodes.py\", line 574, in accept\r\n return visitor.visit_decorator(self)\r\n File \"[somewhere]/mypy/checker.py\", line 2537, in visit_decorator\r\n self.check_func_item(e.func, name=e.func.name())\r\n File \"[somewhere]/mypy/checker.py\", line 640, in check_func_item\r\n self.check_func_def(defn, typ, name)\r\n File \"[somewhere]/mypy/checker.py\", line 803, in check_func_def\r\n self.accept(item.body)\r\n File \"[somewhere]/mypy/checker.py\", line 323, in accept\r\n stmt.accept(self)\r\n File \"[somewhere]/mypy/nodes.py\", line 763, in accept\r\n return visitor.visit_block(self)\r\n File \"[somewhere]/mypy/checker.py\", line 1371, in visit_block\r\n self.accept(s)\r\n File \"[somewhere]/mypy/checker.py\", line 323, in accept\r\n stmt.accept(self)\r\n File \"[somewhere]/mypy/nodes.py\", line 928, in accept\r\n return visitor.visit_if_stmt(self)\r\n File \"[somewhere]/mypy/checker.py\", line 2244, in visit_if_stmt\r\n self.accept(s.else_body)\r\n File \"...lib/python3.5/contextlib.py\", line 66, in __exit__\r\n next(self.gen)\r\n File \"[somewhere]/mypy/binder.py\", line 379, in frame_context\r\n self.pop_frame(can_skip, fall_through)\r\n File \"[somewhere]/mypy/binder.py\", line 223, in pop_frame\r\n self.last_pop_changed = self.update_from_options(options)\r\n File \"[somewhere]/mypy/binder.py\", line 199, in update_from_options\r\n type = join_simple(self.declarations[key], type, other)\r\n File \"[somewhere]/mypy/join.py\", line 34, in join_simple\r\n if is_proper_subtype(s, t):\r\n File \"[somewhere]/mypy/subtypes.py\", line 835, in is_proper_subtype\r\n return left.accept(ProperSubtypeVisitor(right))\r\n File \"[somewhere]/mypy/types.py\", line 742, in accept\r\n return visitor.visit_callable_type(self)\r\n File \"[somewhere]/mypy/subtypes.py\", line 917, in visit_callable_type\r\n use_proper_subtype=True)\r\n File \"[somewhere]/mypy/subtypes.py\", line 726, in is_callable_subtype\r\n if left_arg.pos is not None\r\n File \"[somewhere]/mypy/types.py\", line 818, in argument_by_position\r\n self.arg_kinds[position],\r\nIndexError: list index out of range\r\n```\r\n\r\nThis appeared several times recently, so I set priority to high.","author":{"url":"https://github.com/ilevkivskyi","@type":"Person","name":"ilevkivskyi"},"datePublished":"2018-02-20T17:01:27Z","url":"https://github.com/python/mypy/issues/4599"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:18331173-ddab-2953-4d23-2e6091362d20 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A272:1756E4:20D984C:2B78636:6B004DBB |
| html-safe-nonce | 212fa3e20ceae86f05a0970f31cee54ff6e7ac75f4ff8139b57b70f086181823 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjcyOjE3NTZFNDoyMEQ5ODRDOjJCNzg2MzY6NkIwMDREQkIiLCJ2aXNpdG9yX2lkIjoiOTAyMzA0MDg0ODI3MDQ3ODc3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 263a63448be74c2795870777357b669ee78e77d2088e7338927d0461d1a18fd0 |
| hovercard-subject-tag | issue:298671952 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/4599/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cf554d9e0ee2f047b4f1aaae7aea45ecf2de22d16dc1c6a6b4cc90afcb4988d1/python/mypy/issues/4599 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cf554d9e0ee2f047b4f1aaae7aea45ecf2de22d16dc1c6a6b4cc90afcb4988d1/python/mypy/issues/4599 |
| og:image:alt | There is one more crash without a simple repro: Traceback (most recent call last): File "[somewhere]/mypy/main.py", line 80, in main type_check_only(sources, bin_dir, options, flush_errors) File "[... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ilevkivskyi |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width