Title: Code is not cheked after some function calls: binder/inference bug · Issue #3994 · python/mypy · GitHub
Open Graph Title: Code is not cheked after some function calls: binder/inference bug · Issue #3994 · python/mypy
X Title: Code is not cheked after some function calls: binder/inference bug · Issue #3994 · python/mypy
Description: Any code after an UninhabitedType is marked as unreachable in binder. This leads to dangerous behaviour together with how type inference currently works "in all uncertain situations infer uninhabited" (see also #3283 for discussion). For...
Open Graph Description: Any code after an UninhabitedType is marked as unreachable in binder. This leads to dangerous behaviour together with how type inference currently works "in all uncertain situations infer uninhabit...
X Description: Any code after an UninhabitedType is marked as unreachable in binder. This leads to dangerous behaviour together with how type inference currently works "in all uncertain situations infer unin...
Opengraph URL: https://github.com/python/mypy/issues/3994
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Code is not cheked after some function calls: binder/inference bug","articleBody":"Any code after an ``UninhabitedType`` is marked as unreachable in binder. This leads to dangerous behaviour together with how type inference currently works \"in all uncertain situations infer uninhabited\" (see also https://github.com/python/mypy/issues/3283 for discussion). For example no error is reported in this code:\r\n```python\r\nfrom typing import TypeVar\r\nT = TypeVar('T')\r\n\r\ndef f() -> T:\r\n ...\r\n\r\nclass C:\r\n f()\r\n 1 + 'this is not checked'\r\n\r\ndef fun() -> None:\r\n f()\r\n 1 + 'can do everything here'\r\n\r\nif True:\r\n f()\r\n 1 + 'whatever'\r\n```\r\nThere are other function signatures (all involve type variables) that lead to this behaviour: type checking stops after a call to such function.","author":{"url":"https://github.com/ilevkivskyi","@type":"Person","name":"ilevkivskyi"},"datePublished":"2017-09-24T10:02:02Z","url":"https://github.com/python/mypy/issues/3994"}
| 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:2aa68ad7-2a0e-d9f2-e77c-ac0ef7ea32e1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E6A:3B60C0:411F46:577B46:6B002AD7 |
| html-safe-nonce | 88e06a4bd975230bcf9e32bef3d5feb66b55cdd47c76ced7ce9cd11a4a1cf2ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTZBOjNCNjBDMDo0MTFGNDY6NTc3QjQ2OjZCMDAyQUQ3IiwidmlzaXRvcl9pZCI6IjUwMjE1NTU5OTkxMTUzMjQxMTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 721ee1db5515524cd02a40f386fc3dbdc55854418cff0899eaec87bb9b8aca25 |
| hovercard-subject-tag | issue:260072907 |
| 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/3994/issue_layout |
| twitter:image | https://opengraph.githubassets.com/01b7faa7630de864f6cb5d833aa7c9d5e50bf267bf3d5ad71bb072c742938389/python/mypy/issues/3994 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/01b7faa7630de864f6cb5d833aa7c9d5e50bf267bf3d5ad71bb072c742938389/python/mypy/issues/3994 |
| og:image:alt | Any code after an UninhabitedType is marked as unreachable in binder. This leads to dangerous behaviour together with how type inference currently works "in all uncertain situations infer uninhabit... |
| 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 | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width