Title: Recursive let/const references should error · Issue #2188 · microsoft/TypeScript · GitHub
Open Graph Title: Recursive let/const references should error · Issue #2188 · microsoft/TypeScript
X Title: Recursive let/const references should error · Issue #2188 · microsoft/TypeScript
Description: The constructs: let v = v; const c = c; should error because they are uses before definition. Indeed IE gives this error. This also applies to: for (let v = v; ; ) { } for (let v in v) { } for (let v of v) { } For the latter two in parti...
Open Graph Description: The constructs: let v = v; const c = c; should error because they are uses before definition. Indeed IE gives this error. This also applies to: for (let v = v; ; ) { } for (let v in v) { } for (let...
X Description: The constructs: let v = v; const c = c; should error because they are uses before definition. Indeed IE gives this error. This also applies to: for (let v = v; ; ) { } for (let v in v) { } for (let...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/2188
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Recursive let/const references should error","articleBody":"The constructs:\n\n``` ts\nlet v = v;\nconst c = c;\n```\n\nshould error because they are uses before definition. Indeed IE gives this error.\n\nThis also applies to:\n\n``` ts\nfor (let v = v; ; ) { }\nfor (let v in v) { }\nfor (let v of v) { }\n```\n\nFor the latter two in particular, look at section 13.6.4.12 in the ES6 spec:\n1. Let oldEnv be the running execution context’s LexicalEnvironment.\n2. If TDZnames is not an empty List, then\n \n a. Assert: TDZnames has no duplicate entries.\n b. Let TDZ be NewDeclarativeEnvironment(oldEnv).\n c. For each string name in TDZnames, do\n \n ```\n i. Let status be TDZ.CreateMutableBinding(name, false).\n ii. Assert: status is never an abrupt completion.\n ```\n \n d. Set the running execution context’s LexicalEnvironment to TDZ.\n3. Let exprRef be the result of evaluating the production that is expr.\n4. Set the running execution context’s LexicalEnvironment to oldEnv.\n","author":{"url":"https://github.com/JsonFreeman","@type":"Person","name":"JsonFreeman"},"datePublished":"2015-03-02T22:47:46Z","url":"https://github.com/microsoft/TypeScript/issues/2188"}
| 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:41ccfc6b-729e-4b0d-962d-c4e6824e2a9f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1E2:34E5C3:10DB083:173F4AD:6AFBFDBC |
| html-safe-nonce | f583a62662f556d282c06b8f77979d0c8df00a8e2fb95d5b04a948aa2c75cb9a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUUyOjM0RTVDMzoxMERCMDgzOjE3M0Y0QUQ6NkFGQkZEQkMiLCJ2aXNpdG9yX2lkIjoiNzUxOTUxMzE4MjIxNTg1ODUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 71f4e835f90ba6b47bbd39ade4617389d29a9a98fd6892c5f868546e7e379699 |
| hovercard-subject-tag | issue:59564729 |
| 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/microsoft/TypeScript/2188/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6b01c9fa255816d285117b5118a529521c57842bd7049285072947c7cf14357c/microsoft/TypeScript/issues/2188 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6b01c9fa255816d285117b5118a529521c57842bd7049285072947c7cf14357c/microsoft/TypeScript/issues/2188 |
| og:image:alt | The constructs: let v = v; const c = c; should error because they are uses before definition. Indeed IE gives this error. This also applies to: for (let v = v; ; ) { } for (let v in v) { } for (let... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JsonFreeman |
| hostname | github.com |
| expected-hostname | github.com |
| None | fa74413a1d84dac536fcca0740780bcbd3207bafec0e51873b73ff8e8cca032f |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| 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 | b3b5633a74535d9c23385512d534c66c8fde1907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width