Skip to content

diagnostic regression - unused variables from destructuring with rename #24142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jkillian opened this issue May 15, 2018 · 0 comments
Closed
Labels
Bug A bug in TypeScript Domain: Error Messages The issue relates to error messaging Fixed A PR has been merged for this issue

Comments

@jkillian
Copy link

jkillian commented May 15, 2018

TypeScript Version: 2.9.0-dev.20180509 and up

Code

export function testRenamingDestructure() {
  let {a: b} = {a: 4};
}

Expected behavior:

Error produced in 2.9.0-dev.20180506 and before:

test.ts:2:8 - error TS6133: 'b' is declared but its value is never read.

2   let {a: b} = {a: 4};
         ~~~~

Actual behavior:

Error produced in 2.9.0-dev.20180509 and after:

test.ts:2:7 - error TS6133: 'a' is declared but its value is never read.

2   let {a: b} = {a: 4};
        ~~~~~~

Description:

Our TSLint tests based off of TypeScript@next started breaking a few days ago. I tracked one of the breaks down to the change in error messages noted above. The older error message seems more correct here - in the example above, a cannot actually be accessed.

Related Issues: Possibly related to #23805?

@ghost ghost added Bug A bug in TypeScript Domain: Error Messages The issue relates to error messaging Fixed A PR has been merged for this issue labels May 15, 2018
@ghost ghost closed this as completed in #24145 May 15, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: Error Messages The issue relates to error messaging Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

1 participant