1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
=== tests/cases/compiler/moduleDuplicateIdentifiers.ts ===
export var Foo = 2;
>Foo : Symbol(Foo, Decl(moduleDuplicateIdentifiers.ts, 0, 10), Decl(moduleDuplicateIdentifiers.ts, 1, 10))
export var Foo = 42; // Should error
>Foo : Symbol(Foo, Decl(moduleDuplicateIdentifiers.ts, 0, 10), Decl(moduleDuplicateIdentifiers.ts, 1, 10))
export interface Bar {
>Bar : Symbol(Bar, Decl(moduleDuplicateIdentifiers.ts, 1, 20), Decl(moduleDuplicateIdentifiers.ts, 5, 1))
_brand1: any;
>_brand1 : Symbol(Bar._brand1, Decl(moduleDuplicateIdentifiers.ts, 3, 22))
}
export interface Bar { // Shouldn't error
>Bar : Symbol(Bar, Decl(moduleDuplicateIdentifiers.ts, 1, 20), Decl(moduleDuplicateIdentifiers.ts, 5, 1))
_brand2: any;
>_brand2 : Symbol(Bar._brand2, Decl(moduleDuplicateIdentifiers.ts, 7, 22))
}
export namespace FooBar {
>FooBar : Symbol(FooBar, Decl(moduleDuplicateIdentifiers.ts, 9, 1), Decl(moduleDuplicateIdentifiers.ts, 13, 1))
export var member1 = 2;
>member1 : Symbol(member1, Decl(moduleDuplicateIdentifiers.ts, 12, 11))
}
export namespace FooBar { // Shouldn't error
>FooBar : Symbol(FooBar, Decl(moduleDuplicateIdentifiers.ts, 9, 1), Decl(moduleDuplicateIdentifiers.ts, 13, 1))
export var member2 = 42;
>member2 : Symbol(member2, Decl(moduleDuplicateIdentifiers.ts, 16, 11))
}
export class Kettle {
>Kettle : Symbol(Kettle, Decl(moduleDuplicateIdentifiers.ts, 17, 1))
member1 = 2;
>member1 : Symbol(Kettle.member1, Decl(moduleDuplicateIdentifiers.ts, 19, 21))
}
export class Kettle { // Should error
>Kettle : Symbol(Kettle, Decl(moduleDuplicateIdentifiers.ts, 21, 1))
member2 = 42;
>member2 : Symbol(Kettle.member2, Decl(moduleDuplicateIdentifiers.ts, 23, 21))
}
export var Pot = 2;
>Pot : Symbol(Pot, Decl(moduleDuplicateIdentifiers.ts, 27, 10))
Pot = 42; // Shouldn't error
>Pot : Symbol(Pot, Decl(moduleDuplicateIdentifiers.ts, 27, 10))
export enum Utensils {
>Utensils : Symbol(Utensils, Decl(moduleDuplicateIdentifiers.ts, 28, 9), Decl(moduleDuplicateIdentifiers.ts, 34, 1))
Spoon,
>Spoon : Symbol(Utensils.Spoon, Decl(moduleDuplicateIdentifiers.ts, 30, 22))
Fork,
>Fork : Symbol(Utensils.Fork, Decl(moduleDuplicateIdentifiers.ts, 31, 7))
Knife
>Knife : Symbol(Utensils.Knife, Decl(moduleDuplicateIdentifiers.ts, 32, 6))
}
export enum Utensils { // Shouldn't error
>Utensils : Symbol(Utensils, Decl(moduleDuplicateIdentifiers.ts, 28, 9), Decl(moduleDuplicateIdentifiers.ts, 34, 1))
Spork = 3
>Spork : Symbol(Utensils.Spork, Decl(moduleDuplicateIdentifiers.ts, 36, 22))
}
|