Skip to content

incorrect name mappings: last name index is used for unrelated entries #5224

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
develar opened this issue Oct 12, 2015 · 3 comments
Closed
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@develar
Copy link

develar commented Oct 12, 2015

IntelliJ IDEA supports name mappings and currently typescript compiler produces incorrect name mappings (https://youtrack.jetbrains.com/issue/WEB-17717).

Typescript code:

class Foo {
    public b = 3;
    bar(param1){
        var a = 5;
        return a;
    }
}

new Foo().bar(1);

Debug output: https://gist.github.com/develar/598a984f27bb92526094

Project to get debug output: https://dl.dropboxusercontent.com/u/43511007/s/ts-name-mappings-bug.zip

IDEA sourcemap visualiser: screen shot 2015-10-12 at 14 56 21

@mhegazy mhegazy added the Bug A bug in TypeScript label Oct 12, 2015
@mhegazy mhegazy added this to the TypeScript 1.8 milestone Oct 12, 2015
@develar
Copy link
Author

develar commented Nov 5, 2015

Is it known issue? Or was not yet investigated and pull request is welcome?

@sheetalkamat
Copy link
Member

We have decided that we wont emit the names since the sourcemap spec is unclear of its use(#5713). Browser tools don't use it either. We would be waiting to hear about symbol translation and then get to this.

@develar
Copy link
Author

develar commented Nov 19, 2015

@sheetalkamat Answered in the linked ticket. It is a wrong decision to drop name mappings generation.

@sheetalkamat sheetalkamat added the Fixed A PR has been merged for this issue label Dec 1, 2015
@mhegazy mhegazy closed this as completed Dec 1, 2015
@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