Skip to content
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

Duplicate duplicate identifier errors #21923

Closed
mjbvz opened this issue Feb 13, 2018 · 2 comments
Closed

Duplicate duplicate identifier errors #21923

mjbvz opened this issue Feb 13, 2018 · 2 comments
Labels
Bug A bug in TypeScript Help Wanted You can do this VS Code Tracked There is a VS Code equivalent to this issue
Milestone

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Feb 13, 2018

From microsoft/vscode#43554

TypeScript Version: 2.8.0-dev-0211

Search Terms:

  • Duplicate identifier

Code

class Point {

    constructor(private x?: number, private y?: number) {

    }

    get x() {
        return this.x;
    }

}

Bug
Two duplicate errors for line 7 are returned:

screen shot 2018-02-13 at 2 58 45 pm

[Trace  - 14:56:00] Event received: semanticDiag (0).
Data: {
    "file": "/Users/matb/projects/san/src/Button.ts",
    "diagnostics": [
        {
            "start": {
                "line": 3,
                "offset": 25
            },
            "end": {
                "line": 3,
                "offset": 26
            },
            "text": "Duplicate identifier 'x'.",
            "code": 2300,
            "category": "error"
        },
        {
            "start": {
                "line": 7,
                "offset": 9
            },
            "end": {
                "line": 7,
                "offset": 10
            },
            "text": "Duplicate identifier 'x'.",
            "code": 2300,
            "category": "error"
        },
        {
            "start": {
                "line": 7,
                "offset": 9
            },
            "end": {
                "line": 7,
                "offset": 10
            },
            "text": "Duplicate identifier 'x'.",
            "code": 2300,
            "category": "error"
        }
    ]
}
@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label Feb 13, 2018
@mhegazy mhegazy added Bug A bug in TypeScript Help Wanted You can do this labels Mar 9, 2018
@mhegazy mhegazy added this to the Community milestone Mar 9, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Mar 9, 2018

PRs welcomed. At this point it is not clear why we have the extra error message, so that is where i would look first.

@ghost

This comment has been minimized.

@RyanCavanaugh RyanCavanaugh modified the milestones: Community, Backlog Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

4 participants