Skip to content

ES6 class You cannot rename this element #8777

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
dbaeumer opened this issue May 24, 2016 · 2 comments
Closed

ES6 class You cannot rename this element #8777

dbaeumer opened this issue May 24, 2016 · 2 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@dbaeumer
Copy link
Member

From @mikehaas763 on May 23, 2016 16:35

  • VSCode Version: 1.1.1
  • OS Version: OS X El Capitan 10.11.5

Steps to Reproduce:

  1. Create an ES6 class with a constructor
export class AppEnvironment {
    constructor(environment) {
        this.environment = environment;
    }
}
  1. right click the environment symbol that's part of the this.environment expression -> click rename symbol
  2. Rename the symbol
  3. "You cannot rename this element"

I'm aware that this probably doesn't work because it's just not implemented yet. Just want to bring it up to hope it gets implemented.

Copied from original issue: microsoft/vscode#6680

@dbaeumer dbaeumer self-assigned this May 24, 2016
@mhegazy mhegazy added the Bug A bug in TypeScript label May 24, 2016
@mhegazy mhegazy added this to the TypeScript 2.0 milestone May 24, 2016
@mhegazy mhegazy added the Salsa label May 24, 2016
@mhegazy mhegazy assigned sandersn and unassigned dbaeumer May 24, 2016
@mhegazy
Copy link
Contributor

mhegazy commented May 24, 2016

This should work in a .js file, but not a .ts file.

@sandersn
Copy link
Member

Symbols weren't being created for this.x = ... assignments in ES6 constructors. Fix is up at #8844

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label May 26, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants