Title: Crash using forward-referencing type alias parameterised by dependent type variables · Issue #19186 · python/mypy · GitHub
Open Graph Title: Crash using forward-referencing type alias parameterised by dependent type variables · Issue #19186 · python/mypy
X Title: Crash using forward-referencing type alias parameterised by dependent type variables · Issue #19186 · python/mypy
Description: Crash Report & To Reproduce See mypy Playground. This is a much less obscure example than #19185, and came about while trying to find workarounds for that snippet. I'm not sure if it's related. from typing import Generic, TypeVar, TypeAl...
Open Graph Description: Crash Report & To Reproduce See mypy Playground. This is a much less obscure example than #19185, and came about while trying to find workarounds for that snippet. I'm not sure if it's related. fro...
X Description: Crash Report & To Reproduce See mypy Playground. This is a much less obscure example than #19185, and came about while trying to find workarounds for that snippet. I'm not sure if it's ...
Opengraph URL: https://github.com/python/mypy/issues/19186
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash using forward-referencing type alias parameterised by dependent type variables","articleBody":"**Crash Report & To Reproduce**\n\nSee [mypy Playground](https://mypy-play.net/?mypy=master&python=3.12&flags=show-traceback&gist=b8778e71d0239cd9a515dcc7278f8a56).\n\nThis is a much less obscure example than #19185, and came about while trying to find workarounds for that snippet. I'm not sure if it's related.\n\n```python\nfrom typing import Generic, TypeVar, TypeAlias\n\nT1 = TypeVar(\"T1\")\nT2 = TypeVar(\"T2\", default=T1)\n\nAlias: TypeAlias = \"MyClass[T1, T2]\"\n\nclass MyClass(Generic[\"T1\", \"T2\"]): ...\n```\n\n**Traceback**\n\n```\nDeferral trace:\n __main__:6\n __main__:6\n __main__:6\n __main__:-1\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\n __main__:6\nmain.py: error: INTERNAL ERROR: maximum semantic analysis iteration count reached\nFound 1 error in 1 file (errors prevented further checking)\n```\n\n**Your Environment**\n\n\u003c!-- Include as many relevant details about the environment you experienced the bug in -->\n\n- Mypy version used: 1.15, 1.16\n- Mypy command-line flags: --show-traceback\n- Mypy configuration options from `mypy.ini` (and other config files): None\n- Python version used: 3.9, 3.12\n","author":{"url":"https://github.com/bzoracler","@type":"Person","name":"bzoracler"},"datePublished":"2025-05-31T18:19:19Z","url":"https://github.com/python/mypy/issues/19186"}
| 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:2cfa84a2-223d-4e61-ce3e-72c11ebe4008 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A29A:1FB2:FCF3E0:15BD8C2:6B002895 |
| html-safe-nonce | e850334df61be545ecfcf76a76bbcd2e87f29d03c7fd66ffdb0a9eb7509fa51a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjlBOjFGQjI6RkNGM0UwOjE1QkQ4QzI6NkIwMDI4OTUiLCJ2aXNpdG9yX2lkIjoiNDcyOTk1NzIyNjE0MjI0NzA2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 65b823d5f2a574b11bb5e0ecfd685691ad8fc785df759abec56e01d522edd88a |
| hovercard-subject-tag | issue:3105870214 |
| 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/19186/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fb46b04aa17e5ad66e1d4f4bf5eecd59bf1dfa548060a90c717e644fda9364e6/python/mypy/issues/19186 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fb46b04aa17e5ad66e1d4f4bf5eecd59bf1dfa548060a90c717e644fda9364e6/python/mypy/issues/19186 |
| og:image:alt | Crash Report & To Reproduce See mypy Playground. This is a much less obscure example than #19185, and came about while trying to find workarounds for that snippet. I'm not sure if it's related. fro... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bzoracler |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width