{"action":"opened","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/22181","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/22181/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/22181/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/22181/events","html_url":"https://github.com/nodejs/node/issues/22181","id":348515934,"node_id":"MDU6SXNzdWUzNDg1MTU5MzQ=","number":22181,"title":"REPL variable declaration and reference errors","user":{"login":"w1jp","id":448780,"node_id":"MDQ6VXNlcjQ0ODc4MA==","avatar_url":"https://avatars3.githubusercontent.com/u/448780?v=4","gravatar_id":"","url":"https://api.github.com/users/w1jp","html_url":"https://github.com/w1jp","followers_url":"https://api.github.com/users/w1jp/followers","following_url":"https://api.github.com/users/w1jp/following{/other_user}","gists_url":"https://api.github.com/users/w1jp/gists{/gist_id}","starred_url":"https://api.github.com/users/w1jp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w1jp/subscriptions","organizations_url":"https://api.github.com/users/w1jp/orgs","repos_url":"https://api.github.com/users/w1jp/repos","events_url":"https://api.github.com/users/w1jp/events{/privacy}","received_events_url":"https://api.github.com/users/w1jp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-07T22:58:12Z","updated_at":"2018-08-07T22:58:12Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nThank you for reporting an issue.\r\n\r\nThis issue tracker is for bugs and issues found within Node.js core.\r\nIf you require more general support please file an issue on our help\r\nrepo. https://github.com/nodejs/help\r\n\r\n\r\nPlease fill in as much of the template below as you're able.\r\n\r\nVersion: output of `node -v`\r\nPlatform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)\r\nSubsystem: if known, please specify affected core module name\r\n\r\nIf possible, please provide code that demonstrates the problem, keeping it as\r\nsimple and free of external dependencies as you are able.\r\n-->\r\n\r\n* **Version**:  \r\nv10.7.0\r\n\r\n* **Platform**:\r\nDarwin jMacBook.local 17.7.0 Darwin Kernel Version 17.7.0: Fri Jul  6 19:54:51 PDT 2018; root:xnu-4570.71.3~2/RELEASE_X86_64 x86_64\r\n\r\n* **Subsystem**:\r\nREPL\r\n\r\n<!-- Enter your issue details below this comment. -->\r\nThis has been happening a few releases and I am surprised no one has reported (that I could easily find) or fixed it. When declaring a variable with 'let' or 'const' and the literal contains an error, the system will not let me redeclare the variable or use it in an assignment. In the example below, I would have expected the REPL to merely ignore my declaration after giving me the error. I should then be free to redeclare it. However, it will not let me redeclare 'a' nor reference it for an assignment.\r\n\r\n\r\nEXAMPLE:\r\njon@jMacBook:wrk$ node -v\r\nv10.7.0\r\njon@jMacBook:wrk$ node\r\n> let a = a\r\nReferenceError: a is not defined\r\n> let a = 1\r\nSyntaxError: Identifier 'a' has already been declared\r\n> a = 1\r\nReferenceError: a is not defined\r\n> \r\n\r\n"}}
{"actor":{"display_login":"w1jp"}}