Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

diagnostic regression - unused variables from destructuring with rename  #24142

Copy link
Copy link
@jkillian

Description

@jkillian
Issue body actions

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?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingThe issue relates to error messagingFixedA PR has been merged for this issueA PR has been merged for this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.