Skip to content

"'x' was also declared here. and here." repeats same location #27280

Closed
@ghost

Description

TypeScript Version: 3.1.0-dev.20180921

Code

// @Filename: /dir/a.ts
export const x = 0;

// @Filename: /dir/b.ts
export {};

declare module "./a" {
    export const x = 0;
}

declare module "../dir/a" {
    export const x = 0;
}

Expected behavior:

Error message mentions two different locations.

Actual behavior:

Mentions the same location twice.

!!! error TS2451: Cannot redeclare block-scoped variable 'x'.
!!! related TS6203 /dir/b.ts:4:18: 'x' was also declared here.
!!! related TS6204 /dir/b.ts:4:18: and here.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions