From e960e0ddd24851aee70a93efe0e7f7bdf4212a70 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 20 Jul 2015 22:40:24 -0700 Subject: [PATCH 1/4] Fix reporting an error on block-scope for module --- src/compiler/checker.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 007edacadc..9719c2de58 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -573,7 +573,16 @@ namespace ts { declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); return undefined; } - if (result.flags & SymbolFlags.BlockScopedVariable) { + + // Only check for block-scoped variable if we are looking for the name with variable meaning + // For example, + // declare module foo { + // interface bar {} + // } + // let foo/*1*/: foo/*2*/.bar; + // The foo at /*1*/ and /*2*/ will share same symbol with two meaning block-scope variable and namespace module. + // However, only when we try to resolve name in /*1*/ which is used in variable position, we want to check for block- scoped + if (meaning & SymbolFlags.Variable && result.flags & SymbolFlags.BlockScopedVariable) { checkResolvedBlockScopedVariable(result, errorLocation); } } @@ -4256,11 +4265,11 @@ namespace ts { return getInferredType(context, i); } } - return t; + return t; }; mapper.context = context; - return mapper; + return mapper; } function identityMapper(type: Type): Type { From 41673436300470d10a622feb3334eead1f0ba960 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 20 Jul 2015 23:30:43 -0700 Subject: [PATCH 2/4] Add tests and baselines --- ...InterfaceNameWithSameLetDeclarationName1.js | 7 +++++++ ...faceNameWithSameLetDeclarationName1.symbols | 8 ++++++++ ...erfaceNameWithSameLetDeclarationName1.types | 8 ++++++++ ...InterfaceNameWithSameLetDeclarationName2.js | 9 +++++++++ ...faceNameWithSameLetDeclarationName2.symbols | 17 +++++++++++++++++ ...erfaceNameWithSameLetDeclarationName2.types | 17 +++++++++++++++++ ...lveModuleNameWithSameLetDeclarationName1.js | 12 ++++++++++++ ...duleNameWithSameLetDeclarationName1.symbols | 15 +++++++++++++++ ...ModuleNameWithSameLetDeclarationName1.types | 15 +++++++++++++++ ...lveModuleNameWithSameLetDeclarationName2.js | 11 +++++++++++ ...duleNameWithSameLetDeclarationName2.symbols | 18 ++++++++++++++++++ ...ModuleNameWithSameLetDeclarationName2.types | 18 ++++++++++++++++++ ...olveTypeAliasWithSameLetDeclarationName1.js | 13 +++++++++++++ ...ypeAliasWithSameLetDeclarationName1.symbols | 12 ++++++++++++ ...eTypeAliasWithSameLetDeclarationName1.types | 12 ++++++++++++ ...InterfaceNameWithSameLetDeclarationName1.ts | 2 ++ ...InterfaceNameWithSameLetDeclarationName2.ts | 4 ++++ ...lveModuleNameWithSameLetDeclarationName1.ts | 8 ++++++++ ...lveModuleNameWithSameLetDeclarationName2.ts | 8 ++++++++ ...olveTypeAliasWithSameLetDeclarationName1.ts | 3 +++ 20 files changed, 217 insertions(+) create mode 100644 tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.js create mode 100644 tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.symbols create mode 100644 tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.types create mode 100644 tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.js create mode 100644 tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.symbols create mode 100644 tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.types create mode 100644 tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.js create mode 100644 tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.symbols create mode 100644 tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.types create mode 100644 tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.js create mode 100644 tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.symbols create mode 100644 tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.types create mode 100644 tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.js create mode 100644 tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.symbols create mode 100644 tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.types create mode 100644 tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName1.ts create mode 100644 tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName2.ts create mode 100644 tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName1.ts create mode 100644 tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName2.ts create mode 100644 tests/cases/compiler/resolveTypeAliasWithSameLetDeclarationName1.ts diff --git a/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.js b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.js new file mode 100644 index 0000000000..9349da082e --- /dev/null +++ b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.js @@ -0,0 +1,7 @@ +//// [resolveInterfaceNameWithSameLetDeclarationName1.ts] +interface bar { } +let bar: bar; + + +//// [resolveInterfaceNameWithSameLetDeclarationName1.js] +var bar; diff --git a/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.symbols b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.symbols new file mode 100644 index 0000000000..bcabaef55c --- /dev/null +++ b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.symbols @@ -0,0 +1,8 @@ +=== tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName1.ts === +interface bar { } +>bar : Symbol(bar, Decl(resolveInterfaceNameWithSameLetDeclarationName1.ts, 0, 0), Decl(resolveInterfaceNameWithSameLetDeclarationName1.ts, 1, 3)) + +let bar: bar; +>bar : Symbol(bar, Decl(resolveInterfaceNameWithSameLetDeclarationName1.ts, 0, 0), Decl(resolveInterfaceNameWithSameLetDeclarationName1.ts, 1, 3)) +>bar : Symbol(bar, Decl(resolveInterfaceNameWithSameLetDeclarationName1.ts, 0, 0), Decl(resolveInterfaceNameWithSameLetDeclarationName1.ts, 1, 3)) + diff --git a/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.types b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.types new file mode 100644 index 0000000000..29de2a9f5b --- /dev/null +++ b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName1.types @@ -0,0 +1,8 @@ +=== tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName1.ts === +interface bar { } +>bar : bar + +let bar: bar; +>bar : bar +>bar : bar + diff --git a/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.js b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.js new file mode 100644 index 0000000000..8f43889191 --- /dev/null +++ b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.js @@ -0,0 +1,9 @@ +//// [resolveInterfaceNameWithSameLetDeclarationName2.ts] +interface foo { } +interface bar { } +let bar: bar | foo; +let foo: bar | foo; + +//// [resolveInterfaceNameWithSameLetDeclarationName2.js] +var bar; +var foo; diff --git a/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.symbols b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.symbols new file mode 100644 index 0000000000..785a464839 --- /dev/null +++ b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.symbols @@ -0,0 +1,17 @@ +=== tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName2.ts === +interface foo { } +>foo : Symbol(foo, Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 0, 0), Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 3, 3)) + +interface bar { } +>bar : Symbol(bar, Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 0, 17), Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 2, 3)) + +let bar: bar | foo; +>bar : Symbol(bar, Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 0, 17), Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 2, 3)) +>bar : Symbol(bar, Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 0, 17), Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 2, 3)) +>foo : Symbol(foo, Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 0, 0), Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 3, 3)) + +let foo: bar | foo; +>foo : Symbol(foo, Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 0, 0), Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 3, 3)) +>bar : Symbol(bar, Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 0, 17), Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 2, 3)) +>foo : Symbol(foo, Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 0, 0), Decl(resolveInterfaceNameWithSameLetDeclarationName2.ts, 3, 3)) + diff --git a/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.types b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.types new file mode 100644 index 0000000000..1220152d21 --- /dev/null +++ b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.types @@ -0,0 +1,17 @@ +=== tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName2.ts === +interface foo { } +>foo : foo + +interface bar { } +>bar : bar + +let bar: bar | foo; +>bar : foo | bar +>bar : bar +>foo : foo + +let foo: bar | foo; +>foo : foo | bar +>bar : bar +>foo : foo + diff --git a/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.js b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.js new file mode 100644 index 0000000000..b3dc4f1251 --- /dev/null +++ b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.js @@ -0,0 +1,12 @@ +//// [resolveModuleNameWithSameLetDeclarationName1.ts] +declare module foo { + + interface Bar { + + } +} + +let foo: foo.Bar; + +//// [resolveModuleNameWithSameLetDeclarationName1.js] +var foo; diff --git a/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.symbols b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.symbols new file mode 100644 index 0000000000..21ff88ac38 --- /dev/null +++ b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.symbols @@ -0,0 +1,15 @@ +=== tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName1.ts === +declare module foo { +>foo : Symbol(foo, Decl(resolveModuleNameWithSameLetDeclarationName1.ts, 0, 0), Decl(resolveModuleNameWithSameLetDeclarationName1.ts, 7, 3)) + + interface Bar { +>Bar : Symbol(Bar, Decl(resolveModuleNameWithSameLetDeclarationName1.ts, 0, 20)) + + } +} + +let foo: foo.Bar; +>foo : Symbol(foo, Decl(resolveModuleNameWithSameLetDeclarationName1.ts, 0, 0), Decl(resolveModuleNameWithSameLetDeclarationName1.ts, 7, 3)) +>foo : Symbol(foo, Decl(resolveModuleNameWithSameLetDeclarationName1.ts, 0, 0), Decl(resolveModuleNameWithSameLetDeclarationName1.ts, 7, 3)) +>Bar : Symbol(foo.Bar, Decl(resolveModuleNameWithSameLetDeclarationName1.ts, 0, 20)) + diff --git a/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.types b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.types new file mode 100644 index 0000000000..c278f46020 --- /dev/null +++ b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName1.types @@ -0,0 +1,15 @@ +=== tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName1.ts === +declare module foo { +>foo : Bar + + interface Bar { +>Bar : Bar + + } +} + +let foo: foo.Bar; +>foo : foo.Bar +>foo : any +>Bar : foo.Bar + diff --git a/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.js b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.js new file mode 100644 index 0000000000..46b5f58788 --- /dev/null +++ b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.js @@ -0,0 +1,11 @@ +//// [resolveModuleNameWithSameLetDeclarationName2.ts] +declare module "punycode" { + interface ucs2 { + decode(string: string): string; + encode(codePoints: number[]): string; + } + + export let ucs2: ucs2; +} + +//// [resolveModuleNameWithSameLetDeclarationName2.js] diff --git a/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.symbols b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.symbols new file mode 100644 index 0000000000..e98437abb9 --- /dev/null +++ b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.symbols @@ -0,0 +1,18 @@ +=== tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName2.ts === +declare module "punycode" { + interface ucs2 { +>ucs2 : Symbol(ucs2, Decl(resolveModuleNameWithSameLetDeclarationName2.ts, 0, 27), Decl(resolveModuleNameWithSameLetDeclarationName2.ts, 6, 14)) + + decode(string: string): string; +>decode : Symbol(decode, Decl(resolveModuleNameWithSameLetDeclarationName2.ts, 1, 20)) +>string : Symbol(string, Decl(resolveModuleNameWithSameLetDeclarationName2.ts, 2, 15)) + + encode(codePoints: number[]): string; +>encode : Symbol(encode, Decl(resolveModuleNameWithSameLetDeclarationName2.ts, 2, 39)) +>codePoints : Symbol(codePoints, Decl(resolveModuleNameWithSameLetDeclarationName2.ts, 3, 15)) + } + + export let ucs2: ucs2; +>ucs2 : Symbol(ucs2, Decl(resolveModuleNameWithSameLetDeclarationName2.ts, 0, 27), Decl(resolveModuleNameWithSameLetDeclarationName2.ts, 6, 14)) +>ucs2 : Symbol(ucs2, Decl(resolveModuleNameWithSameLetDeclarationName2.ts, 0, 27), Decl(resolveModuleNameWithSameLetDeclarationName2.ts, 6, 14)) +} diff --git a/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.types b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.types new file mode 100644 index 0000000000..835e4656f5 --- /dev/null +++ b/tests/baselines/reference/resolveModuleNameWithSameLetDeclarationName2.types @@ -0,0 +1,18 @@ +=== tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName2.ts === +declare module "punycode" { + interface ucs2 { +>ucs2 : ucs2 + + decode(string: string): string; +>decode : (string: string) => string +>string : string + + encode(codePoints: number[]): string; +>encode : (codePoints: number[]) => string +>codePoints : number[] + } + + export let ucs2: ucs2; +>ucs2 : ucs2 +>ucs2 : ucs2 +} diff --git a/tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.js b/tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.js new file mode 100644 index 0000000000..ac73145ee5 --- /dev/null +++ b/tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.js @@ -0,0 +1,13 @@ +//// [resolveTypeAliasWithSameLetDeclarationName1.ts] +class C { } +type baz = C; +let baz: baz; + + +//// [resolveTypeAliasWithSameLetDeclarationName1.js] +var C = (function () { + function C() { + } + return C; +})(); +var baz; diff --git a/tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.symbols b/tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.symbols new file mode 100644 index 0000000000..cd5c05301c --- /dev/null +++ b/tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/resolveTypeAliasWithSameLetDeclarationName1.ts === +class C { } +>C : Symbol(C, Decl(resolveTypeAliasWithSameLetDeclarationName1.ts, 0, 0)) + +type baz = C; +>baz : Symbol(baz, Decl(resolveTypeAliasWithSameLetDeclarationName1.ts, 0, 11), Decl(resolveTypeAliasWithSameLetDeclarationName1.ts, 2, 3)) +>C : Symbol(C, Decl(resolveTypeAliasWithSameLetDeclarationName1.ts, 0, 0)) + +let baz: baz; +>baz : Symbol(baz, Decl(resolveTypeAliasWithSameLetDeclarationName1.ts, 0, 11), Decl(resolveTypeAliasWithSameLetDeclarationName1.ts, 2, 3)) +>baz : Symbol(baz, Decl(resolveTypeAliasWithSameLetDeclarationName1.ts, 0, 11), Decl(resolveTypeAliasWithSameLetDeclarationName1.ts, 2, 3)) + diff --git a/tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.types b/tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.types new file mode 100644 index 0000000000..7bb61e29a2 --- /dev/null +++ b/tests/baselines/reference/resolveTypeAliasWithSameLetDeclarationName1.types @@ -0,0 +1,12 @@ +=== tests/cases/compiler/resolveTypeAliasWithSameLetDeclarationName1.ts === +class C { } +>C : C + +type baz = C; +>baz : C +>C : C + +let baz: baz; +>baz : C +>baz : C + diff --git a/tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName1.ts b/tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName1.ts new file mode 100644 index 0000000000..a0f1094e3f --- /dev/null +++ b/tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName1.ts @@ -0,0 +1,2 @@ +interface bar { } +let bar: bar; diff --git a/tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName2.ts b/tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName2.ts new file mode 100644 index 0000000000..5f40f5fd4b --- /dev/null +++ b/tests/cases/compiler/resolveInterfaceNameWithSameLetDeclarationName2.ts @@ -0,0 +1,4 @@ +interface foo { } +interface bar { } +let bar: bar | foo; +let foo: bar | foo; \ No newline at end of file diff --git a/tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName1.ts b/tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName1.ts new file mode 100644 index 0000000000..d76a3b0ba0 --- /dev/null +++ b/tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName1.ts @@ -0,0 +1,8 @@ +declare module foo { + + interface Bar { + + } +} + +let foo: foo.Bar; \ No newline at end of file diff --git a/tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName2.ts b/tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName2.ts new file mode 100644 index 0000000000..34bad893a7 --- /dev/null +++ b/tests/cases/compiler/resolveModuleNameWithSameLetDeclarationName2.ts @@ -0,0 +1,8 @@ +declare module "punycode" { + interface ucs2 { + decode(string: string): string; + encode(codePoints: number[]): string; + } + + export let ucs2: ucs2; +} \ No newline at end of file diff --git a/tests/cases/compiler/resolveTypeAliasWithSameLetDeclarationName1.ts b/tests/cases/compiler/resolveTypeAliasWithSameLetDeclarationName1.ts new file mode 100644 index 0000000000..2f3b42972d --- /dev/null +++ b/tests/cases/compiler/resolveTypeAliasWithSameLetDeclarationName1.ts @@ -0,0 +1,3 @@ +class C { } +type baz = C; +let baz: baz; From a07d911f6313002820e1048ab3e8dd1c41da6351 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 28 Jul 2015 15:25:27 -0700 Subject: [PATCH 3/4] Address code review --- src/compiler/checker.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9719c2de58..3fa77211e4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -574,15 +574,18 @@ namespace ts { return undefined; } - // Only check for block-scoped variable if we are looking for the name with variable meaning - // For example, - // declare module foo { - // interface bar {} - // } - // let foo/*1*/: foo/*2*/.bar; - // The foo at /*1*/ and /*2*/ will share same symbol with two meaning block-scope variable and namespace module. - // However, only when we try to resolve name in /*1*/ which is used in variable position, we want to check for block- scoped - if (meaning & SymbolFlags.Variable && result.flags & SymbolFlags.BlockScopedVariable) { + // Only check for block-scoped variable if we are looking for the + // name with variable meaning + // For example, + // declare module foo { + // interface bar {} + // } + // let foo/*1*/: foo/*2*/.bar; + // The foo at /*1*/ and /*2*/ will share same symbol with two meaning + // block - scope variable and namespace module. However, only when we + // try to resolve name in /*1*/ which is used in variable position, + // we want to check for block- scoped + if (meaning & SymbolFlags.BlockScopedVariable && result.flags & SymbolFlags.BlockScopedVariable) { checkResolvedBlockScopedVariable(result, errorLocation); } } From 9d1f051e8405d3f9115895abaff55f5185caaf82 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 28 Jul 2015 15:34:02 -0700 Subject: [PATCH 4/4] Update test baseline --- .../resolveInterfaceNameWithSameLetDeclarationName2.types | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.types b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.types index 1220152d21..6c52661ef4 100644 --- a/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.types +++ b/tests/baselines/reference/resolveInterfaceNameWithSameLetDeclarationName2.types @@ -6,12 +6,12 @@ interface bar { } >bar : bar let bar: bar | foo; ->bar : foo | bar +>bar : bar | foo >bar : bar >foo : foo let foo: bar | foo; ->foo : foo | bar +>foo : bar | foo >bar : bar >foo : foo