From 99c2b9029696339bb6f75eb1c70dc597507ece2b Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 06:35:41 -0700 Subject: [PATCH 01/31] Fix printing of empty enum types --- internal/checker/printer.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/checker/printer.go b/internal/checker/printer.go index c3f53552af..5d32930114 100644 --- a/internal/checker/printer.go +++ b/internal/checker/printer.go @@ -252,8 +252,10 @@ func (p *Printer) printStringMappingType(t *Type) { } func (p *Printer) printEnumLiteral(t *Type) { - p.printName(p.c.getParentOfSymbol(t.symbol)) - p.print(".") + if parent := p.c.getParentOfSymbol(t.symbol); parent != nil { + p.printName(p.c.getParentOfSymbol(t.symbol)) + p.print(".") + } p.printName(t.symbol) } From f50647c34c542b5cd844d3673d59b20a5e84e4f3 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 06:38:01 -0700 Subject: [PATCH 02/31] Properly format dotted names in diagnostic merging --- internal/checker/relater.go | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/internal/checker/relater.go b/internal/checker/relater.go index 3e1878edea..ea69bdb2fc 100644 --- a/internal/checker/relater.go +++ b/internal/checker/relater.go @@ -4755,12 +4755,7 @@ func (r *Relater) reportError(message *diagnostics.Message, args ...any) { diagnostics.The_types_returned_by_0_are_incompatible_between_these_types: head := getPropertyNameArg(args[0]) tail := getPropertyNameArg(r.errorChain.next.args[0]) - var arg string - if len(tail) != 0 && tail[0] == '[' { - arg = head + tail - } else { - arg = head + "." + tail - } + arg := addToDottedName(head, tail) r.errorChain = r.errorChain.next.next if message == diagnostics.Types_of_property_0_are_incompatible { message = diagnostics.The_types_of_0_are_incompatible_between_these_types @@ -4772,6 +4767,28 @@ func (r *Relater) reportError(message *diagnostics.Message, args ...any) { r.errorChain = &ErrorChain{next: r.errorChain, message: message, args: args} } +func addToDottedName(head string, tail string) string { + if strings.HasPrefix(head, "new ") { + head = "(" + head + ")" + } + pos := 0 + for { + if strings.HasPrefix(tail[pos:], "(") { + pos++ + } else if strings.HasPrefix(tail[pos:], "new ") { + pos += 4 + } else { + break + } + } + prefix := tail[:pos] + suffix := tail[pos:] + if strings.HasPrefix(suffix, "[") { + return prefix + head + suffix + } + return prefix + head + "." + suffix +} + func (r *Relater) getChainMessage(index int) *diagnostics.Message { e := r.errorChain for { From ab7f1a39aa3c21949dee05f2266dc7a7c7fb66ab Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 06:39:19 -0700 Subject: [PATCH 03/31] Accept new baselines --- ...eeplyNestedAssignabilityErrorsCombined.errors.txt | 4 ++-- ...NestedAssignabilityErrorsCombined.errors.txt.diff | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.errors.txt b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.errors.txt index 2d30cf3e82..351ff10653 100644 --- a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.errors.txt @@ -2,7 +2,7 @@ deeplyNestedAssignabilityErrorsCombined.ts(3,1): error TS2322: Type '{ a: { b: { The types of 'a.b.c.d.e.f().g' are incompatible between these types. Type 'number' is not assignable to type 'string'. deeplyNestedAssignabilityErrorsCombined.ts(15,1): error TS2322: Type '{ a: { b: { c: { d: { e: { f: typeof Ctor2; }; }; }; }; }; }' is not assignable to type '{ a: { b: { c: { d: { e: { f: typeof Ctor1; }; }; }; }; }; }'. - The types of 'a.b.c.d.e.new f().g' are incompatible between these types. + The types of '(new a.b.c.d.e.f()).g' are incompatible between these types. Type 'number' is not assignable to type 'string'. @@ -28,5 +28,5 @@ deeplyNestedAssignabilityErrorsCombined.ts(15,1): error TS2322: Type '{ a: { b: x2 = y2; ~~ !!! error TS2322: Type '{ a: { b: { c: { d: { e: { f: typeof Ctor2; }; }; }; }; }; }' is not assignable to type '{ a: { b: { c: { d: { e: { f: typeof Ctor1; }; }; }; }; }; }'. -!!! error TS2322: The types of 'a.b.c.d.e.new f().g' are incompatible between these types. +!!! error TS2322: The types of '(new a.b.c.d.e.f()).g' are incompatible between these types. !!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.errors.txt.diff index d1fe47e8d5..a59116adeb 100644 --- a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.errors.txt.diff @@ -6,11 +6,6 @@ The types of 'a.b.c.d.e.f().g' are incompatible between these types. Type 'number' is not assignable to type 'string'. deeplyNestedAssignabilityErrorsCombined.ts(15,1): error TS2322: Type '{ a: { b: { c: { d: { e: { f: typeof Ctor2; }; }; }; }; }; }' is not assignable to type '{ a: { b: { c: { d: { e: { f: typeof Ctor1; }; }; }; }; }; }'. -- The types of '(new a.b.c.d.e.f()).g' are incompatible between these types. -+ The types of 'a.b.c.d.e.new f().g' are incompatible between these types. - Type 'number' is not assignable to type 'string'. - - @@= skipped -10, +10 lines =@@ let y = { a: { b: { c: { d: { e: { f() { return { g: 12345 }; } } } } } } }; x = y; @@ -20,10 +15,3 @@ !!! error TS2322: The types of 'a.b.c.d.e.f().g' are incompatible between these types. !!! error TS2322: Type 'number' is not assignable to type 'string'. -@@= skipped -17, +17 lines =@@ - x2 = y2; - ~~ - !!! error TS2322: Type '{ a: { b: { c: { d: { e: { f: typeof Ctor2; }; }; }; }; }; }' is not assignable to type '{ a: { b: { c: { d: { e: { f: typeof Ctor1; }; }; }; }; }; }'. --!!! error TS2322: The types of '(new a.b.c.d.e.f()).g' are incompatible between these types. -+!!! error TS2322: The types of 'a.b.c.d.e.new f().g' are incompatible between these types. - !!! error TS2322: Type 'number' is not assignable to type 'string'. From bace2c3f68d6e9287eee88add27146e5f6b196c6 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 07:18:16 -0700 Subject: [PATCH 04/31] Don't elaborate on type parameter mismatch errors --- internal/checker/relater.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/checker/relater.go b/internal/checker/relater.go index ea69bdb2fc..9f92ab349b 100644 --- a/internal/checker/relater.go +++ b/internal/checker/relater.go @@ -4677,6 +4677,7 @@ func (r *Relater) reportRelationError(message *diagnostics.Message, source *Type case constraint != nil && r.c.isTypeAssignableTo(source, constraint): r.reportError(diagnostics.X_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2, sourceType, targetType, r.c.TypeToString(constraint)) default: + r.errorChain = nil // Only report this error once r.reportError(diagnostics.X_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1, targetType, generalizedSourceType) } } From 2257787ac795f68f03f86e02e2359578e4fef29c Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 07:18:30 -0700 Subject: [PATCH 05/31] Accept new baselines --- ...teAssignabilityToTypeParameters.errors.txt | 4 -- ...ignabilityToTypeParameters.errors.txt.diff | 19 ------ .../compiler/indexedAccessRelation.errors.txt | 8 --- .../indexedAccessRelation.errors.txt.diff | 24 ------- .../recursiveConditionalTypes.errors.txt | 12 ---- .../recursiveConditionalTypes.errors.txt.diff | 28 -------- .../compiler/typeParameterDiamond2.errors.txt | 4 -- .../typeParameterDiamond2.errors.txt.diff | 19 ------ .../compiler/typeParameterDiamond3.errors.txt | 4 -- .../typeParameterDiamond3.errors.txt.diff | 10 +-- .../compiler/typeParameterDiamond4.errors.txt | 4 -- .../typeParameterDiamond4.errors.txt.diff | 6 +- .../typeParametersShouldNotBeEqual.errors.txt | 2 - ...ParametersShouldNotBeEqual.errors.txt.diff | 18 ------ ...typeParametersShouldNotBeEqual2.errors.txt | 2 - ...arametersShouldNotBeEqual2.errors.txt.diff | 18 ------ ...ableSelfReferencingAwaitedUnion.errors.txt | 4 -- ...elfReferencingAwaitedUnion.errors.txt.diff | 19 ------ .../genericRestParameters1.errors.txt | 4 -- .../genericRestParameters1.errors.txt.diff | 8 +-- .../mappedTypeConstraints2.errors.txt | 4 -- .../mappedTypeConstraints2.errors.txt.diff | 20 ------ .../mappedTypeRelationships.errors.txt | 16 ----- .../mappedTypeRelationships.errors.txt.diff | 64 +------------------ ...tiveConstraintOfIndexAccessType.errors.txt | 2 - ...onstraintOfIndexAccessType.errors.txt.diff | 18 ------ ...ypeSatisfaction_errorLocations1.errors.txt | 6 -- ...tisfaction_errorLocations1.errors.txt.diff | 10 +-- .../unionTypesAssignability.errors.txt | 8 --- .../unionTypesAssignability.errors.txt.diff | 31 --------- 30 files changed, 8 insertions(+), 388 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/indexedAccessRelation.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/recursiveConditionalTypes.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterDiamond2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/unresolvableSelfReferencingAwaitedUnion.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypeConstraints2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/nonPrimitiveConstraintOfIndexAccessType.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/unionTypesAssignability.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.errors.txt b/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.errors.txt index 36088a5ea5..6974d3cd5b 100644 --- a/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.errors.txt @@ -1,7 +1,5 @@ doNotElaborateAssignabilityToTypeParameters.ts(3,3): error TS2322: Type 'Yadda | Awaited' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Yadda | Awaited'. - Type 'Yadda' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'Yadda'. ==== doNotElaborateAssignabilityToTypeParameters.ts (1 errors) ==== @@ -11,8 +9,6 @@ doNotElaborateAssignabilityToTypeParameters.ts(3,3): error TS2322: Type 'Yadda | ~~~~~~ !!! error TS2322: Type 'Yadda | Awaited' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Yadda | Awaited'. -!!! error TS2322: Type 'Yadda' is not assignable to type 'T'. -!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Yadda'. } interface Yadda { diff --git a/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.errors.txt.diff deleted file mode 100644 index 5eeacd29a3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.doNotElaborateAssignabilityToTypeParameters.errors.txt -+++ new.doNotElaborateAssignabilityToTypeParameters.errors.txt -@@= skipped -0, +0 lines =@@ - doNotElaborateAssignabilityToTypeParameters.ts(3,3): error TS2322: Type 'Yadda | Awaited' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'Yadda | Awaited'. -+ Type 'Yadda' is not assignable to type 'T'. -+ 'T' could be instantiated with an arbitrary type which could be unrelated to 'Yadda'. - - - ==== doNotElaborateAssignabilityToTypeParameters.ts (1 errors) ==== -@@= skipped -8, +10 lines =@@ - ~~~~~~ - !!! error TS2322: Type 'Yadda | Awaited' is not assignable to type 'T'. - !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Yadda | Awaited'. -+!!! error TS2322: Type 'Yadda' is not assignable to type 'T'. -+!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Yadda'. - } - - interface Yadda { diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.errors.txt b/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.errors.txt index 665f0e04dd..b0b76c56ec 100644 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.errors.txt @@ -4,10 +4,6 @@ indexedAccessRelation.ts(16,23): error TS2345: Argument of type '{ a: T; }' is n Type 'Foo' is not assignable to type 'S["a"] & T'. Type 'Foo' is not assignable to type 'S["a"]'. 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'Foo'. - Type 'T' is not assignable to type 'S["a"]'. - 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'T'. - Type 'Foo' is not assignable to type 'S["a"]'. - 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'Foo'. ==== indexedAccessRelation.ts (1 errors) ==== @@ -34,10 +30,6 @@ indexedAccessRelation.ts(16,23): error TS2345: Argument of type '{ a: T; }' is n !!! error TS2345: Type 'Foo' is not assignable to type 'S["a"] & T'. !!! error TS2345: Type 'Foo' is not assignable to type 'S["a"]'. !!! error TS2345: 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'Foo'. -!!! error TS2345: Type 'T' is not assignable to type 'S["a"]'. -!!! error TS2345: 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'T'. -!!! error TS2345: Type 'Foo' is not assignable to type 'S["a"]'. -!!! error TS2345: 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'Foo'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.errors.txt.diff deleted file mode 100644 index 5f0ce672f6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.indexedAccessRelation.errors.txt -+++ new.indexedAccessRelation.errors.txt -@@= skipped -3, +3 lines =@@ - Type 'Foo' is not assignable to type 'S["a"] & T'. - Type 'Foo' is not assignable to type 'S["a"]'. - 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'Foo'. -+ Type 'T' is not assignable to type 'S["a"]'. -+ 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'T'. -+ Type 'Foo' is not assignable to type 'S["a"]'. -+ 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'Foo'. - - - ==== indexedAccessRelation.ts (1 errors) ==== -@@= skipped -26, +30 lines =@@ - !!! error TS2345: Type 'Foo' is not assignable to type 'S["a"] & T'. - !!! error TS2345: Type 'Foo' is not assignable to type 'S["a"]'. - !!! error TS2345: 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'Foo'. -+!!! error TS2345: Type 'T' is not assignable to type 'S["a"]'. -+!!! error TS2345: 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'T'. -+!!! error TS2345: Type 'Foo' is not assignable to type 'S["a"]'. -+!!! error TS2345: 'S["a"]' could be instantiated with an arbitrary type which could be unrelated to 'Foo'. - } - } - diff --git a/testdata/baselines/reference/submodule/compiler/recursiveConditionalTypes.errors.txt b/testdata/baselines/reference/submodule/compiler/recursiveConditionalTypes.errors.txt index 5fb9b9626b..ed33be5060 100644 --- a/testdata/baselines/reference/submodule/compiler/recursiveConditionalTypes.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/recursiveConditionalTypes.errors.txt @@ -5,12 +5,6 @@ recursiveConditionalTypes.ts(20,5): error TS2322: Type '__Awaited' is not ass recursiveConditionalTypes.ts(21,5): error TS2322: Type 'T' is not assignable to type '__Awaited'. recursiveConditionalTypes.ts(22,5): error TS2322: Type '__Awaited' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to '__Awaited'. - Type '(T extends PromiseLike ? __Awaited : T) | T' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to '(T extends PromiseLike ? __Awaited : T) | T'. - Type 'T extends PromiseLike ? __Awaited : T' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'T extends PromiseLike ? __Awaited : T'. - Type 'unknown' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'. recursiveConditionalTypes.ts(35,11): error TS2589: Type instantiation is excessively deep and possibly infinite. recursiveConditionalTypes.ts(47,12): error TS2589: Type instantiation is excessively deep and possibly infinite. recursiveConditionalTypes.ts(50,5): error TS2322: Type 'TupleOf' is not assignable to type 'TupleOf'. @@ -67,12 +61,6 @@ recursiveConditionalTypes.ts(169,5): error TS2322: Type 'number' is not assignab ~~ !!! error TS2322: Type '__Awaited' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to '__Awaited'. -!!! error TS2322: Type '(T extends PromiseLike ? __Awaited : T) | T' is not assignable to type 'T'. -!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to '(T extends PromiseLike ? __Awaited : T) | T'. -!!! error TS2322: Type 'T extends PromiseLike ? __Awaited : T' is not assignable to type 'T'. -!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T extends PromiseLike ? __Awaited : T'. -!!! error TS2322: Type 'unknown' is not assignable to type 'T'. -!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'. } // Flattening arrays diff --git a/testdata/baselines/reference/submodule/compiler/recursiveConditionalTypes.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/recursiveConditionalTypes.errors.txt.diff deleted file mode 100644 index ef0bdc9de9..0000000000 --- a/testdata/baselines/reference/submodule/compiler/recursiveConditionalTypes.errors.txt.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.recursiveConditionalTypes.errors.txt -+++ new.recursiveConditionalTypes.errors.txt -@@= skipped -4, +4 lines =@@ - recursiveConditionalTypes.ts(21,5): error TS2322: Type 'T' is not assignable to type '__Awaited'. - recursiveConditionalTypes.ts(22,5): error TS2322: Type '__Awaited' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to '__Awaited'. -+ Type '(T extends PromiseLike ? __Awaited : T) | T' is not assignable to type 'T'. -+ 'T' could be instantiated with an arbitrary type which could be unrelated to '(T extends PromiseLike ? __Awaited : T) | T'. -+ Type 'T extends PromiseLike ? __Awaited : T' is not assignable to type 'T'. -+ 'T' could be instantiated with an arbitrary type which could be unrelated to 'T extends PromiseLike ? __Awaited : T'. -+ Type 'unknown' is not assignable to type 'T'. -+ 'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'. - recursiveConditionalTypes.ts(35,11): error TS2589: Type instantiation is excessively deep and possibly infinite. - recursiveConditionalTypes.ts(47,12): error TS2589: Type instantiation is excessively deep and possibly infinite. - recursiveConditionalTypes.ts(50,5): error TS2322: Type 'TupleOf' is not assignable to type 'TupleOf'. -@@= skipped -56, +62 lines =@@ - ~~ - !!! error TS2322: Type '__Awaited' is not assignable to type 'T'. - !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to '__Awaited'. -+!!! error TS2322: Type '(T extends PromiseLike ? __Awaited : T) | T' is not assignable to type 'T'. -+!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to '(T extends PromiseLike ? __Awaited : T) | T'. -+!!! error TS2322: Type 'T extends PromiseLike ? __Awaited : T' is not assignable to type 'T'. -+!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T extends PromiseLike ? __Awaited : T'. -+!!! error TS2322: Type 'unknown' is not assignable to type 'T'. -+!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'. - } - - // Flattening arrays diff --git a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond2.errors.txt b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond2.errors.txt index 4fe8e7ba7a..411486bf90 100644 --- a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond2.errors.txt @@ -1,7 +1,5 @@ typeParameterDiamond2.ts(8,13): error TS2322: Type 'T | U' is not assignable to type 'Top'. 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. - Type 'U' is not assignable to type 'Top'. - 'Top' could be instantiated with an arbitrary type which could be unrelated to 'U'. typeParameterDiamond2.ts(10,13): error TS2322: Type 'Bottom' is not assignable to type 'Top'. 'Top' could be instantiated with an arbitrary type which could be unrelated to 'Bottom'. @@ -18,8 +16,6 @@ typeParameterDiamond2.ts(10,13): error TS2322: Type 'Bottom' is not assignable t ~~~ !!! error TS2322: Type 'T | U' is not assignable to type 'Top'. !!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -!!! error TS2322: Type 'U' is not assignable to type 'Top'. -!!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'U'. !!! related TS2208 typeParameterDiamond2.ts:2:43: This type parameter might need an `extends Top` constraint. middle = bottom; top = bottom; diff --git a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond2.errors.txt.diff deleted file mode 100644 index 3f55c8810a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond2.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.typeParameterDiamond2.errors.txt -+++ new.typeParameterDiamond2.errors.txt -@@= skipped -0, +0 lines =@@ - typeParameterDiamond2.ts(8,13): error TS2322: Type 'T | U' is not assignable to type 'Top'. - 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -+ Type 'U' is not assignable to type 'Top'. -+ 'Top' could be instantiated with an arbitrary type which could be unrelated to 'U'. - typeParameterDiamond2.ts(10,13): error TS2322: Type 'Bottom' is not assignable to type 'Top'. - 'Top' could be instantiated with an arbitrary type which could be unrelated to 'Bottom'. - -@@= skipped -15, +17 lines =@@ - ~~~ - !!! error TS2322: Type 'T | U' is not assignable to type 'Top'. - !!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -+!!! error TS2322: Type 'U' is not assignable to type 'Top'. -+!!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'U'. - !!! related TS2208 typeParameterDiamond2.ts:2:43: This type parameter might need an `extends Top` constraint. - middle = bottom; - top = bottom; diff --git a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond3.errors.txt b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond3.errors.txt index 0a3ab26cef..ca801b4f7f 100644 --- a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond3.errors.txt @@ -1,7 +1,5 @@ typeParameterDiamond3.ts(8,13): error TS2322: Type 'T | U' is not assignable to type 'Top'. 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. - Type 'T' is not assignable to type 'Top'. - 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T'. typeParameterDiamond3.ts(9,13): error TS2322: Type 'Bottom' is not assignable to type 'T | U'. Type 'T | Top | U' is not assignable to type 'T | U'. Type 'Top' is not assignable to type 'T | U'. @@ -21,8 +19,6 @@ typeParameterDiamond3.ts(10,13): error TS2322: Type 'Bottom' is not assignable t ~~~ !!! error TS2322: Type 'T | U' is not assignable to type 'Top'. !!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -!!! error TS2322: Type 'T' is not assignable to type 'Top'. -!!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T'. !!! related TS2208 typeParameterDiamond3.ts:2:28: This type parameter might need an `extends Top` constraint. middle = bottom; ~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond3.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond3.errors.txt.diff index ba103a16be..c2f0418511 100644 --- a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond3.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond3.errors.txt.diff @@ -3,21 +3,13 @@ @@= skipped -0, +0 lines =@@ typeParameterDiamond3.ts(8,13): error TS2322: Type 'T | U' is not assignable to type 'Top'. 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -+ Type 'T' is not assignable to type 'Top'. -+ 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T'. typeParameterDiamond3.ts(9,13): error TS2322: Type 'Bottom' is not assignable to type 'T | U'. - Type 'Top | T | U' is not assignable to type 'T | U'. + Type 'T | Top | U' is not assignable to type 'T | U'. Type 'Top' is not assignable to type 'T | U'. typeParameterDiamond3.ts(10,13): error TS2322: Type 'Bottom' is not assignable to type 'Top'. 'Top' could be instantiated with an arbitrary type which could be unrelated to 'Bottom'. -@@= skipped -18, +20 lines =@@ - ~~~ - !!! error TS2322: Type 'T | U' is not assignable to type 'Top'. - !!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -+!!! error TS2322: Type 'T' is not assignable to type 'Top'. -+!!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T'. - !!! related TS2208 typeParameterDiamond3.ts:2:28: This type parameter might need an `extends Top` constraint. +@@= skipped -22, +22 lines =@@ middle = bottom; ~~~~~~ !!! error TS2322: Type 'Bottom' is not assignable to type 'T | U'. diff --git a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond4.errors.txt b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond4.errors.txt index ef00573c85..ddb0fe0efb 100644 --- a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond4.errors.txt @@ -1,7 +1,5 @@ typeParameterDiamond4.ts(8,13): error TS2322: Type 'T | Top | U' is not assignable to type 'Top'. 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | Top | U'. - Type 'T' is not assignable to type 'Top'. - 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T'. typeParameterDiamond4.ts(10,13): error TS2322: Type 'Bottom' is not assignable to type 'Top'. 'Top' could be instantiated with an arbitrary type which could be unrelated to 'Bottom'. @@ -18,8 +16,6 @@ typeParameterDiamond4.ts(10,13): error TS2322: Type 'Bottom' is not assignable t ~~~ !!! error TS2322: Type 'T | Top | U' is not assignable to type 'Top'. !!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | Top | U'. -!!! error TS2322: Type 'T' is not assignable to type 'Top'. -!!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T'. !!! related TS2208 typeParameterDiamond4.ts:2:28: This type parameter might need an `extends Top` constraint. middle = bottom; top = bottom; diff --git a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond4.errors.txt.diff index 9df279a978..c6eb19058f 100644 --- a/testdata/baselines/reference/submodule/compiler/typeParameterDiamond4.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/typeParameterDiamond4.errors.txt.diff @@ -5,12 +5,10 @@ - 'Top' could be instantiated with an arbitrary type which could be unrelated to 'Top | T | U'. +typeParameterDiamond4.ts(8,13): error TS2322: Type 'T | Top | U' is not assignable to type 'Top'. + 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | Top | U'. -+ Type 'T' is not assignable to type 'Top'. -+ 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T'. typeParameterDiamond4.ts(10,13): error TS2322: Type 'Bottom' is not assignable to type 'Top'. 'Top' could be instantiated with an arbitrary type which could be unrelated to 'Bottom'. -@@= skipped -13, +15 lines =@@ +@@= skipped -13, +13 lines =@@ top = middle; ~~~ @@ -18,8 +16,6 @@ -!!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'Top | T | U'. +!!! error TS2322: Type 'T | Top | U' is not assignable to type 'Top'. +!!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T | Top | U'. -+!!! error TS2322: Type 'T' is not assignable to type 'Top'. -+!!! error TS2322: 'Top' could be instantiated with an arbitrary type which could be unrelated to 'T'. !!! related TS2208 typeParameterDiamond4.ts:2:28: This type parameter might need an `extends Top` constraint. middle = bottom; top = bottom; diff --git a/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual.errors.txt b/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual.errors.txt index a95bce8681..3241095401 100644 --- a/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual.errors.txt @@ -2,7 +2,6 @@ typeParametersShouldNotBeEqual.ts(4,5): error TS2322: Type 'U' is not assignable 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. typeParametersShouldNotBeEqual.ts(5,5): error TS2322: Type 'Object' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Object'. - The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? ==== typeParametersShouldNotBeEqual.ts (2 errors) ==== @@ -18,7 +17,6 @@ typeParametersShouldNotBeEqual.ts(5,5): error TS2322: Type 'Object' is not assig ~ !!! error TS2322: Type 'Object' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Object'. -!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? z = x; // Ok } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual.errors.txt.diff deleted file mode 100644 index 0fdfe3d8c6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.typeParametersShouldNotBeEqual.errors.txt -+++ new.typeParametersShouldNotBeEqual.errors.txt -@@= skipped -1, +1 lines =@@ - 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. - typeParametersShouldNotBeEqual.ts(5,5): error TS2322: Type 'Object' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'Object'. -+ The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - - - ==== typeParametersShouldNotBeEqual.ts (2 errors) ==== -@@= skipped -15, +16 lines =@@ - ~ - !!! error TS2322: Type 'Object' is not assignable to type 'T'. - !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Object'. -+!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - z = x; // Ok - } - diff --git a/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual2.errors.txt b/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual2.errors.txt index 90887644fb..6f45110e98 100644 --- a/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual2.errors.txt @@ -10,7 +10,6 @@ typeParametersShouldNotBeEqual2.ts(8,5): error TS2322: Type 'U' is not assignabl 'V' could be instantiated with an arbitrary type which could be unrelated to 'U'. typeParametersShouldNotBeEqual2.ts(9,5): error TS2322: Type 'Object' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Object'. - The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? ==== typeParametersShouldNotBeEqual2.ts (6 errors) ==== @@ -43,7 +42,6 @@ typeParametersShouldNotBeEqual2.ts(9,5): error TS2322: Type 'Object' is not assi ~ !!! error TS2322: Type 'Object' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Object'. -!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? zz = x; // Ok } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual2.errors.txt.diff deleted file mode 100644 index 0a76d6da0b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual2.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.typeParametersShouldNotBeEqual2.errors.txt -+++ new.typeParametersShouldNotBeEqual2.errors.txt -@@= skipped -9, +9 lines =@@ - 'V' could be instantiated with an arbitrary type which could be unrelated to 'U'. - typeParametersShouldNotBeEqual2.ts(9,5): error TS2322: Type 'Object' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'Object'. -+ The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - - - ==== typeParametersShouldNotBeEqual2.ts (6 errors) ==== -@@= skipped -32, +33 lines =@@ - ~ - !!! error TS2322: Type 'Object' is not assignable to type 'T'. - !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Object'. -+!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - zz = x; // Ok - } - diff --git a/testdata/baselines/reference/submodule/compiler/unresolvableSelfReferencingAwaitedUnion.errors.txt b/testdata/baselines/reference/submodule/compiler/unresolvableSelfReferencingAwaitedUnion.errors.txt index 8194bc2a8a..243ed7dadd 100644 --- a/testdata/baselines/reference/submodule/compiler/unresolvableSelfReferencingAwaitedUnion.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/unresolvableSelfReferencingAwaitedUnion.errors.txt @@ -1,7 +1,5 @@ unresolvableSelfReferencingAwaitedUnion.ts(9,32): error TS2322: Type 'SimpleType' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'SimpleType'. - Type 'string' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. unresolvableSelfReferencingAwaitedUnion.ts(16,19): error TS1062: Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method. unresolvableSelfReferencingAwaitedUnion.ts(29,30): error TS1062: Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method. @@ -19,8 +17,6 @@ unresolvableSelfReferencingAwaitedUnion.ts(29,30): error TS1062: Type is referen ~~~~~~ !!! error TS2322: Type 'SimpleType' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'SimpleType'. -!!! error TS2322: Type 'string' is not assignable to type 'T'. -!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. !!! related TS6502 unresolvableSelfReferencingAwaitedUnion.ts:3:20: The expected type comes from the return type of this signature. // repro #49723 diff --git a/testdata/baselines/reference/submodule/compiler/unresolvableSelfReferencingAwaitedUnion.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/unresolvableSelfReferencingAwaitedUnion.errors.txt.diff deleted file mode 100644 index 28a200b598..0000000000 --- a/testdata/baselines/reference/submodule/compiler/unresolvableSelfReferencingAwaitedUnion.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.unresolvableSelfReferencingAwaitedUnion.errors.txt -+++ new.unresolvableSelfReferencingAwaitedUnion.errors.txt -@@= skipped -0, +0 lines =@@ - unresolvableSelfReferencingAwaitedUnion.ts(9,32): error TS2322: Type 'SimpleType' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'SimpleType'. -+ Type 'string' is not assignable to type 'T'. -+ 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. - unresolvableSelfReferencingAwaitedUnion.ts(16,19): error TS1062: Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method. - unresolvableSelfReferencingAwaitedUnion.ts(29,30): error TS1062: Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method. - -@@= skipped -16, +18 lines =@@ - ~~~~~~ - !!! error TS2322: Type 'SimpleType' is not assignable to type 'T'. - !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'SimpleType'. -+!!! error TS2322: Type 'string' is not assignable to type 'T'. -+!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. - !!! related TS6502 unresolvableSelfReferencingAwaitedUnion.ts:3:20: The expected type comes from the return type of this signature. - - // repro #49723 diff --git a/testdata/baselines/reference/submodule/conformance/genericRestParameters1.errors.txt b/testdata/baselines/reference/submodule/conformance/genericRestParameters1.errors.txt index 97b142a5e5..0ec0872ab2 100644 --- a/testdata/baselines/reference/submodule/conformance/genericRestParameters1.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/genericRestParameters1.errors.txt @@ -1,11 +1,9 @@ genericRestParameters1.ts(49,18): error TS2345: Argument of type 'string' is not assignable to parameter of type 'U[number] & V[number]'. Type 'string' is not assignable to type 'V[number]'. 'V[number]' could be instantiated with an arbitrary type which could be unrelated to 'string'. - Type 'string' is not assignable to type 'number'. genericRestParameters1.ts(68,18): error TS2345: Argument of type 'string' is not assignable to parameter of type 'U[number] & V[number]'. Type 'string' is not assignable to type 'V[number]'. 'V[number]' could be instantiated with an arbitrary type which could be unrelated to 'string'. - Type 'string' is not assignable to type 'number'. genericRestParameters1.ts(135,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. Type 'Function' provides no match for the signature '(...args: any): any'. genericRestParameters1.ts(164,1): error TS2322: Type '(a: never) => void' is not assignable to type '(...args: any[]) => void'. @@ -67,7 +65,6 @@ genericRestParameters1.ts(164,1): error TS2322: Type '(a: never) => void' is not !!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'U[number] & V[number]'. !!! error TS2345: Type 'string' is not assignable to type 'V[number]'. !!! error TS2345: 'V[number]' could be instantiated with an arbitrary type which could be unrelated to 'string'. -!!! error TS2345: Type 'string' is not assignable to type 'number'. } declare function f11(...args: T): T; @@ -91,7 +88,6 @@ genericRestParameters1.ts(164,1): error TS2322: Type '(a: never) => void' is not !!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'U[number] & V[number]'. !!! error TS2345: Type 'string' is not assignable to type 'V[number]'. !!! error TS2345: 'V[number]' could be instantiated with an arbitrary type which could be unrelated to 'string'. -!!! error TS2345: Type 'string' is not assignable to type 'number'. } function call(f: (...args: T) => U, ...args: T) { diff --git a/testdata/baselines/reference/submodule/conformance/genericRestParameters1.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/genericRestParameters1.errors.txt.diff index eaefc0d76d..44c618a892 100644 --- a/testdata/baselines/reference/submodule/conformance/genericRestParameters1.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/genericRestParameters1.errors.txt.diff @@ -4,15 +4,13 @@ +genericRestParameters1.ts(49,18): error TS2345: Argument of type 'string' is not assignable to parameter of type 'U[number] & V[number]'. + Type 'string' is not assignable to type 'V[number]'. + 'V[number]' could be instantiated with an arbitrary type which could be unrelated to 'string'. -+ Type 'string' is not assignable to type 'number'. +genericRestParameters1.ts(68,18): error TS2345: Argument of type 'string' is not assignable to parameter of type 'U[number] & V[number]'. + Type 'string' is not assignable to type 'V[number]'. + 'V[number]' could be instantiated with an arbitrary type which could be unrelated to 'string'. -+ Type 'string' is not assignable to type 'number'. genericRestParameters1.ts(135,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. Type 'Function' provides no match for the signature '(...args: any): any'. genericRestParameters1.ts(164,1): error TS2322: Type '(a: never) => void' is not assignable to type '(...args: any[]) => void'. -@@= skipped -4, +12 lines =@@ +@@= skipped -4, +10 lines =@@ Type 'any' is not assignable to type 'never'. @@ -29,11 +27,10 @@ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'U[number] & V[number]'. +!!! error TS2345: Type 'string' is not assignable to type 'V[number]'. +!!! error TS2345: 'V[number]' could be instantiated with an arbitrary type which could be unrelated to 'string'. -+!!! error TS2345: Type 'string' is not assignable to type 'number'. } declare function f11(...args: T): T; -@@= skipped -19, +24 lines =@@ +@@= skipped -19, +23 lines =@@ let x2 = f11(...v); // V let x3 = f11(1, ...u); // [1, ...string[]] let x4 = f11(...u, ...v); // (string | number)[] @@ -41,7 +38,6 @@ +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'U[number] & V[number]'. +!!! error TS2345: Type 'string' is not assignable to type 'V[number]'. +!!! error TS2345: 'V[number]' could be instantiated with an arbitrary type which could be unrelated to 'string'. -+!!! error TS2345: Type 'string' is not assignable to type 'number'. } function call(f: (...args: T) => U, ...args: T) { diff --git a/testdata/baselines/reference/submodule/conformance/mappedTypeConstraints2.errors.txt b/testdata/baselines/reference/submodule/conformance/mappedTypeConstraints2.errors.txt index 8c598cece0..0d3b3244c9 100644 --- a/testdata/baselines/reference/submodule/conformance/mappedTypeConstraints2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/mappedTypeConstraints2.errors.txt @@ -8,8 +8,6 @@ mappedTypeConstraints2.ts(42,7): error TS2322: Type 'Mapped6[keyof Mapped6 Type 'Mapped6[string]' is not assignable to type '`_${string}`'. mappedTypeConstraints2.ts(51,57): error TS2322: Type 'Foo[`get${T}`]' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo[`get${T}`]'. - Type 'Foo[`get${string}`]' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo[`get${string}`]'. mappedTypeConstraints2.ts(82,9): error TS2322: Type 'ObjectWithUnderscoredKeys[`_${K}`]' is not assignable to type 'true'. Type 'ObjectWithUnderscoredKeys[`_${string}`]' is not assignable to type 'true'. @@ -80,8 +78,6 @@ mappedTypeConstraints2.ts(82,9): error TS2322: Type 'ObjectWithUnderscoredKeys[`get${T}`]' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo[`get${T}`]'. -!!! error TS2322: Type 'Foo[`get${string}`]' is not assignable to type 'T'. -!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo[`get${string}`]'. // Repro from #48626 diff --git a/testdata/baselines/reference/submodule/conformance/mappedTypeConstraints2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/mappedTypeConstraints2.errors.txt.diff deleted file mode 100644 index 15f8b6b643..0000000000 --- a/testdata/baselines/reference/submodule/conformance/mappedTypeConstraints2.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.mappedTypeConstraints2.errors.txt -+++ new.mappedTypeConstraints2.errors.txt -@@= skipped -7, +7 lines =@@ - Type 'Mapped6[string]' is not assignable to type '`_${string}`'. - mappedTypeConstraints2.ts(51,57): error TS2322: Type 'Foo[`get${T}`]' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo[`get${T}`]'. -+ Type 'Foo[`get${string}`]' is not assignable to type 'T'. -+ 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo[`get${string}`]'. - mappedTypeConstraints2.ts(82,9): error TS2322: Type 'ObjectWithUnderscoredKeys[`_${K}`]' is not assignable to type 'true'. - Type 'ObjectWithUnderscoredKeys[`_${string}`]' is not assignable to type 'true'. - -@@= skipped -70, +72 lines =@@ - ~~~~~~~~~~~~~~ - !!! error TS2322: Type 'Foo[`get${T}`]' is not assignable to type 'T'. - !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo[`get${T}`]'. -+!!! error TS2322: Type 'Foo[`get${string}`]' is not assignable to type 'T'. -+!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'Foo[`get${string}`]'. - - // Repro from #48626 - diff --git a/testdata/baselines/reference/submodule/conformance/mappedTypeRelationships.errors.txt b/testdata/baselines/reference/submodule/conformance/mappedTypeRelationships.errors.txt index 5256739c5c..19d7ddeb36 100644 --- a/testdata/baselines/reference/submodule/conformance/mappedTypeRelationships.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/mappedTypeRelationships.errors.txt @@ -10,23 +10,15 @@ mappedTypeRelationships.ts(25,5): error TS2536: Type 'K' cannot be used to index mappedTypeRelationships.ts(26,12): error TS2536: Type 'K' cannot be used to index type 'T'. mappedTypeRelationships.ts(30,5): error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'. 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'T[keyof T] | undefined'. - Type 'undefined' is not assignable to type 'T[keyof T]'. - 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. mappedTypeRelationships.ts(35,5): error TS2322: Type 'T[K] | undefined' is not assignable to type 'T[K]'. 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'T[K] | undefined'. - Type 'undefined' is not assignable to type 'T[K]'. - 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. mappedTypeRelationships.ts(40,5): error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'. 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'U[keyof T] | undefined'. - Type 'undefined' is not assignable to type 'T[keyof T]'. - 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. mappedTypeRelationships.ts(41,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'. Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'U[keyof T] | undefined'. Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'. mappedTypeRelationships.ts(45,5): error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'. 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'U[K] | undefined'. - Type 'undefined' is not assignable to type 'T[K]'. - 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. mappedTypeRelationships.ts(46,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'. Type 'T[keyof T]' is not assignable to type 'U[K] | undefined'. Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'U[K] | undefined'. @@ -133,8 +125,6 @@ mappedTypeRelationships.ts(168,5): error TS2322: Type '{ [P in K]: T[P] }' is no ~~~~ !!! error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'. !!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'T[keyof T] | undefined'. -!!! error TS2322: Type 'undefined' is not assignable to type 'T[keyof T]'. -!!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. y[k] = x[k]; } @@ -143,8 +133,6 @@ mappedTypeRelationships.ts(168,5): error TS2322: Type '{ [P in K]: T[P] }' is no ~~~~ !!! error TS2322: Type 'T[K] | undefined' is not assignable to type 'T[K]'. !!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'T[K] | undefined'. -!!! error TS2322: Type 'undefined' is not assignable to type 'T[K]'. -!!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. y[k] = x[k]; } @@ -153,8 +141,6 @@ mappedTypeRelationships.ts(168,5): error TS2322: Type '{ [P in K]: T[P] }' is no ~~~~ !!! error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'. !!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'U[keyof T] | undefined'. -!!! error TS2322: Type 'undefined' is not assignable to type 'T[keyof T]'. -!!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. y[k] = x[k]; // Error ~~~~ !!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'. @@ -167,8 +153,6 @@ mappedTypeRelationships.ts(168,5): error TS2322: Type '{ [P in K]: T[P] }' is no ~~~~ !!! error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'. !!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'U[K] | undefined'. -!!! error TS2322: Type 'undefined' is not assignable to type 'T[K]'. -!!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. y[k] = x[k]; // Error ~~~~ !!! error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'. diff --git a/testdata/baselines/reference/submodule/conformance/mappedTypeRelationships.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/mappedTypeRelationships.errors.txt.diff index 6c6542754b..1a354b7bb0 100644 --- a/testdata/baselines/reference/submodule/conformance/mappedTypeRelationships.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/mappedTypeRelationships.errors.txt.diff @@ -1,30 +1,6 @@ --- old.mappedTypeRelationships.errors.txt +++ new.mappedTypeRelationships.errors.txt -@@= skipped -9, +9 lines =@@ - mappedTypeRelationships.ts(26,12): error TS2536: Type 'K' cannot be used to index type 'T'. - mappedTypeRelationships.ts(30,5): error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'. - 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'T[keyof T] | undefined'. -+ Type 'undefined' is not assignable to type 'T[keyof T]'. -+ 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. - mappedTypeRelationships.ts(35,5): error TS2322: Type 'T[K] | undefined' is not assignable to type 'T[K]'. - 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'T[K] | undefined'. -+ Type 'undefined' is not assignable to type 'T[K]'. -+ 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. - mappedTypeRelationships.ts(40,5): error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'. - 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'U[keyof T] | undefined'. -+ Type 'undefined' is not assignable to type 'T[keyof T]'. -+ 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. - mappedTypeRelationships.ts(41,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'. - Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'U[keyof T] | undefined'. - Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'. - mappedTypeRelationships.ts(45,5): error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'. - 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'U[K] | undefined'. -+ Type 'undefined' is not assignable to type 'T[K]'. -+ 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. - mappedTypeRelationships.ts(46,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'. - Type 'T[keyof T]' is not assignable to type 'U[K] | undefined'. - Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'U[K] | undefined'. -@@= skipped -28, +36 lines =@@ +@@= skipped -37, +37 lines =@@ mappedTypeRelationships.ts(78,5): error TS2322: Type 'Partial' is not assignable to type 'Partial'. mappedTypeRelationships.ts(88,5): error TS2322: Type 'Readonly' is not assignable to type 'Readonly'. mappedTypeRelationships.ts(127,5): error TS2322: Type 'Partial' is not assignable to type 'Identity'. @@ -67,43 +43,7 @@ Type 'T[P]' is not assignable to type 'U[P]'. Type 'T' is not assignable to type 'U'. 'U' could be instantiated with an arbitrary type which could be unrelated to 'T'. -@@= skipped -87, +87 lines =@@ - ~~~~ - !!! error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'. - !!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'T[keyof T] | undefined'. -+!!! error TS2322: Type 'undefined' is not assignable to type 'T[keyof T]'. -+!!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. - y[k] = x[k]; - } - -@@= skipped -8, +10 lines =@@ - ~~~~ - !!! error TS2322: Type 'T[K] | undefined' is not assignable to type 'T[K]'. - !!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'T[K] | undefined'. -+!!! error TS2322: Type 'undefined' is not assignable to type 'T[K]'. -+!!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. - y[k] = x[k]; - } - -@@= skipped -8, +10 lines =@@ - ~~~~ - !!! error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'. - !!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'U[keyof T] | undefined'. -+!!! error TS2322: Type 'undefined' is not assignable to type 'T[keyof T]'. -+!!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. - y[k] = x[k]; // Error - ~~~~ - !!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'. -@@= skipped -12, +14 lines =@@ - ~~~~ - !!! error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'. - !!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'U[K] | undefined'. -+!!! error TS2322: Type 'undefined' is not assignable to type 'T[K]'. -+!!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'. - y[k] = x[k]; // Error - ~~~~ - !!! error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'. -@@= skipped -131, +133 lines =@@ +@@= skipped -246, +246 lines =@@ x = y; y = x; // Error ~ diff --git a/testdata/baselines/reference/submodule/conformance/nonPrimitiveConstraintOfIndexAccessType.errors.txt b/testdata/baselines/reference/submodule/conformance/nonPrimitiveConstraintOfIndexAccessType.errors.txt index ce7cec19b6..c8b98bc4f1 100644 --- a/testdata/baselines/reference/submodule/conformance/nonPrimitiveConstraintOfIndexAccessType.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/nonPrimitiveConstraintOfIndexAccessType.errors.txt @@ -8,7 +8,6 @@ nonPrimitiveConstraintOfIndexAccessType.ts(12,5): error TS2322: Type 'string' is 'T[P]' could be instantiated with an arbitrary type which could be unrelated to 'string'. nonPrimitiveConstraintOfIndexAccessType.ts(15,5): error TS2322: Type 'string' is not assignable to type 'T[P]'. 'T[P]' could be instantiated with an arbitrary type which could be unrelated to 'string'. - Type 'string' is not assignable to type 'never'. nonPrimitiveConstraintOfIndexAccessType.ts(18,5): error TS2322: Type 'string' is not assignable to type 'T[P]'. 'T[P]' could be instantiated with an arbitrary type which could be unrelated to 'string'. nonPrimitiveConstraintOfIndexAccessType.ts(21,5): error TS2322: Type 'string' is not assignable to type 'T[P]'. @@ -52,7 +51,6 @@ nonPrimitiveConstraintOfIndexAccessType.ts(30,5): error TS2322: Type 'string' is ~~ !!! error TS2322: Type 'string' is not assignable to type 'T[P]'. !!! error TS2322: 'T[P]' could be instantiated with an arbitrary type which could be unrelated to 'string'. -!!! error TS2322: Type 'string' is not assignable to type 'never'. } function k(s: string, tp: T[P]): void { tp = s; diff --git a/testdata/baselines/reference/submodule/conformance/nonPrimitiveConstraintOfIndexAccessType.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/nonPrimitiveConstraintOfIndexAccessType.errors.txt.diff deleted file mode 100644 index ec4e2bbc59..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nonPrimitiveConstraintOfIndexAccessType.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.nonPrimitiveConstraintOfIndexAccessType.errors.txt -+++ new.nonPrimitiveConstraintOfIndexAccessType.errors.txt -@@= skipped -7, +7 lines =@@ - 'T[P]' could be instantiated with an arbitrary type which could be unrelated to 'string'. - nonPrimitiveConstraintOfIndexAccessType.ts(15,5): error TS2322: Type 'string' is not assignable to type 'T[P]'. - 'T[P]' could be instantiated with an arbitrary type which could be unrelated to 'string'. -+ Type 'string' is not assignable to type 'never'. - nonPrimitiveConstraintOfIndexAccessType.ts(18,5): error TS2322: Type 'string' is not assignable to type 'T[P]'. - 'T[P]' could be instantiated with an arbitrary type which could be unrelated to 'string'. - nonPrimitiveConstraintOfIndexAccessType.ts(21,5): error TS2322: Type 'string' is not assignable to type 'T[P]'. -@@= skipped -43, +44 lines =@@ - ~~ - !!! error TS2322: Type 'string' is not assignable to type 'T[P]'. - !!! error TS2322: 'T[P]' could be instantiated with an arbitrary type which could be unrelated to 'string'. -+!!! error TS2322: Type 'string' is not assignable to type 'never'. - } - function k(s: string, tp: T[P]): void { - tp = s; diff --git a/testdata/baselines/reference/submodule/conformance/typeSatisfaction_errorLocations1.errors.txt b/testdata/baselines/reference/submodule/conformance/typeSatisfaction_errorLocations1.errors.txt index 0af0e2c6df..e6d69aebb1 100644 --- a/testdata/baselines/reference/submodule/conformance/typeSatisfaction_errorLocations1.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeSatisfaction_errorLocations1.errors.txt @@ -10,9 +10,6 @@ typeSatisfaction_errorLocations1.ts(13,10): error TS2345: Argument of type '{ a: Type 'number' is not assignable to type 'true'. typeSatisfaction_errorLocations1.ts(16,5): error TS2345: Argument of type '{ a: boolean; }' is not assignable to parameter of type 'T[0]'. 'T[0]' could be instantiated with an arbitrary type which could be unrelated to '{ a: boolean; }'. - Type '{ a: boolean; }' is not assignable to type '{ a: true; }'. - Types of property 'a' are incompatible. - Type 'boolean' is not assignable to type 'true'. typeSatisfaction_errorLocations1.ts(18,5): error TS2345: Argument of type '[{ a: true; }]' is not assignable to parameter of type 'T'. '[{ a: true; }]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ a: true; }[]'. typeSatisfaction_errorLocations1.ts(21,43): error TS2322: Type 'number' is not assignable to type 'boolean'. @@ -73,9 +70,6 @@ typeSatisfaction_errorLocations1.ts(48,21): error TS2322: Type '{ a: number; }' ~~~~~~~~~~~ !!! error TS2345: Argument of type '{ a: boolean; }' is not assignable to parameter of type 'T[0]'. !!! error TS2345: 'T[0]' could be instantiated with an arbitrary type which could be unrelated to '{ a: boolean; }'. -!!! error TS2345: Type '{ a: boolean; }' is not assignable to type '{ a: true; }'. -!!! error TS2345: Types of property 'a' are incompatible. -!!! error TS2345: Type 'boolean' is not assignable to type 'true'. const o = { a: true as const }; f(o satisfies unknown); ~ diff --git a/testdata/baselines/reference/submodule/conformance/typeSatisfaction_errorLocations1.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typeSatisfaction_errorLocations1.errors.txt.diff index e61e50d050..6595921fe4 100644 --- a/testdata/baselines/reference/submodule/conformance/typeSatisfaction_errorLocations1.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/typeSatisfaction_errorLocations1.errors.txt.diff @@ -19,13 +19,10 @@ - 'T' could be instantiated with an arbitrary type which could be unrelated to '[{ a: boolean; }]'. +typeSatisfaction_errorLocations1.ts(16,5): error TS2345: Argument of type '{ a: boolean; }' is not assignable to parameter of type 'T[0]'. + 'T[0]' could be instantiated with an arbitrary type which could be unrelated to '{ a: boolean; }'. -+ Type '{ a: boolean; }' is not assignable to type '{ a: true; }'. -+ Types of property 'a' are incompatible. -+ Type 'boolean' is not assignable to type 'true'. typeSatisfaction_errorLocations1.ts(18,5): error TS2345: Argument of type '[{ a: true; }]' is not assignable to parameter of type 'T'. '[{ a: true; }]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{ a: true; }[]'. typeSatisfaction_errorLocations1.ts(21,43): error TS2322: Type 'number' is not assignable to type 'boolean'. -@@= skipped -18, +19 lines =@@ +@@= skipped -18, +16 lines =@@ typeSatisfaction_errorLocations1.ts(25,20): error TS1360: Type 'number' does not satisfy the expected type 'boolean'. typeSatisfaction_errorLocations1.ts(26,7): error TS2322: Type '1' is not assignable to type 'true'. typeSatisfaction_errorLocations1.ts(29,18): error TS2322: Type 'string' is not assignable to type 'number'. @@ -63,13 +60,10 @@ -!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '[{ a: boolean; }]'. +!!! error TS2345: Argument of type '{ a: boolean; }' is not assignable to parameter of type 'T[0]'. +!!! error TS2345: 'T[0]' could be instantiated with an arbitrary type which could be unrelated to '{ a: boolean; }'. -+!!! error TS2345: Type '{ a: boolean; }' is not assignable to type '{ a: true; }'. -+!!! error TS2345: Types of property 'a' are incompatible. -+!!! error TS2345: Type 'boolean' is not assignable to type 'true'. const o = { a: true as const }; f(o satisfies unknown); ~ -@@= skipped -31, +34 lines =@@ +@@= skipped -31, +31 lines =@@ const tuple2 = [10, "20"] as const; fn3(10, ...(tuple2 satisfies number[])); ~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/unionTypesAssignability.errors.txt b/testdata/baselines/reference/submodule/conformance/unionTypesAssignability.errors.txt index 1085994699..8ce86faf58 100644 --- a/testdata/baselines/reference/submodule/conformance/unionTypesAssignability.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/unionTypesAssignability.errors.txt @@ -23,12 +23,8 @@ unionTypesAssignability.ts(65,5): error TS2322: Type 'T' is not assignable to ty 'U' could be instantiated with an arbitrary type which could be unrelated to 'T'. unionTypesAssignability.ts(70,5): error TS2322: Type 'T | U' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. - Type 'U' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. unionTypesAssignability.ts(71,5): error TS2322: Type 'T | U' is not assignable to type 'U'. 'U' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. - Type 'T' is not assignable to type 'U'. - 'U' could be instantiated with an arbitrary type which could be unrelated to 'T'. ==== unionTypesAssignability.ts (19 errors) ==== @@ -155,15 +151,11 @@ unionTypesAssignability.ts(71,5): error TS2322: Type 'T | U' is not assignable t ~ !!! error TS2322: Type 'T | U' is not assignable to type 'T'. !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -!!! error TS2322: Type 'U' is not assignable to type 'T'. -!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. !!! related TS2208 unionTypesAssignability.ts:63:17: This type parameter might need an `extends T` constraint. u = x; // error T not assignable to U ~ !!! error TS2322: Type 'T | U' is not assignable to type 'U'. !!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. -!!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'T'. !!! related TS2208 unionTypesAssignability.ts:63:14: This type parameter might need an `extends U` constraint. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/unionTypesAssignability.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/unionTypesAssignability.errors.txt.diff deleted file mode 100644 index 609331ea76..0000000000 --- a/testdata/baselines/reference/submodule/conformance/unionTypesAssignability.errors.txt.diff +++ /dev/null @@ -1,31 +0,0 @@ ---- old.unionTypesAssignability.errors.txt -+++ new.unionTypesAssignability.errors.txt -@@= skipped -22, +22 lines =@@ - 'U' could be instantiated with an arbitrary type which could be unrelated to 'T'. - unionTypesAssignability.ts(70,5): error TS2322: Type 'T | U' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -+ Type 'U' is not assignable to type 'T'. -+ 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. - unionTypesAssignability.ts(71,5): error TS2322: Type 'T | U' is not assignable to type 'U'. - 'U' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -+ Type 'T' is not assignable to type 'U'. -+ 'U' could be instantiated with an arbitrary type which could be unrelated to 'T'. - - - ==== unionTypesAssignability.ts (19 errors) ==== -@@= skipped -128, +132 lines =@@ - ~ - !!! error TS2322: Type 'T | U' is not assignable to type 'T'. - !!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -+!!! error TS2322: Type 'U' is not assignable to type 'T'. -+!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'U'. - !!! related TS2208 unionTypesAssignability.ts:63:17: This type parameter might need an `extends T` constraint. - u = x; // error T not assignable to U - ~ - !!! error TS2322: Type 'T | U' is not assignable to type 'U'. - !!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'T | U'. -+!!! error TS2322: Type 'T' is not assignable to type 'U'. -+!!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'T'. - !!! related TS2208 unionTypesAssignability.ts:63:14: This type parameter might need an `extends U` constraint. - } - From 37ed8d53ea44a9d25f9a760c33b4876b46068cd7 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 10:50:43 -0700 Subject: [PATCH 06/31] Implicit export modifier for nested namespaces --- internal/ast/ast.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/ast/ast.go b/internal/ast/ast.go index 9acacd6396..5acec0a301 100644 --- a/internal/ast/ast.go +++ b/internal/ast/ast.go @@ -442,6 +442,9 @@ func (n *Node) ModifierFlags() ModifierFlags { if modifiers != nil { return modifiers.ModifierFlags } + if n.Flags&NodeFlagsNestedNamespace != 0 { + return ModifierFlagsExport + } return ModifierFlagsNone } From 7bb923bfbda37b8f628fcde296c7aa7d1b197e06 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 10:51:25 -0700 Subject: [PATCH 07/31] Accept new baselines --- .../clodulesDerivedClasses.errors.txt | 33 +++ .../clodulesDerivedClasses.errors.txt.diff | 49 ++-- .../compiler/commentsModules.errors.txt | 118 -------- .../compiler/commentsModules.errors.txt.diff | 123 -------- .../compiler/commentsModules.symbols | 38 +++ .../compiler/commentsModules.symbols.diff | 48 +++- .../compiler/declFileGenericType2.errors.txt | 50 ---- .../declFileGenericType2.errors.txt.diff | 55 ---- .../compiler/declFileGenericType2.symbols | 21 +- .../declFileGenericType2.symbols.diff | 52 +--- .../declFileModuleContinuation.errors.txt | 15 - ...declFileModuleContinuation.errors.txt.diff | 20 -- .../declFileModuleContinuation.symbols | 4 + .../declFileModuleContinuation.symbols.diff | 6 +- ...ithClassReferredByExtendsClause.errors.txt | 25 -- ...assReferredByExtendsClause.errors.txt.diff | 30 -- ...ngWithClassReferredByExtendsClause.symbols | 14 +- ...hClassReferredByExtendsClause.symbols.diff | 26 +- ...ThatHasItsContainerNameConflict.errors.txt | 23 -- ...asItsContainerNameConflict.errors.txt.diff | 28 -- ...useThatHasItsContainerNameConflict.symbols | 11 +- ...atHasItsContainerNameConflict.symbols.diff | 33 +-- ...leNameConflictsInExtendsClause1.errors.txt | 16 -- ...eConflictsInExtendsClause1.errors.txt.diff | 21 -- ...oduleNameConflictsInExtendsClause1.symbols | 10 +- ...NameConflictsInExtendsClause1.symbols.diff | 30 +- ...leNameConflictsInExtendsClause2.errors.txt | 19 -- ...eConflictsInExtendsClause2.errors.txt.diff | 24 -- ...oduleNameConflictsInExtendsClause2.symbols | 20 +- ...NameConflictsInExtendsClause2.symbols.diff | 40 +-- ...leNameConflictsInExtendsClause3.errors.txt | 19 -- ...eConflictsInExtendsClause3.errors.txt.diff | 24 -- ...oduleNameConflictsInExtendsClause3.symbols | 20 +- ...NameConflictsInExtendsClause3.symbols.diff | 41 +-- .../declarationEmitNameConflicts.errors.txt | 53 ---- ...clarationEmitNameConflicts.errors.txt.diff | 58 ---- .../declarationEmitNameConflicts.symbols | 2 + .../declarationEmitNameConflicts.symbols.diff | 11 +- .../declarationEmitNameConflicts2.errors.txt | 30 -- ...larationEmitNameConflicts2.errors.txt.diff | 35 --- .../declarationEmitNameConflicts2.symbols | 32 ++- ...declarationEmitNameConflicts2.symbols.diff | 63 ----- .../compiler/dottedModuleName.errors.txt | 8 +- .../compiler/dottedModuleName.errors.txt.diff | 32 --- .../compiler/dottedModuleName.symbols | 18 +- .../compiler/dottedModuleName.symbols.diff | 51 ---- .../compiler/dottedModuleName2.errors.txt | 55 ---- .../dottedModuleName2.errors.txt.diff | 60 ---- .../compiler/dottedModuleName2.symbols | 11 +- .../compiler/dottedModuleName2.symbols.diff | 26 +- .../compiler/dottedNamesInSystem.errors.txt | 13 - .../dottedNamesInSystem.errors.txt.diff | 18 -- .../compiler/dottedNamesInSystem.symbols | 6 + .../compiler/dottedNamesInSystem.symbols.diff | 6 + .../emitMemberAccessExpression.errors.txt | 28 -- ...emitMemberAccessExpression.errors.txt.diff | 33 --- .../emitMemberAccessExpression.symbols | 12 +- .../emitMemberAccessExpression.symbols.diff | 30 +- ...tCanSubstituteConstEnumForValue.errors.txt | 79 ------ ...ubstituteConstEnumForValue.errors.txt.diff | 84 ------ ...portCanSubstituteConstEnumForValue.symbols | 20 +- ...anSubstituteConstEnumForValue.symbols.diff | 54 ++-- .../functionMergedWithModule.errors.txt | 20 -- .../functionMergedWithModule.errors.txt.diff | 25 -- .../compiler/functionMergedWithModule.symbols | 3 + .../functionMergedWithModule.symbols.diff | 4 +- ...opertyInheritanceSpecialization.errors.txt | 90 ------ ...yInheritanceSpecialization.errors.txt.diff | 95 ------- ...sPropertyInheritanceSpecialization.symbols | 31 +- ...ertyInheritanceSpecialization.symbols.diff | 33 ++- ...onstraintOnExtendedBuiltinTypes.errors.txt | 32 --- ...aintOnExtendedBuiltinTypes.errors.txt.diff | 37 --- ...icConstraintOnExtendedBuiltinTypes.symbols | 6 +- ...straintOnExtendedBuiltinTypes.symbols.diff | 23 -- ...nstraintOnExtendedBuiltinTypes2.errors.txt | 31 -- ...intOnExtendedBuiltinTypes2.errors.txt.diff | 36 --- ...cConstraintOnExtendedBuiltinTypes2.symbols | 6 +- ...traintOnExtendedBuiltinTypes2.symbols.diff | 24 -- .../importAliasFromNamespace.errors.txt | 25 -- .../importAliasFromNamespace.errors.txt.diff | 30 -- .../compiler/importAliasFromNamespace.symbols | 9 +- .../importAliasFromNamespace.symbols.diff | 18 +- .../compiler/importAnImport.errors.txt | 6 +- .../compiler/importAnImport.errors.txt.diff | 17 -- .../submodule/compiler/importAnImport.symbols | 2 + .../compiler/importAnImport.symbols.diff | 2 + ...internalAliasWithDottedNameEmit.errors.txt | 13 - ...nalAliasWithDottedNameEmit.errors.txt.diff | 18 -- .../internalAliasWithDottedNameEmit.symbols | 2 + ...ternalAliasWithDottedNameEmit.symbols.diff | 6 +- ...mergedModuleDeclarationCodeGen2.errors.txt | 14 - ...dModuleDeclarationCodeGen2.errors.txt.diff | 19 -- .../mergedModuleDeclarationCodeGen2.symbols | 7 +- ...rgedModuleDeclarationCodeGen2.symbols.diff | 23 +- ...mergedModuleDeclarationCodeGen3.errors.txt | 14 - ...dModuleDeclarationCodeGen3.errors.txt.diff | 19 -- .../mergedModuleDeclarationCodeGen3.symbols | 5 +- ...rgedModuleDeclarationCodeGen3.symbols.diff | 26 -- ...mergedModuleDeclarationCodeGen4.errors.txt | 22 -- ...dModuleDeclarationCodeGen4.errors.txt.diff | 27 -- .../mergedModuleDeclarationCodeGen4.symbols | 9 +- ...rgedModuleDeclarationCodeGen4.symbols.diff | 36 --- ...mergedModuleDeclarationCodeGen5.errors.txt | 24 -- ...dModuleDeclarationCodeGen5.errors.txt.diff | 29 -- .../mergedModuleDeclarationCodeGen5.symbols | 11 +- ...rgedModuleDeclarationCodeGen5.symbols.diff | 37 --- .../compiler/moduleExports1.errors.txt | 5 +- .../compiler/moduleExports1.errors.txt.diff | 22 -- .../submodule/compiler/moduleExports1.symbols | 8 + .../compiler/moduleExports1.symbols.diff | 8 + .../compiler/moduleImport.errors.txt | 5 +- .../compiler/moduleImport.errors.txt.diff | 21 -- .../submodule/compiler/moduleImport.symbols | 4 + .../compiler/moduleImport.symbols.diff | 6 +- ...uleMemberWithoutTypeAnnotation1.errors.txt | 52 ---- ...mberWithoutTypeAnnotation1.errors.txt.diff | 57 ---- ...moduleMemberWithoutTypeAnnotation1.symbols | 3 + ...eMemberWithoutTypeAnnotation1.symbols.diff | 6 +- ...meWithImportDeclarationInsideIt.errors.txt | 17 -- ...hImportDeclarationInsideIt.errors.txt.diff | 22 -- ...sNameWithImportDeclarationInsideIt.symbols | 3 + ...WithImportDeclarationInsideIt.symbols.diff | 10 +- ...eWithImportDeclarationInsideIt2.errors.txt | 17 -- ...ImportDeclarationInsideIt2.errors.txt.diff | 22 -- ...NameWithImportDeclarationInsideIt2.symbols | 3 + ...ithImportDeclarationInsideIt2.symbols.diff | 10 +- ...eWithImportDeclarationInsideIt4.errors.txt | 18 -- ...ImportDeclarationInsideIt4.errors.txt.diff | 23 -- ...NameWithImportDeclarationInsideIt4.symbols | 3 + ...ithImportDeclarationInsideIt4.symbols.diff | 10 +- ...eWithImportDeclarationInsideIt6.errors.txt | 16 -- ...ImportDeclarationInsideIt6.errors.txt.diff | 21 -- ...NameWithImportDeclarationInsideIt6.symbols | 1 + ...ithImportDeclarationInsideIt6.symbols.diff | 10 - .../submodule/compiler/moduledecl.errors.txt | 259 ----------------- .../compiler/moduledecl.errors.txt.diff | 264 ------------------ .../submodule/compiler/moduledecl.symbols | 10 + .../compiler/moduledecl.symbols.diff | 16 +- .../recursiveClassReferenceTest.symbols | 22 +- .../recursiveClassReferenceTest.symbols.diff | 63 +---- .../compiler/sourceMapSample.errors.txt | 6 +- .../compiler/sourceMapSample.errors.txt.diff | 19 -- .../compiler/sourceMapSample.symbols | 2 +- .../compiler/sourceMapSample.symbols.diff | 8 +- ...ModuleWithSameNameAndCommonRoot.errors.txt | 16 +- ...eWithSameNameAndCommonRoot.errors.txt.diff | 36 --- ...AndModuleWithSameNameAndCommonRoot.symbols | 24 +- ...duleWithSameNameAndCommonRoot.symbols.diff | 55 ++-- ...uleWithSameNameAndCommonRootES6.errors.txt | 16 +- ...thSameNameAndCommonRootES6.errors.txt.diff | 36 --- ...ModuleWithSameNameAndCommonRootES6.symbols | 24 +- ...eWithSameNameAndCommonRootES6.symbols.diff | 55 ++-- ...dClassWithSameNameAndCommonRoot.errors.txt | 8 +- ...sWithSameNameAndCommonRoot.errors.txt.diff | 22 -- ...eAndClassWithSameNameAndCommonRoot.symbols | 14 +- ...lassWithSameNameAndCommonRoot.symbols.diff | 44 +-- ...NonExportedClassesOfTheSameName.errors.txt | 46 --- ...portedClassesOfTheSameName.errors.txt.diff | 51 ---- ...AndNonExportedClassesOfTheSameName.symbols | 14 +- ...nExportedClassesOfTheSameName.symbols.diff | 28 +- ...ExportedInterfacesOfTheSameName.errors.txt | 43 --- ...tedInterfacesOfTheSameName.errors.txt.diff | 48 ---- ...NonExportedInterfacesOfTheSameName.symbols | 14 +- ...portedInterfacesOfTheSameName.symbols.diff | 26 +- ...ithExportedClassesOfTheSameName.errors.txt | 8 +- ...portedClassesOfTheSameName.errors.txt.diff | 32 --- ...chWithExportedClassesOfTheSameName.symbols | 8 +- ...hExportedClassesOfTheSameName.symbols.diff | 23 +- ...ExportedInterfacesOfTheSameName.errors.txt | 43 --- ...tedInterfacesOfTheSameName.errors.txt.diff | 48 ---- ...ithExportedInterfacesOfTheSameName.symbols | 18 +- ...portedInterfacesOfTheSameName.symbols.diff | 32 +-- ...ithExportedModulesOfTheSameName.errors.txt | 43 --- ...portedModulesOfTheSameName.errors.txt.diff | 48 ---- ...chWithExportedModulesOfTheSameName.symbols | 14 +- ...hExportedModulesOfTheSameName.symbols.diff | 27 +- ...asiPreventsParsingAsNamespace05.errors.txt | 15 - ...eventsParsingAsNamespace05.errors.txt.diff | 20 -- .../asiPreventsParsingAsNamespace05.symbols | 4 + ...iPreventsParsingAsNamespace05.symbols.diff | 4 + .../conformance/enumMerging.errors.txt | 72 ----- .../conformance/enumMerging.errors.txt.diff | 77 ----- .../submodule/conformance/enumMerging.symbols | 22 +- .../conformance/enumMerging.symbols.diff | 33 +-- .../invalidNestedModules.errors.txt | 41 +++ .../invalidNestedModules.errors.txt.diff | 46 --- .../conformance/invalidNestedModules.symbols | 12 +- .../invalidNestedModules.symbols.diff | 40 +-- .../conformance/nestedModules.errors.txt | 41 --- .../conformance/nestedModules.errors.txt.diff | 46 --- .../conformance/nestedModules.symbols | 28 +- .../conformance/nestedModules.symbols.diff | 62 +--- 192 files changed, 835 insertions(+), 4764 deletions(-) create mode 100644 testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/commentsModules.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/commentsModules.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileGenericType2.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileGenericType2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/dottedModuleName2.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/dottedModuleName2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/functionMergedWithModule.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/functionMergedWithModule.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleImport.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduledecl.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/moduledecl.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapSample.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumMerging.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/enumMerging.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidNestedModules.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/invalidNestedModules.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/nestedModules.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/nestedModules.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt new file mode 100644 index 0000000000..6a2b363d2c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt @@ -0,0 +1,33 @@ +clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' incorrectly extends base class static side '{ Utils: typeof Utils; prototype: Shape; }'. + Types of property 'Utils' are incompatible. + Property 'convert' is missing in type 'typeof Utils' but required in type 'typeof Utils'. + + +==== clodulesDerivedClasses.ts (1 errors) ==== + class Shape { + id: number; + } + + module Shape.Utils { + export function convert(): Shape { return null;} + } + + class Path extends Shape { + ~~~~ +!!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side '{ Utils: typeof Utils; prototype: Shape; }'. +!!! error TS2417: Types of property 'Utils' are incompatible. +!!! error TS2417: Property 'convert' is missing in type 'typeof Utils' but required in type 'typeof Utils'. +!!! related TS2728 clodulesDerivedClasses.ts:6:21: 'convert' is declared here. + name: string; + + } + + module Path.Utils { + export function convert2(): Path { + return null; + } + } + + + + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt.diff index 17cdd1b0a9..32050be43e 100644 --- a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt.diff @@ -1,38 +1,23 @@ --- old.clodulesDerivedClasses.errors.txt +++ new.clodulesDerivedClasses.errors.txt -@@= skipped -0, +-1 lines =@@ +@@= skipped -0, +0 lines =@@ -clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'. -- Types of property 'Utils' are incompatible. ++clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' incorrectly extends base class static side '{ Utils: typeof Utils; prototype: Shape; }'. + Types of property 'Utils' are incompatible. - Property 'convert' is missing in type 'typeof Path.Utils' but required in type 'typeof Shape.Utils'. -- -- --==== clodulesDerivedClasses.ts (1 errors) ==== -- class Shape { -- id: number; -- } -- -- module Shape.Utils { -- export function convert(): Shape { return null;} -- } -- -- class Path extends Shape { -- ~~~~ ++ Property 'convert' is missing in type 'typeof Utils' but required in type 'typeof Utils'. + + + ==== clodulesDerivedClasses.ts (1 errors) ==== +@@= skipped -13, +13 lines =@@ + + class Path extends Shape { + ~~~~ -!!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'. --!!! error TS2417: Types of property 'Utils' are incompatible. ++!!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side '{ Utils: typeof Utils; prototype: Shape; }'. + !!! error TS2417: Types of property 'Utils' are incompatible. -!!! error TS2417: Property 'convert' is missing in type 'typeof Path.Utils' but required in type 'typeof Shape.Utils'. --!!! related TS2728 clodulesDerivedClasses.ts:6:21: 'convert' is declared here. -- name: string; -- -- } -- -- module Path.Utils { -- export function convert2(): Path { -- return null; -- } -- } -- -- -- -- -@@= skipped --1, +1 lines =@@ -+ ++!!! error TS2417: Property 'convert' is missing in type 'typeof Utils' but required in type 'typeof Utils'. + !!! related TS2728 clodulesDerivedClasses.ts:6:21: 'convert' is declared here. + name: string; + diff --git a/testdata/baselines/reference/submodule/compiler/commentsModules.errors.txt b/testdata/baselines/reference/submodule/compiler/commentsModules.errors.txt deleted file mode 100644 index f259ae9d33..0000000000 --- a/testdata/baselines/reference/submodule/compiler/commentsModules.errors.txt +++ /dev/null @@ -1,118 +0,0 @@ -commentsModules.ts(46,8): error TS2339: Property 'm3' does not exist on type 'typeof m2'. -commentsModules.ts(53,8): error TS2339: Property 'm4' does not exist on type 'typeof m3'. -commentsModules.ts(62,8): error TS2339: Property 'm5' does not exist on type 'typeof m4'. -commentsModules.ts(72,8): error TS2339: Property 'm6' does not exist on type 'typeof m5'. -commentsModules.ts(80,8): error TS2339: Property 'm7' does not exist on type 'typeof m6'. -commentsModules.ts(97,8): error TS2339: Property 'm8' does not exist on type 'typeof m7'. - - -==== commentsModules.ts (6 errors) ==== - /** Module comment*/ - module m1 { - /** b's comment*/ - export var b: number; - /** foo's comment*/ - function foo() { - return b; - } - /** m2 comments*/ - export module m2 { - /** class comment;*/ - export class c { - }; - /** i*/ - export var i = new c(); - } - /** exported function*/ - export function fooExport() { - return foo(); - } - - // shouldn't appear - export function foo2Export(/**hm*/ a: string) { - } - - /** foo3Export - * comment - */ - export function foo3Export() { - } - - /** foo4Export - * comment - */ - function foo4Export() { - } - } // trailing comment module - m1.fooExport(); - var myvar = new m1.m2.c(); - /** module comment of m2.m3*/ - module m2.m3 { - /** Exported class comment*/ - export class c { - } - } /* trailing dotted module comment*/ - new m2.m3.c(); - ~~ -!!! error TS2339: Property 'm3' does not exist on type 'typeof m2'. - /** module comment of m3.m4.m5*/ - module m3.m4.m5 { - /** Exported class comment*/ - export class c { - } - } // trailing dotted module 2 - new m3.m4.m5.c(); - ~~ -!!! error TS2339: Property 'm4' does not exist on type 'typeof m3'. - /** module comment of m4.m5.m6*/ - module m4.m5.m6 { - export module m7 { - /** Exported class comment*/ - export class c { - } - } /* trailing inner module */ /* multiple comments*/ - } - new m4.m5.m6.m7.c(); - ~~ -!!! error TS2339: Property 'm5' does not exist on type 'typeof m4'. - /** module comment of m5.m6.m7*/ - module m5.m6.m7 { - /** module m8 comment*/ - export module m8 { - /** Exported class comment*/ - export class c { - } - } - } - new m5.m6.m7.m8.c(); - ~~ -!!! error TS2339: Property 'm6' does not exist on type 'typeof m5'. - module m6.m7 { - export module m8 { - /** Exported class comment*/ - export class c { - } - } - } - new m6.m7.m8.c(); - ~~ -!!! error TS2339: Property 'm7' does not exist on type 'typeof m6'. - module m7.m8 { - /** module m9 comment*/ - export module m9 { - /** Exported class comment*/ - export class c { - } - - /** class d */ - class d { - } - - // class e - export class e { - } - } - } - new m7.m8.m9.c(); - ~~ -!!! error TS2339: Property 'm8' does not exist on type 'typeof m7'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsModules.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/commentsModules.errors.txt.diff deleted file mode 100644 index b38442f974..0000000000 --- a/testdata/baselines/reference/submodule/compiler/commentsModules.errors.txt.diff +++ /dev/null @@ -1,123 +0,0 @@ ---- old.commentsModules.errors.txt -+++ new.commentsModules.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+commentsModules.ts(46,8): error TS2339: Property 'm3' does not exist on type 'typeof m2'. -+commentsModules.ts(53,8): error TS2339: Property 'm4' does not exist on type 'typeof m3'. -+commentsModules.ts(62,8): error TS2339: Property 'm5' does not exist on type 'typeof m4'. -+commentsModules.ts(72,8): error TS2339: Property 'm6' does not exist on type 'typeof m5'. -+commentsModules.ts(80,8): error TS2339: Property 'm7' does not exist on type 'typeof m6'. -+commentsModules.ts(97,8): error TS2339: Property 'm8' does not exist on type 'typeof m7'. -+ -+ -+==== commentsModules.ts (6 errors) ==== -+ /** Module comment*/ -+ module m1 { -+ /** b's comment*/ -+ export var b: number; -+ /** foo's comment*/ -+ function foo() { -+ return b; -+ } -+ /** m2 comments*/ -+ export module m2 { -+ /** class comment;*/ -+ export class c { -+ }; -+ /** i*/ -+ export var i = new c(); -+ } -+ /** exported function*/ -+ export function fooExport() { -+ return foo(); -+ } -+ -+ // shouldn't appear -+ export function foo2Export(/**hm*/ a: string) { -+ } -+ -+ /** foo3Export -+ * comment -+ */ -+ export function foo3Export() { -+ } -+ -+ /** foo4Export -+ * comment -+ */ -+ function foo4Export() { -+ } -+ } // trailing comment module -+ m1.fooExport(); -+ var myvar = new m1.m2.c(); -+ /** module comment of m2.m3*/ -+ module m2.m3 { -+ /** Exported class comment*/ -+ export class c { -+ } -+ } /* trailing dotted module comment*/ -+ new m2.m3.c(); -+ ~~ -+!!! error TS2339: Property 'm3' does not exist on type 'typeof m2'. -+ /** module comment of m3.m4.m5*/ -+ module m3.m4.m5 { -+ /** Exported class comment*/ -+ export class c { -+ } -+ } // trailing dotted module 2 -+ new m3.m4.m5.c(); -+ ~~ -+!!! error TS2339: Property 'm4' does not exist on type 'typeof m3'. -+ /** module comment of m4.m5.m6*/ -+ module m4.m5.m6 { -+ export module m7 { -+ /** Exported class comment*/ -+ export class c { -+ } -+ } /* trailing inner module */ /* multiple comments*/ -+ } -+ new m4.m5.m6.m7.c(); -+ ~~ -+!!! error TS2339: Property 'm5' does not exist on type 'typeof m4'. -+ /** module comment of m5.m6.m7*/ -+ module m5.m6.m7 { -+ /** module m8 comment*/ -+ export module m8 { -+ /** Exported class comment*/ -+ export class c { -+ } -+ } -+ } -+ new m5.m6.m7.m8.c(); -+ ~~ -+!!! error TS2339: Property 'm6' does not exist on type 'typeof m5'. -+ module m6.m7 { -+ export module m8 { -+ /** Exported class comment*/ -+ export class c { -+ } -+ } -+ } -+ new m6.m7.m8.c(); -+ ~~ -+!!! error TS2339: Property 'm7' does not exist on type 'typeof m6'. -+ module m7.m8 { -+ /** module m9 comment*/ -+ export module m9 { -+ /** Exported class comment*/ -+ export class c { -+ } -+ -+ /** class d */ -+ class d { -+ } -+ -+ // class e -+ export class e { -+ } -+ } -+ } -+ new m7.m8.m9.c(); -+ ~~ -+!!! error TS2339: Property 'm8' does not exist on type 'typeof m7'. diff --git a/testdata/baselines/reference/submodule/compiler/commentsModules.symbols b/testdata/baselines/reference/submodule/compiler/commentsModules.symbols index 881245526f..630e832250 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsModules.symbols +++ b/testdata/baselines/reference/submodule/compiler/commentsModules.symbols @@ -82,7 +82,11 @@ module m2.m3 { } } /* trailing dotted module comment*/ new m2.m3.c(); +>m2.m3.c : Symbol(c, Decl(commentsModules.ts, 40, 14)) +>m2.m3 : Symbol(m3, Decl(commentsModules.ts, 40, 10)) >m2 : Symbol(m2, Decl(commentsModules.ts, 38, 26)) +>m3 : Symbol(m3, Decl(commentsModules.ts, 40, 10)) +>c : Symbol(c, Decl(commentsModules.ts, 40, 14)) /** module comment of m3.m4.m5*/ module m3.m4.m5 { @@ -96,7 +100,13 @@ module m3.m4.m5 { } } // trailing dotted module 2 new m3.m4.m5.c(); +>m3.m4.m5.c : Symbol(c, Decl(commentsModules.ts, 47, 17)) +>m3.m4.m5 : Symbol(m5, Decl(commentsModules.ts, 47, 13)) +>m3.m4 : Symbol(m4, Decl(commentsModules.ts, 47, 10)) >m3 : Symbol(m3, Decl(commentsModules.ts, 45, 14)) +>m4 : Symbol(m4, Decl(commentsModules.ts, 47, 10)) +>m5 : Symbol(m5, Decl(commentsModules.ts, 47, 13)) +>c : Symbol(c, Decl(commentsModules.ts, 47, 17)) /** module comment of m4.m5.m6*/ module m4.m5.m6 { @@ -114,7 +124,15 @@ module m4.m5.m6 { } /* trailing inner module */ /* multiple comments*/ } new m4.m5.m6.m7.c(); +>m4.m5.m6.m7.c : Symbol(c, Decl(commentsModules.ts, 55, 22)) +>m4.m5.m6.m7 : Symbol(m7, Decl(commentsModules.ts, 54, 17)) +>m4.m5.m6 : Symbol(m6, Decl(commentsModules.ts, 54, 13)) +>m4.m5 : Symbol(m5, Decl(commentsModules.ts, 54, 10)) >m4 : Symbol(m4, Decl(commentsModules.ts, 52, 17)) +>m5 : Symbol(m5, Decl(commentsModules.ts, 54, 10)) +>m6 : Symbol(m6, Decl(commentsModules.ts, 54, 13)) +>m7 : Symbol(m7, Decl(commentsModules.ts, 54, 17)) +>c : Symbol(c, Decl(commentsModules.ts, 55, 22)) /** module comment of m5.m6.m7*/ module m5.m6.m7 { @@ -133,7 +151,15 @@ module m5.m6.m7 { } } new m5.m6.m7.m8.c(); +>m5.m6.m7.m8.c : Symbol(c, Decl(commentsModules.ts, 65, 22)) +>m5.m6.m7.m8 : Symbol(m8, Decl(commentsModules.ts, 63, 17)) +>m5.m6.m7 : Symbol(m7, Decl(commentsModules.ts, 63, 13)) +>m5.m6 : Symbol(m6, Decl(commentsModules.ts, 63, 10)) >m5 : Symbol(m5, Decl(commentsModules.ts, 61, 20)) +>m6 : Symbol(m6, Decl(commentsModules.ts, 63, 10)) +>m7 : Symbol(m7, Decl(commentsModules.ts, 63, 13)) +>m8 : Symbol(m8, Decl(commentsModules.ts, 63, 17)) +>c : Symbol(c, Decl(commentsModules.ts, 65, 22)) module m6.m7 { >m6 : Symbol(m6, Decl(commentsModules.ts, 71, 20)) @@ -149,7 +175,13 @@ module m6.m7 { } } new m6.m7.m8.c(); +>m6.m7.m8.c : Symbol(c, Decl(commentsModules.ts, 73, 22)) +>m6.m7.m8 : Symbol(m8, Decl(commentsModules.ts, 72, 14)) +>m6.m7 : Symbol(m7, Decl(commentsModules.ts, 72, 10)) >m6 : Symbol(m6, Decl(commentsModules.ts, 71, 20)) +>m7 : Symbol(m7, Decl(commentsModules.ts, 72, 10)) +>m8 : Symbol(m8, Decl(commentsModules.ts, 72, 14)) +>c : Symbol(c, Decl(commentsModules.ts, 73, 22)) module m7.m8 { >m7 : Symbol(m7, Decl(commentsModules.ts, 79, 17)) @@ -176,5 +208,11 @@ module m7.m8 { } } new m7.m8.m9.c(); +>m7.m8.m9.c : Symbol(c, Decl(commentsModules.ts, 82, 22)) +>m7.m8.m9 : Symbol(m9, Decl(commentsModules.ts, 80, 14)) +>m7.m8 : Symbol(m8, Decl(commentsModules.ts, 80, 10)) >m7 : Symbol(m7, Decl(commentsModules.ts, 79, 17)) +>m8 : Symbol(m8, Decl(commentsModules.ts, 80, 10)) +>m9 : Symbol(m9, Decl(commentsModules.ts, 80, 14)) +>c : Symbol(c, Decl(commentsModules.ts, 82, 22)) diff --git a/testdata/baselines/reference/submodule/compiler/commentsModules.symbols.diff b/testdata/baselines/reference/submodule/compiler/commentsModules.symbols.diff index cd0ab78bb8..ecac5b7b71 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsModules.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsModules.symbols.diff @@ -30,27 +30,37 @@ new m2.m3.c(); ->m2.m3.c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 14)) ->m2.m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 10)) ++>m2.m3.c : Symbol(c, Decl(commentsModules.ts, 40, 14)) ++>m2.m3 : Symbol(m3, Decl(commentsModules.ts, 40, 10)) >m2 : Symbol(m2, Decl(commentsModules.ts, 38, 26)) ->m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 10)) ->c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 14)) ++>m3 : Symbol(m3, Decl(commentsModules.ts, 40, 10)) ++>c : Symbol(c, Decl(commentsModules.ts, 40, 14)) /** module comment of m3.m4.m5*/ module m3.m4.m5 { -@@= skipped -18, +14 lines =@@ +@@= skipped -18, +18 lines =@@ } } // trailing dotted module 2 new m3.m4.m5.c(); ->m3.m4.m5.c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 17)) ->m3.m4.m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 13)) ->m3.m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 10)) ++>m3.m4.m5.c : Symbol(c, Decl(commentsModules.ts, 47, 17)) ++>m3.m4.m5 : Symbol(m5, Decl(commentsModules.ts, 47, 13)) ++>m3.m4 : Symbol(m4, Decl(commentsModules.ts, 47, 10)) >m3 : Symbol(m3, Decl(commentsModules.ts, 45, 14)) ->m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 10)) ->m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 13)) ->c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 17)) ++>m4 : Symbol(m4, Decl(commentsModules.ts, 47, 10)) ++>m5 : Symbol(m5, Decl(commentsModules.ts, 47, 13)) ++>c : Symbol(c, Decl(commentsModules.ts, 47, 17)) /** module comment of m4.m5.m6*/ module m4.m5.m6 { -@@= skipped -24, +18 lines =@@ +@@= skipped -24, +24 lines =@@ } /* trailing inner module */ /* multiple comments*/ } new m4.m5.m6.m7.c(); @@ -58,15 +68,23 @@ ->m4.m5.m6.m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 17)) ->m4.m5.m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 13)) ->m4.m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 10)) ++>m4.m5.m6.m7.c : Symbol(c, Decl(commentsModules.ts, 55, 22)) ++>m4.m5.m6.m7 : Symbol(m7, Decl(commentsModules.ts, 54, 17)) ++>m4.m5.m6 : Symbol(m6, Decl(commentsModules.ts, 54, 13)) ++>m4.m5 : Symbol(m5, Decl(commentsModules.ts, 54, 10)) >m4 : Symbol(m4, Decl(commentsModules.ts, 52, 17)) ->m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 10)) ->m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 13)) ->m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 17)) ->c : Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 22)) ++>m5 : Symbol(m5, Decl(commentsModules.ts, 54, 10)) ++>m6 : Symbol(m6, Decl(commentsModules.ts, 54, 13)) ++>m7 : Symbol(m7, Decl(commentsModules.ts, 54, 17)) ++>c : Symbol(c, Decl(commentsModules.ts, 55, 22)) /** module comment of m5.m6.m7*/ module m5.m6.m7 { -@@= skipped -27, +19 lines =@@ +@@= skipped -27, +27 lines =@@ } } new m5.m6.m7.m8.c(); @@ -74,37 +92,57 @@ ->m5.m6.m7.m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 17)) ->m5.m6.m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 13)) ->m5.m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 10)) ++>m5.m6.m7.m8.c : Symbol(c, Decl(commentsModules.ts, 65, 22)) ++>m5.m6.m7.m8 : Symbol(m8, Decl(commentsModules.ts, 63, 17)) ++>m5.m6.m7 : Symbol(m7, Decl(commentsModules.ts, 63, 13)) ++>m5.m6 : Symbol(m6, Decl(commentsModules.ts, 63, 10)) >m5 : Symbol(m5, Decl(commentsModules.ts, 61, 20)) ->m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 10)) ->m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 13)) ->m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 17)) ->c : Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 22)) ++>m6 : Symbol(m6, Decl(commentsModules.ts, 63, 10)) ++>m7 : Symbol(m7, Decl(commentsModules.ts, 63, 13)) ++>m8 : Symbol(m8, Decl(commentsModules.ts, 63, 17)) ++>c : Symbol(c, Decl(commentsModules.ts, 65, 22)) module m6.m7 { >m6 : Symbol(m6, Decl(commentsModules.ts, 71, 20)) -@@= skipped -24, +16 lines =@@ +@@= skipped -24, +24 lines =@@ } } new m6.m7.m8.c(); ->m6.m7.m8.c : Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 22)) ->m6.m7.m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 14)) ->m6.m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 10)) ++>m6.m7.m8.c : Symbol(c, Decl(commentsModules.ts, 73, 22)) ++>m6.m7.m8 : Symbol(m8, Decl(commentsModules.ts, 72, 14)) ++>m6.m7 : Symbol(m7, Decl(commentsModules.ts, 72, 10)) >m6 : Symbol(m6, Decl(commentsModules.ts, 71, 20)) ->m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 10)) ->m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 14)) ->c : Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 22)) ++>m7 : Symbol(m7, Decl(commentsModules.ts, 72, 10)) ++>m8 : Symbol(m8, Decl(commentsModules.ts, 72, 14)) ++>c : Symbol(c, Decl(commentsModules.ts, 73, 22)) module m7.m8 { >m7 : Symbol(m7, Decl(commentsModules.ts, 79, 17)) -@@= skipped -33, +27 lines =@@ +@@= skipped -33, +33 lines =@@ } } new m7.m8.m9.c(); ->m7.m8.m9.c : Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 22)) ->m7.m8.m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 14)) ->m7.m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 10)) ++>m7.m8.m9.c : Symbol(c, Decl(commentsModules.ts, 82, 22)) ++>m7.m8.m9 : Symbol(m9, Decl(commentsModules.ts, 80, 14)) ++>m7.m8 : Symbol(m8, Decl(commentsModules.ts, 80, 10)) >m7 : Symbol(m7, Decl(commentsModules.ts, 79, 17)) ->m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 10)) ->m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 14)) ->c : Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 22)) ++>m8 : Symbol(m8, Decl(commentsModules.ts, 80, 10)) ++>m9 : Symbol(m9, Decl(commentsModules.ts, 80, 14)) ++>c : Symbol(c, Decl(commentsModules.ts, 82, 22)) diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.errors.txt deleted file mode 100644 index e33c12cfc3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.errors.txt +++ /dev/null @@ -1,50 +0,0 @@ -declFileGenericType2.ts(25,141): error TS2304: Cannot find name 'IElementController'. -declFileGenericType2.ts(33,134): error TS2339: Property 'dom' does not exist on type 'typeof templa'. - - -==== declFileGenericType2.ts (2 errors) ==== - declare module templa.mvc { - interface IModel { - } - } - declare module templa.mvc { - interface IController { - } - } - declare module templa.mvc { - class AbstractController implements mvc.IController { - } - } - declare module templa.mvc.composite { - interface ICompositeControllerModel extends mvc.IModel { - getControllers(): mvc.IController[]; - } - } - module templa.dom.mvc { - export interface IElementController extends templa.mvc.IController { - } - } - // Module - module templa.dom.mvc { - - export class AbstractElementController extends templa.mvc.AbstractController implements IElementController { - ~~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'IElementController'. - constructor() { - super(); - } - } - } - // Module - module templa.dom.mvc.composite { - export class AbstractCompositeElementController extends templa.dom.mvc.AbstractElementController { - ~~~ -!!! error TS2339: Property 'dom' does not exist on type 'typeof templa'. - public _controllers: templa.mvc.IController[]; - constructor() { - super(); - this._controllers = []; - } - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.errors.txt.diff deleted file mode 100644 index 376e53f28b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.errors.txt.diff +++ /dev/null @@ -1,55 +0,0 @@ ---- old.declFileGenericType2.errors.txt -+++ new.declFileGenericType2.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+declFileGenericType2.ts(25,141): error TS2304: Cannot find name 'IElementController'. -+declFileGenericType2.ts(33,134): error TS2339: Property 'dom' does not exist on type 'typeof templa'. -+ -+ -+==== declFileGenericType2.ts (2 errors) ==== -+ declare module templa.mvc { -+ interface IModel { -+ } -+ } -+ declare module templa.mvc { -+ interface IController { -+ } -+ } -+ declare module templa.mvc { -+ class AbstractController implements mvc.IController { -+ } -+ } -+ declare module templa.mvc.composite { -+ interface ICompositeControllerModel extends mvc.IModel { -+ getControllers(): mvc.IController[]; -+ } -+ } -+ module templa.dom.mvc { -+ export interface IElementController extends templa.mvc.IController { -+ } -+ } -+ // Module -+ module templa.dom.mvc { -+ -+ export class AbstractElementController extends templa.mvc.AbstractController implements IElementController { -+ ~~~~~~~~~~~~~~~~~~ -+!!! error TS2304: Cannot find name 'IElementController'. -+ constructor() { -+ super(); -+ } -+ } -+ } -+ // Module -+ module templa.dom.mvc.composite { -+ export class AbstractCompositeElementController extends templa.dom.mvc.AbstractElementController { -+ ~~~ -+!!! error TS2339: Property 'dom' does not exist on type 'typeof templa'. -+ public _controllers: templa.mvc.IController[]; -+ constructor() { -+ super(); -+ this._controllers = []; -+ } -+ } -+ } -+ diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols index ca6811c493..394ade7b90 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols +++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols @@ -58,8 +58,8 @@ declare module templa.mvc.composite { } module templa.dom.mvc { >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) ->dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14)) ->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18)) +>dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) +>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) export interface IElementController extends templa.mvc.IController { >IElementController : Symbol(IElementController, Decl(declFileGenericType2.ts, 17, 23)) @@ -78,8 +78,8 @@ module templa.dom.mvc { // Module module templa.dom.mvc { >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) ->dom : Symbol(dom, Decl(declFileGenericType2.ts, 22, 14)) ->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 22, 18)) +>dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) +>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) export class AbstractElementController extends templa.mvc.AbstractController implements IElementController { >AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23)) @@ -93,6 +93,7 @@ module templa.dom.mvc { >mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22)) >AbstractController : Symbol(AbstractController, Decl(declFileGenericType2.ts, 8, 27)) >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 24, 43)) +>IElementController : Symbol(IElementController, Decl(declFileGenericType2.ts, 17, 23)) >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 24, 43)) constructor() { @@ -104,8 +105,8 @@ module templa.dom.mvc { // Module module templa.dom.mvc.composite { >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) ->dom : Symbol(dom, Decl(declFileGenericType2.ts, 31, 14)) ->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 31, 18)) +>dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) +>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) >composite : Symbol(composite, Decl(declFileGenericType2.ts, 31, 22)) export class AbstractCompositeElementController extends templa.dom.mvc.AbstractElementController { @@ -115,7 +116,13 @@ module templa.dom.mvc.composite { >mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22)) >composite : Symbol(composite, Decl(declFileGenericType2.ts, 12, 26)) >ICompositeControllerModel : Symbol(ICompositeControllerModel, Decl(declFileGenericType2.ts, 12, 37)) +>templa.dom.mvc.AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23)) +>templa.dom.mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) +>templa.dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) +>dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) +>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) +>AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23)) >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 32, 52)) public _controllers: templa.mvc.IController[]; @@ -129,6 +136,8 @@ module templa.dom.mvc.composite { constructor() { super(); +>super : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23)) + this._controllers = []; >this._controllers : Symbol(_controllers, Decl(declFileGenericType2.ts, 32, 179)) >this : Symbol(AbstractCompositeElementController, Decl(declFileGenericType2.ts, 31, 33)) diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols.diff b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols.diff index 84897a6485..c16c1e9c66 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols.diff @@ -9,17 +9,7 @@ >mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22)) >IController : Symbol(IController, Decl(declFileGenericType2.ts, 4, 27)) >mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22)) -@@= skipped -9, +9 lines =@@ - } - module templa.dom.mvc { - >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) -->dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) -->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) -+>dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14)) -+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18)) - - export interface IElementController extends templa.mvc.IController { - >IElementController : Symbol(IElementController, Decl(declFileGenericType2.ts, 17, 23)) +@@= skipped -17, +17 lines =@@ >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 18, 40)) >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) >mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22)) @@ -35,16 +25,7 @@ >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 18, 40)) } } - // Module - module templa.dom.mvc { - >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) -->dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) -->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) -+>dom : Symbol(dom, Decl(declFileGenericType2.ts, 22, 14)) -+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 22, 18)) - - export class AbstractElementController extends templa.mvc.AbstractController implements IElementController { - >AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23)) +@@= skipped -20, +20 lines =@@ >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 24, 43)) >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) >mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22)) @@ -58,7 +39,7 @@ ->AbstractController : Symbol(templa.mvc.AbstractController, Decl(declFileGenericType2.ts, 8, 27)) +>AbstractController : Symbol(AbstractController, Decl(declFileGenericType2.ts, 8, 27)) >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 24, 43)) -->IElementController : Symbol(IElementController, Decl(declFileGenericType2.ts, 17, 23)) + >IElementController : Symbol(IElementController, Decl(declFileGenericType2.ts, 17, 23)) >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 24, 43)) constructor() { @@ -68,31 +49,18 @@ } } } - // Module - module templa.dom.mvc.composite { - >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) -->dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) -->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) -+>dom : Symbol(dom, Decl(declFileGenericType2.ts, 31, 14)) -+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 31, 18)) - >composite : Symbol(composite, Decl(declFileGenericType2.ts, 31, 22)) - - export class AbstractCompositeElementController extends templa.dom.mvc.AbstractElementController { -@@= skipped -56, +55 lines =@@ +@@= skipped -28, +28 lines =@@ >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 32, 52)) >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) >mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22)) ->composite : Symbol(templa.mvc.composite, Decl(declFileGenericType2.ts, 12, 26)) ->ICompositeControllerModel : Symbol(templa.mvc.composite.ICompositeControllerModel, Decl(declFileGenericType2.ts, 12, 37)) -->templa.dom.mvc.AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23)) -->templa.dom.mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) -->templa.dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) +>composite : Symbol(composite, Decl(declFileGenericType2.ts, 12, 26)) +>ICompositeControllerModel : Symbol(ICompositeControllerModel, Decl(declFileGenericType2.ts, 12, 37)) - >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more) -->dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) -->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) -->AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23)) + >templa.dom.mvc.AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23)) + >templa.dom.mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18)) + >templa.dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14)) +@@= skipped -12, +12 lines =@@ >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 32, 52)) public _controllers: templa.mvc.IController[]; @@ -109,8 +77,8 @@ constructor() { super(); -->super : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23)) -- + >super : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23)) + this._controllers = []; ->this._controllers : Symbol(AbstractCompositeElementController._controllers, Decl(declFileGenericType2.ts, 32, 179)) +>this._controllers : Symbol(_controllers, Decl(declFileGenericType2.ts, 32, 179)) diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.errors.txt deleted file mode 100644 index e2a734f279..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -declFileModuleContinuation.ts(7,33): error TS2694: Namespace 'A' has no exported member 'C'. - - -==== declFileModuleContinuation.ts (1 errors) ==== - module A.C { - export interface Z { - } - } - - module A.B.C { - export class W implements A.C.Z { - ~ -!!! error TS2694: Namespace 'A' has no exported member 'C'. - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.errors.txt.diff deleted file mode 100644 index f610789f64..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.declFileModuleContinuation.errors.txt -+++ new.declFileModuleContinuation.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+declFileModuleContinuation.ts(7,33): error TS2694: Namespace 'A' has no exported member 'C'. -+ -+ -+==== declFileModuleContinuation.ts (1 errors) ==== -+ module A.C { -+ export interface Z { -+ } -+ } -+ -+ module A.B.C { -+ export class W implements A.C.Z { -+ ~ -+!!! error TS2694: Namespace 'A' has no exported member 'C'. -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols index ad6c6c6145..21ed2aadaa 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols +++ b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols @@ -17,6 +17,10 @@ module A.B.C { export class W implements A.C.Z { >W : Symbol(W, Decl(declFileModuleContinuation.ts, 5, 14)) +>A.C.Z : Symbol(Z, Decl(declFileModuleContinuation.ts, 0, 12)) +>A.C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 9)) >A : Symbol(A, Decl(declFileModuleContinuation.ts, 0, 0), Decl(declFileModuleContinuation.ts, 3, 1)) +>C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 9)) +>Z : Symbol(Z, Decl(declFileModuleContinuation.ts, 0, 12)) } } diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols.diff b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols.diff index 73a217bd0a..c5ea99c5a1 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols.diff @@ -5,9 +5,11 @@ export class W implements A.C.Z { >W : Symbol(W, Decl(declFileModuleContinuation.ts, 5, 14)) ->A.C.Z : Symbol(A.C.Z, Decl(declFileModuleContinuation.ts, 0, 12)) -->A.C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 9)) ++>A.C.Z : Symbol(Z, Decl(declFileModuleContinuation.ts, 0, 12)) + >A.C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 9)) >A : Symbol(A, Decl(declFileModuleContinuation.ts, 0, 0), Decl(declFileModuleContinuation.ts, 3, 1)) -->C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 9)) + >C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 9)) ->Z : Symbol(A.C.Z, Decl(declFileModuleContinuation.ts, 0, 12)) ++>Z : Symbol(Z, Decl(declFileModuleContinuation.ts, 0, 12)) } } diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.errors.txt deleted file mode 100644 index ff2276dc9c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.errors.txt +++ /dev/null @@ -1,25 +0,0 @@ -declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts(15,38): error TS2339: Property 'Y' does not exist on type 'typeof X'. - - -==== declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts (1 errors) ==== - declare module A.B.Base { - export class W { - id: number; - } - } - module X.Y.base { - - export class W extends A.B.Base.W { - name: string; - } - } - - module X.Y.base.Z { - - export class W extends X.Y.base.W { - ~ -!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. - value: boolean; - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.errors.txt.diff deleted file mode 100644 index 4a6d55da03..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.errors.txt.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- old.declFileWithClassNameConflictingWithClassReferredByExtendsClause.errors.txt -+++ new.declFileWithClassNameConflictingWithClassReferredByExtendsClause.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts(15,38): error TS2339: Property 'Y' does not exist on type 'typeof X'. -+ -+ -+==== declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts (1 errors) ==== -+ declare module A.B.Base { -+ export class W { -+ id: number; -+ } -+ } -+ module X.Y.base { -+ -+ export class W extends A.B.Base.W { -+ name: string; -+ } -+ } -+ -+ module X.Y.base.Z { -+ -+ export class W extends X.Y.base.W { -+ ~ -+!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. -+ value: boolean; -+ } -+ } -+ diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols index e66ee03ad6..d352269e2f 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols +++ b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols @@ -15,8 +15,8 @@ declare module A.B.Base { } module X.Y.base { >X : Symbol(X, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 4, 1), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 10, 1)) ->Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9)) ->base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11)) +>Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9)) +>base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11)) export class W extends A.B.Base.W { >W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 17)) @@ -35,14 +35,20 @@ module X.Y.base { module X.Y.base.Z { >X : Symbol(X, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 4, 1), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 10, 1)) ->Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9)) ->base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11)) +>Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9)) +>base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11)) >Z : Symbol(Z, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 16)) export class W extends X.Y.base.W { >W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 19)) >TValue : Symbol(TValue, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 14, 19)) +>X.Y.base.W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 17)) +>X.Y.base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11)) +>X.Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9)) >X : Symbol(X, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 4, 1), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 10, 1)) +>Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9)) +>base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11)) +>W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 17)) value: boolean; >value : Symbol(value, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 14, 47)) diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols.diff b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols.diff index 4e71a2bd05..126fb4401d 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols.diff @@ -9,11 +9,7 @@ } } module X.Y.base { - >X : Symbol(X, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 4, 1), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 10, 1)) -->Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9)) -->base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11)) -+>Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9)) -+>base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11)) +@@= skipped -10, +10 lines =@@ export class W extends A.B.Base.W { >W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 17)) @@ -37,24 +33,8 @@ } } - module X.Y.base.Z { - >X : Symbol(X, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 4, 1), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 10, 1)) -->Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9)) -->base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11)) -+>Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9)) -+>base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11)) - >Z : Symbol(Z, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 16)) - - export class W extends X.Y.base.W { - >W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 19)) - >TValue : Symbol(TValue, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 14, 19)) -->X.Y.base.W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 17)) -->X.Y.base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11)) -->X.Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9)) - >X : Symbol(X, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 4, 1), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 10, 1)) -->Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9)) -->base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11)) -->W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 17)) +@@= skipped -31, +31 lines =@@ + >W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 17)) value: boolean; ->value : Symbol(W.value, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 14, 47)) diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.errors.txt deleted file mode 100644 index 6ffe534676..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.errors.txt +++ /dev/null @@ -1,23 +0,0 @@ -declFileWithExtendsClauseThatHasItsContainerNameConflict.ts(14,38): error TS2304: Cannot find name 'EventManager'. - - -==== declFileWithExtendsClauseThatHasItsContainerNameConflict.ts (1 errors) ==== - declare module A.B.C { - class B { - } - } - - module A.B { - export class EventManager { - id: number; - - } - } - - module A.B.C { - export class ContextMenu extends EventManager { - ~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'EventManager'. - name: string; - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.errors.txt.diff deleted file mode 100644 index 8e08ecce1d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.errors.txt.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.declFileWithExtendsClauseThatHasItsContainerNameConflict.errors.txt -+++ new.declFileWithExtendsClauseThatHasItsContainerNameConflict.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+declFileWithExtendsClauseThatHasItsContainerNameConflict.ts(14,38): error TS2304: Cannot find name 'EventManager'. -+ -+ -+==== declFileWithExtendsClauseThatHasItsContainerNameConflict.ts (1 errors) ==== -+ declare module A.B.C { -+ class B { -+ } -+ } -+ -+ module A.B { -+ export class EventManager { -+ id: number; -+ -+ } -+ } -+ -+ module A.B.C { -+ export class ContextMenu extends EventManager { -+ ~~~~~~~~~~~~ -+!!! error TS2304: Cannot find name 'EventManager'. -+ name: string; -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols index 40d6afa075..d5da5ce6e0 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols +++ b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols @@ -3,8 +3,8 @@ === declFileWithExtendsClauseThatHasItsContainerNameConflict.ts === declare module A.B.C { >A : Symbol(A, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 0), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 3, 1), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 10, 1)) ->B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17)) ->C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 19)) +>B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9)) +>C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 19), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 11)) class B { >B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 22)) @@ -13,7 +13,7 @@ declare module A.B.C { module A.B { >A : Symbol(A, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 0), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 3, 1), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 10, 1)) ->B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9)) +>B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9)) export class EventManager { >EventManager : Symbol(EventManager, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 12)) @@ -26,11 +26,12 @@ module A.B { module A.B.C { >A : Symbol(A, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 0), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 3, 1), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 10, 1)) ->B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9)) ->C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 11)) +>B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9)) +>C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 19), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 11)) export class ContextMenu extends EventManager { >ContextMenu : Symbol(ContextMenu, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 14)) +>EventManager : Symbol(EventManager, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 12)) name: string; >name : Symbol(name, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 13, 51)) diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols.diff b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols.diff index fa6360ab4c..1c830d22d7 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols.diff @@ -1,24 +1,6 @@ --- old.declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols +++ new.declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols -@@= skipped -2, +2 lines =@@ - === declFileWithExtendsClauseThatHasItsContainerNameConflict.ts === - declare module A.B.C { - >A : Symbol(A, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 0), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 3, 1), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 10, 1)) -->B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9)) -->C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 19), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 11)) -+>B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17)) -+>C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 19)) - - class B { - >B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 22)) -@@= skipped -10, +10 lines =@@ - - module A.B { - >A : Symbol(A, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 0), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 3, 1), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 10, 1)) -->B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9)) -+>B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9)) - - export class EventManager { +@@= skipped -18, +18 lines =@@ >EventManager : Symbol(EventManager, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 12)) id: number; @@ -27,17 +9,8 @@ } } - - module A.B.C { - >A : Symbol(A, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 0), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 3, 1), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 10, 1)) -->B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9)) -->C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 19), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 11)) -+>B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9)) -+>C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 11)) - - export class ContextMenu extends EventManager { - >ContextMenu : Symbol(ContextMenu, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 14)) -->EventManager : Symbol(EventManager, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 12)) +@@= skipped -15, +15 lines =@@ + >EventManager : Symbol(EventManager, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 12)) name: string; ->name : Symbol(ContextMenu.name, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 13, 51)) diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.errors.txt deleted file mode 100644 index 574773b5a9..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -declFileWithInternalModuleNameConflictsInExtendsClause1.ts(8,33): error TS2694: Namespace 'X' has no exported member 'A'. - - -==== declFileWithInternalModuleNameConflictsInExtendsClause1.ts (1 errors) ==== - module X.A.C { - export interface Z { - } - } - module X.A.B.C { - module A { - } - export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict - ~ -!!! error TS2694: Namespace 'X' has no exported member 'A'. - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.errors.txt.diff deleted file mode 100644 index 64ee6e1474..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.declFileWithInternalModuleNameConflictsInExtendsClause1.errors.txt -+++ new.declFileWithInternalModuleNameConflictsInExtendsClause1.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+declFileWithInternalModuleNameConflictsInExtendsClause1.ts(8,33): error TS2694: Namespace 'X' has no exported member 'A'. -+ -+ -+==== declFileWithInternalModuleNameConflictsInExtendsClause1.ts (1 errors) ==== -+ module X.A.C { -+ export interface Z { -+ } -+ } -+ module X.A.B.C { -+ module A { -+ } -+ export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict -+ ~ -+!!! error TS2694: Namespace 'X' has no exported member 'A'. -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols index b286cba0ae..208d20a9ca 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols @@ -3,7 +3,7 @@ === declFileWithInternalModuleNameConflictsInExtendsClause1.ts === module X.A.C { >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 3, 1)) ->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11)) export interface Z { @@ -12,7 +12,7 @@ module X.A.C { } module X.A.B.C { >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 3, 1)) ->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) >B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 11)) >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 13)) @@ -21,6 +21,12 @@ module X.A.B.C { } export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict >W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 6, 5)) +>X.A.C.Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14)) +>X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11)) +>X.A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 3, 1)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) +>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11)) +>Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14)) } } diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols.diff index 07242cf242..50a9ff1be2 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols.diff @@ -1,33 +1,17 @@ --- old.declFileWithInternalModuleNameConflictsInExtendsClause1.symbols +++ new.declFileWithInternalModuleNameConflictsInExtendsClause1.symbols -@@= skipped -2, +2 lines =@@ - === declFileWithInternalModuleNameConflictsInExtendsClause1.ts === - module X.A.C { - >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 3, 1)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) -+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9)) - >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11)) - - export interface Z { -@@= skipped -9, +9 lines =@@ - } - module X.A.B.C { - >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 3, 1)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) -+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) - >B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 11)) - >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 13)) - -@@= skipped -9, +9 lines =@@ +@@= skipped -20, +20 lines =@@ } export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict >W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 6, 5)) ->X.A.C.Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14)) -->X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11)) -->X.A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) ++>X.A.C.Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14)) + >X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11)) + >X.A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 3, 1)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) -->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11)) + >A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9)) + >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11)) ->Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14)) ++>Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14)) } } diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.errors.txt deleted file mode 100644 index 6336d3fcf4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -declFileWithInternalModuleNameConflictsInExtendsClause2.ts(6,33): error TS2694: Namespace 'A' has no exported member 'C'. - - -==== declFileWithInternalModuleNameConflictsInExtendsClause2.ts (1 errors) ==== - module X.A.C { - export interface Z { - } - } - module X.A.B.C { - export class W implements A.C.Z { // This can refer to it as A.C.Z - ~ -!!! error TS2694: Namespace 'A' has no exported member 'C'. - } - } - - module X.A.B.C { - module A { - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.errors.txt.diff deleted file mode 100644 index 5a3e702056..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.declFileWithInternalModuleNameConflictsInExtendsClause2.errors.txt -+++ new.declFileWithInternalModuleNameConflictsInExtendsClause2.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+declFileWithInternalModuleNameConflictsInExtendsClause2.ts(6,33): error TS2694: Namespace 'A' has no exported member 'C'. -+ -+ -+==== declFileWithInternalModuleNameConflictsInExtendsClause2.ts (1 errors) ==== -+ module X.A.C { -+ export interface Z { -+ } -+ } -+ module X.A.B.C { -+ export class W implements A.C.Z { // This can refer to it as A.C.Z -+ ~ -+!!! error TS2694: Namespace 'A' has no exported member 'C'. -+ } -+ } -+ -+ module X.A.B.C { -+ module A { -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols index 860edbbb1d..d054415d3f 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols @@ -3,7 +3,7 @@ === declFileWithInternalModuleNameConflictsInExtendsClause2.ts === module X.A.C { >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 7, 1)) ->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11)) export interface Z { @@ -12,21 +12,25 @@ module X.A.C { } module X.A.B.C { >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 7, 1)) ->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9)) ->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 11)) ->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 13)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) +>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 11)) +>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 13)) export class W implements A.C.Z { // This can refer to it as A.C.Z >W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 16)) ->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9)) +>A.C.Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14)) +>A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) +>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11)) +>Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14)) } } module X.A.B.C { >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 7, 1)) ->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) ->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 11)) ->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 13)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) +>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 11)) +>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 13)) module A { >A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 16)) diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols.diff index 85b294b7a4..9b2829c17c 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols.diff @@ -1,44 +1,16 @@ --- old.declFileWithInternalModuleNameConflictsInExtendsClause2.symbols +++ new.declFileWithInternalModuleNameConflictsInExtendsClause2.symbols -@@= skipped -2, +2 lines =@@ - === declFileWithInternalModuleNameConflictsInExtendsClause2.ts === - module X.A.C { - >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 7, 1)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) -+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9)) - >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11)) - - export interface Z { -@@= skipped -9, +9 lines =@@ - } - module X.A.B.C { - >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 7, 1)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) -->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 11)) -->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 13)) -+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9)) -+>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 11)) -+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 13)) +@@= skipped -17, +17 lines =@@ export class W implements A.C.Z { // This can refer to it as A.C.Z >W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 16)) ->A.C.Z : Symbol(A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14)) -->A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) -->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11)) ++>A.C.Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14)) + >A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11)) + >A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) + >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11)) ->Z : Symbol(A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14)) -+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9)) ++>Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14)) } } - module X.A.B.C { - >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 7, 1)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) -->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 11)) -->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 13)) -+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9)) -+>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 11)) -+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 13)) - - module A { - >A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 16)) diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.errors.txt deleted file mode 100644 index 3bcf704da3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -declFileWithInternalModuleNameConflictsInExtendsClause3.ts(6,33): error TS2694: Namespace 'X' has no exported member 'A'. - - -==== declFileWithInternalModuleNameConflictsInExtendsClause3.ts (1 errors) ==== - module X.A.C { - export interface Z { - } - } - module X.A.B.C { - export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict - ~ -!!! error TS2694: Namespace 'X' has no exported member 'A'. - } - } - - module X.A.B.C { - export module A { - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.errors.txt.diff deleted file mode 100644 index 566901d333..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.declFileWithInternalModuleNameConflictsInExtendsClause3.errors.txt -+++ new.declFileWithInternalModuleNameConflictsInExtendsClause3.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+declFileWithInternalModuleNameConflictsInExtendsClause3.ts(6,33): error TS2694: Namespace 'X' has no exported member 'A'. -+ -+ -+==== declFileWithInternalModuleNameConflictsInExtendsClause3.ts (1 errors) ==== -+ module X.A.C { -+ export interface Z { -+ } -+ } -+ module X.A.B.C { -+ export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict -+ ~ -+!!! error TS2694: Namespace 'X' has no exported member 'A'. -+ } -+ } -+ -+ module X.A.B.C { -+ export module A { -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols index eb12542bf3..05266c7f07 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols @@ -3,7 +3,7 @@ === declFileWithInternalModuleNameConflictsInExtendsClause3.ts === module X.A.C { >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1)) ->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11)) export interface Z { @@ -12,21 +12,27 @@ module X.A.C { } module X.A.B.C { >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1)) ->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9)) ->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 11)) ->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 13)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) +>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 11)) +>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 13)) export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict >W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 16)) +>X.A.C.Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14)) +>X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11)) +>X.A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) +>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11)) +>Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14)) } } module X.A.B.C { >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1)) ->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) ->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 11)) ->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 13)) +>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) +>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 11)) +>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 13)) export module A { >A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 16)) diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols.diff index 9bd4d9d385..25c9f7f91b 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols.diff @@ -1,45 +1,18 @@ --- old.declFileWithInternalModuleNameConflictsInExtendsClause3.symbols +++ new.declFileWithInternalModuleNameConflictsInExtendsClause3.symbols -@@= skipped -2, +2 lines =@@ - === declFileWithInternalModuleNameConflictsInExtendsClause3.ts === - module X.A.C { - >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) -+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9)) - >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11)) - - export interface Z { -@@= skipped -9, +9 lines =@@ - } - module X.A.B.C { - >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) -->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 11)) -->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 13)) -+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9)) -+>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 11)) -+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 13)) +@@= skipped -17, +17 lines =@@ export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict >W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 16)) ->X.A.C.Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14)) -->X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11)) -->X.A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) ++>X.A.C.Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14)) + >X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11)) + >X.A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) -->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11)) + >A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) + >C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11)) ->Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14)) ++>Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14)) } } - module X.A.B.C { - >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1)) -->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) -->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 11)) -->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 13)) -+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9)) -+>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 11)) -+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 13)) - - export module A { - >A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 16)) diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.errors.txt deleted file mode 100644 index 4c1235ee10..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.errors.txt +++ /dev/null @@ -1,53 +0,0 @@ -declarationEmit_nameConflicts_0.ts(23,26): error TS2694: Namespace '"declarationEmit_nameConflicts_0".M' has no exported member 'P'. - - -==== declarationEmit_nameConflicts_0.ts (1 errors) ==== - import im = require('./declarationEmit_nameConflicts_1'); - export module M { - export function f() { } - export class C { } - export module N { - export function g() { }; - export interface I { } - } - - export import a = M.f; - export import b = M.C; - export import c = N; - export import d = im; - } - - export module M.P { - export function f() { } - export class C { } - export module N { - export function g() { }; - export interface I { } - } - export import im = M.P.f; - ~ -!!! error TS2694: Namespace '"declarationEmit_nameConflicts_0".M' has no exported member 'P'. - export var a = M.a; // emitted incorrectly as typeof f - export var b = M.b; // ok - export var c = M.c; // ok - export var g = M.c.g; // ok - export var d = M.d; // emitted incorrectly as typeof im - } - - export module M.Q { - export function f() { } - export class C { } - export module N { - export function g() { }; - export interface I { } - } - export interface b extends M.b { } // ok - export interface I extends M.c.I { } // ok - export module c { - export interface I extends M.c.I { } // ok - } - } -==== declarationEmit_nameConflicts_1.ts (0 errors) ==== - module f { export class c { } } - export = f; - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.errors.txt.diff deleted file mode 100644 index 19eb086c2b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.errors.txt.diff +++ /dev/null @@ -1,58 +0,0 @@ ---- old.declarationEmitNameConflicts.errors.txt -+++ new.declarationEmitNameConflicts.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+declarationEmit_nameConflicts_0.ts(23,26): error TS2694: Namespace '"declarationEmit_nameConflicts_0".M' has no exported member 'P'. -+ -+ -+==== declarationEmit_nameConflicts_0.ts (1 errors) ==== -+ import im = require('./declarationEmit_nameConflicts_1'); -+ export module M { -+ export function f() { } -+ export class C { } -+ export module N { -+ export function g() { }; -+ export interface I { } -+ } -+ -+ export import a = M.f; -+ export import b = M.C; -+ export import c = N; -+ export import d = im; -+ } -+ -+ export module M.P { -+ export function f() { } -+ export class C { } -+ export module N { -+ export function g() { }; -+ export interface I { } -+ } -+ export import im = M.P.f; -+ ~ -+!!! error TS2694: Namespace '"declarationEmit_nameConflicts_0".M' has no exported member 'P'. -+ export var a = M.a; // emitted incorrectly as typeof f -+ export var b = M.b; // ok -+ export var c = M.c; // ok -+ export var g = M.c.g; // ok -+ export var d = M.d; // emitted incorrectly as typeof im -+ } -+ -+ export module M.Q { -+ export function f() { } -+ export class C { } -+ export module N { -+ export function g() { }; -+ export interface I { } -+ } -+ export interface b extends M.b { } // ok -+ export interface I extends M.c.I { } // ok -+ export module c { -+ export interface I extends M.c.I { } // ok -+ } -+ } -+==== declarationEmit_nameConflicts_1.ts (0 errors) ==== -+ module f { export class c { } } -+ export = f; -+ diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols index 54a53f9b4a..523af29855 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols @@ -64,6 +64,8 @@ export module M.P { export import im = M.P.f; >im : Symbol(im, Decl(declarationEmit_nameConflicts_0.ts, 21, 5)) >M : Symbol(M, Decl(declarationEmit_nameConflicts_0.ts, 0, 57), Decl(declarationEmit_nameConflicts_0.ts, 13, 1), Decl(declarationEmit_nameConflicts_0.ts, 28, 1)) +>P : Symbol(P, Decl(declarationEmit_nameConflicts_0.ts, 15, 16)) +>f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 15, 19)) export var a = M.a; // emitted incorrectly as typeof f >a : Symbol(a, Decl(declarationEmit_nameConflicts_0.ts, 23, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols.diff index 29c6204d1c..72618f09e0 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols.diff @@ -1,15 +1,6 @@ --- old.declarationEmitNameConflicts.symbols +++ new.declarationEmitNameConflicts.symbols -@@= skipped -63, +63 lines =@@ - export import im = M.P.f; - >im : Symbol(im, Decl(declarationEmit_nameConflicts_0.ts, 21, 5)) - >M : Symbol(M, Decl(declarationEmit_nameConflicts_0.ts, 0, 57), Decl(declarationEmit_nameConflicts_0.ts, 13, 1), Decl(declarationEmit_nameConflicts_0.ts, 28, 1)) -->P : Symbol(P, Decl(declarationEmit_nameConflicts_0.ts, 15, 16)) -->f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 15, 19)) - - export var a = M.a; // emitted incorrectly as typeof f - >a : Symbol(a, Decl(declarationEmit_nameConflicts_0.ts, 23, 14)) -@@= skipped -23, +21 lines =@@ +@@= skipped -86, +86 lines =@@ export var g = M.c.g; // ok >g : Symbol(g, Decl(declarationEmit_nameConflicts_0.ts, 26, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.errors.txt deleted file mode 100644 index 9d86ede2b3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.errors.txt +++ /dev/null @@ -1,30 +0,0 @@ -declarationEmitNameConflicts2.ts(11,22): error TS2339: Property 'Y' does not exist on type 'typeof X'. -declarationEmitNameConflicts2.ts(12,22): error TS2339: Property 'Y' does not exist on type 'typeof X'. -declarationEmitNameConflicts2.ts(13,22): error TS2339: Property 'Y' does not exist on type 'typeof X'. -declarationEmitNameConflicts2.ts(14,22): error TS2339: Property 'Y' does not exist on type 'typeof X'. - - -==== declarationEmitNameConflicts2.ts (4 errors) ==== - module X.Y.base { - export function f() { } - export class C { } - export module M { - export var v; - } - export enum E { } - } - - module X.Y.base.Z { - export var f = X.Y.base.f; // Should be base.f - ~ -!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. - export var C = X.Y.base.C; // Should be base.C - ~ -!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. - export var M = X.Y.base.M; // Should be base.M - ~ -!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. - export var E = X.Y.base.E; // Should be base.E - ~ -!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.errors.txt.diff deleted file mode 100644 index f5edb594b2..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.errors.txt.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- old.declarationEmitNameConflicts2.errors.txt -+++ new.declarationEmitNameConflicts2.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+declarationEmitNameConflicts2.ts(11,22): error TS2339: Property 'Y' does not exist on type 'typeof X'. -+declarationEmitNameConflicts2.ts(12,22): error TS2339: Property 'Y' does not exist on type 'typeof X'. -+declarationEmitNameConflicts2.ts(13,22): error TS2339: Property 'Y' does not exist on type 'typeof X'. -+declarationEmitNameConflicts2.ts(14,22): error TS2339: Property 'Y' does not exist on type 'typeof X'. -+ -+ -+==== declarationEmitNameConflicts2.ts (4 errors) ==== -+ module X.Y.base { -+ export function f() { } -+ export class C { } -+ export module M { -+ export var v; -+ } -+ export enum E { } -+ } -+ -+ module X.Y.base.Z { -+ export var f = X.Y.base.f; // Should be base.f -+ ~ -+!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. -+ export var C = X.Y.base.C; // Should be base.C -+ ~ -+!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. -+ export var M = X.Y.base.M; // Should be base.M -+ ~ -+!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. -+ export var E = X.Y.base.E; // Should be base.E -+ ~ -+!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. -+ } diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols index 8da46e56b9..68def2e797 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols @@ -3,8 +3,8 @@ === declarationEmitNameConflicts2.ts === module X.Y.base { >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) ->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9)) ->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11)) +>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) +>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) export function f() { } >f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 17)) @@ -24,23 +24,47 @@ module X.Y.base { module X.Y.base.Z { >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) ->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 9, 9)) ->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 9, 11)) +>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) +>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) >Z : Symbol(Z, Decl(declarationEmitNameConflicts2.ts, 9, 16)) export var f = X.Y.base.f; // Should be base.f >f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 10, 14)) +>X.Y.base.f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 17)) +>X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) +>X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) +>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) +>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) +>f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 17)) export var C = X.Y.base.C; // Should be base.C >C : Symbol(C, Decl(declarationEmitNameConflicts2.ts, 11, 14)) +>X.Y.base.C : Symbol(C, Decl(declarationEmitNameConflicts2.ts, 1, 27)) +>X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) +>X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) +>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) +>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) +>C : Symbol(C, Decl(declarationEmitNameConflicts2.ts, 1, 27)) export var M = X.Y.base.M; // Should be base.M >M : Symbol(M, Decl(declarationEmitNameConflicts2.ts, 12, 14)) +>X.Y.base.M : Symbol(M, Decl(declarationEmitNameConflicts2.ts, 2, 22)) +>X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) +>X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) +>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) +>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) +>M : Symbol(M, Decl(declarationEmitNameConflicts2.ts, 2, 22)) export var E = X.Y.base.E; // Should be base.E >E : Symbol(E, Decl(declarationEmitNameConflicts2.ts, 13, 14)) +>X.Y.base.E : Symbol(E, Decl(declarationEmitNameConflicts2.ts, 5, 5)) +>X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) +>X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) +>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) +>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) +>E : Symbol(E, Decl(declarationEmitNameConflicts2.ts, 5, 5)) } diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols.diff deleted file mode 100644 index 6f2d3b8361..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols.diff +++ /dev/null @@ -1,63 +0,0 @@ ---- old.declarationEmitNameConflicts2.symbols -+++ new.declarationEmitNameConflicts2.symbols -@@= skipped -2, +2 lines =@@ - === declarationEmitNameConflicts2.ts === - module X.Y.base { - >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) -->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) -->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) -+>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9)) -+>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11)) - - export function f() { } - >f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 17)) -@@= skipped -21, +21 lines =@@ - - module X.Y.base.Z { - >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) -->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) -->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) -+>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 9, 9)) -+>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 9, 11)) - >Z : Symbol(Z, Decl(declarationEmitNameConflicts2.ts, 9, 16)) - - export var f = X.Y.base.f; // Should be base.f - >f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 10, 14)) -->X.Y.base.f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 17)) -->X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) -->X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) - >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) -->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) -->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) -->f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 17)) - - export var C = X.Y.base.C; // Should be base.C - >C : Symbol(C, Decl(declarationEmitNameConflicts2.ts, 11, 14)) -->X.Y.base.C : Symbol(C, Decl(declarationEmitNameConflicts2.ts, 1, 27)) -->X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) -->X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) - >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) -->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) -->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) -->C : Symbol(C, Decl(declarationEmitNameConflicts2.ts, 1, 27)) - - export var M = X.Y.base.M; // Should be base.M - >M : Symbol(M, Decl(declarationEmitNameConflicts2.ts, 12, 14)) -->X.Y.base.M : Symbol(M, Decl(declarationEmitNameConflicts2.ts, 2, 22)) -->X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) -->X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) - >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) -->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) -->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) -->M : Symbol(M, Decl(declarationEmitNameConflicts2.ts, 2, 22)) - - export var E = X.Y.base.E; // Should be base.E - >E : Symbol(E, Decl(declarationEmitNameConflicts2.ts, 13, 14)) -->X.Y.base.E : Symbol(E, Decl(declarationEmitNameConflicts2.ts, 5, 5)) -->X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) -->X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) - >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1)) -->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9)) -->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11)) -->E : Symbol(E, Decl(declarationEmitNameConflicts2.ts, 5, 5)) - } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt b/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt index 161e57599e..f60c698a5e 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt @@ -1,10 +1,8 @@ dottedModuleName.ts(3,29): error TS1144: '{' or ';' expected. dottedModuleName.ts(3,33): error TS2552: Cannot find name 'x'. Did you mean 'X'? -dottedModuleName.ts(5,22): error TS2304: Cannot find name 'v'. -dottedModuleName.ts(15,19): error TS2304: Cannot find name 'f'. -==== dottedModuleName.ts (4 errors) ==== +==== dottedModuleName.ts (2 errors) ==== module M { export module N { export function f(x:number)=>2*x; @@ -14,8 +12,6 @@ dottedModuleName.ts(15,19): error TS2304: Cannot find name 'f'. !!! error TS2552: Cannot find name 'x'. Did you mean 'X'? export module X.Y.Z { export var v2=f(v); - ~ -!!! error TS2304: Cannot find name 'v'. } } } @@ -26,8 +22,6 @@ dottedModuleName.ts(15,19): error TS2304: Cannot find name 'f'. export module X { export module Y.Z { export var v=f(10); - ~ -!!! error TS2304: Cannot find name 'f'. } } } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt.diff deleted file mode 100644 index 49e5a1c207..0000000000 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt.diff +++ /dev/null @@ -1,32 +0,0 @@ ---- old.dottedModuleName.errors.txt -+++ new.dottedModuleName.errors.txt -@@= skipped -0, +0 lines =@@ - dottedModuleName.ts(3,29): error TS1144: '{' or ';' expected. - dottedModuleName.ts(3,33): error TS2552: Cannot find name 'x'. Did you mean 'X'? -+dottedModuleName.ts(5,22): error TS2304: Cannot find name 'v'. -+dottedModuleName.ts(15,19): error TS2304: Cannot find name 'f'. - - --==== dottedModuleName.ts (2 errors) ==== -+==== dottedModuleName.ts (4 errors) ==== - module M { - export module N { - export function f(x:number)=>2*x; -@@= skipped -11, +13 lines =@@ - !!! error TS2552: Cannot find name 'x'. Did you mean 'X'? - export module X.Y.Z { - export var v2=f(v); -+ ~ -+!!! error TS2304: Cannot find name 'v'. - } - } - } -@@= skipped -10, +12 lines =@@ - export module X { - export module Y.Z { - export var v=f(10); -+ ~ -+!!! error TS2304: Cannot find name 'f'. - } - } - } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols b/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols index 23a706f653..f35c1db757 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols @@ -5,20 +5,21 @@ module M { >M : Symbol(M, Decl(dottedModuleName.ts, 0, 0), Decl(dottedModuleName.ts, 7, 1)) export module N { ->N : Symbol(N, Decl(dottedModuleName.ts, 0, 10)) +>N : Symbol(N, Decl(dottedModuleName.ts, 0, 10), Decl(dottedModuleName.ts, 11, 9)) export function f(x:number)=>2*x; >f : Symbol(f, Decl(dottedModuleName.ts, 1, 21)) >x : Symbol(x, Decl(dottedModuleName.ts, 2, 19)) export module X.Y.Z { ->X : Symbol(X, Decl(dottedModuleName.ts, 2, 34)) ->Y : Symbol(Y, Decl(dottedModuleName.ts, 3, 17)) ->Z : Symbol(Z, Decl(dottedModuleName.ts, 3, 19)) +>X : Symbol(X, Decl(dottedModuleName.ts, 2, 34), Decl(dottedModuleName.ts, 11, 12)) +>Y : Symbol(Y, Decl(dottedModuleName.ts, 3, 17), Decl(dottedModuleName.ts, 12, 21)) +>Z : Symbol(Z, Decl(dottedModuleName.ts, 3, 19), Decl(dottedModuleName.ts, 13, 17)) export var v2=f(v); >v2 : Symbol(v2, Decl(dottedModuleName.ts, 4, 15)) >f : Symbol(f, Decl(dottedModuleName.ts, 1, 21)) +>v : Symbol(v, Decl(dottedModuleName.ts, 14, 15)) } } } @@ -27,17 +28,18 @@ module M { module M.N { >M : Symbol(M, Decl(dottedModuleName.ts, 0, 0), Decl(dottedModuleName.ts, 7, 1)) ->N : Symbol(N, Decl(dottedModuleName.ts, 11, 9)) +>N : Symbol(N, Decl(dottedModuleName.ts, 0, 10), Decl(dottedModuleName.ts, 11, 9)) export module X { ->X : Symbol(X, Decl(dottedModuleName.ts, 11, 12)) +>X : Symbol(X, Decl(dottedModuleName.ts, 2, 34), Decl(dottedModuleName.ts, 11, 12)) export module Y.Z { ->Y : Symbol(Y, Decl(dottedModuleName.ts, 12, 21)) ->Z : Symbol(Z, Decl(dottedModuleName.ts, 13, 17)) +>Y : Symbol(Y, Decl(dottedModuleName.ts, 3, 17), Decl(dottedModuleName.ts, 12, 21)) +>Z : Symbol(Z, Decl(dottedModuleName.ts, 3, 19), Decl(dottedModuleName.ts, 13, 17)) export var v=f(10); >v : Symbol(v, Decl(dottedModuleName.ts, 14, 15)) +>f : Symbol(f, Decl(dottedModuleName.ts, 1, 21)) } } } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols.diff b/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols.diff deleted file mode 100644 index 36ba798ef8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols.diff +++ /dev/null @@ -1,51 +0,0 @@ ---- old.dottedModuleName.symbols -+++ new.dottedModuleName.symbols -@@= skipped -4, +4 lines =@@ - >M : Symbol(M, Decl(dottedModuleName.ts, 0, 0), Decl(dottedModuleName.ts, 7, 1)) - - export module N { -->N : Symbol(N, Decl(dottedModuleName.ts, 0, 10), Decl(dottedModuleName.ts, 11, 9)) -+>N : Symbol(N, Decl(dottedModuleName.ts, 0, 10)) - - export function f(x:number)=>2*x; - >f : Symbol(f, Decl(dottedModuleName.ts, 1, 21)) - >x : Symbol(x, Decl(dottedModuleName.ts, 2, 19)) - - export module X.Y.Z { -->X : Symbol(X, Decl(dottedModuleName.ts, 2, 34), Decl(dottedModuleName.ts, 11, 12)) -->Y : Symbol(Y, Decl(dottedModuleName.ts, 3, 17), Decl(dottedModuleName.ts, 12, 21)) -->Z : Symbol(Z, Decl(dottedModuleName.ts, 3, 19), Decl(dottedModuleName.ts, 13, 17)) -+>X : Symbol(X, Decl(dottedModuleName.ts, 2, 34)) -+>Y : Symbol(Y, Decl(dottedModuleName.ts, 3, 17)) -+>Z : Symbol(Z, Decl(dottedModuleName.ts, 3, 19)) - - export var v2=f(v); - >v2 : Symbol(v2, Decl(dottedModuleName.ts, 4, 15)) - >f : Symbol(f, Decl(dottedModuleName.ts, 1, 21)) -->v : Symbol(v, Decl(dottedModuleName.ts, 14, 15)) - } - } - } -@@= skipped -23, +22 lines =@@ - - module M.N { - >M : Symbol(M, Decl(dottedModuleName.ts, 0, 0), Decl(dottedModuleName.ts, 7, 1)) -->N : Symbol(N, Decl(dottedModuleName.ts, 0, 10), Decl(dottedModuleName.ts, 11, 9)) -+>N : Symbol(N, Decl(dottedModuleName.ts, 11, 9)) - - export module X { -->X : Symbol(X, Decl(dottedModuleName.ts, 2, 34), Decl(dottedModuleName.ts, 11, 12)) -+>X : Symbol(X, Decl(dottedModuleName.ts, 11, 12)) - - export module Y.Z { -->Y : Symbol(Y, Decl(dottedModuleName.ts, 3, 17), Decl(dottedModuleName.ts, 12, 21)) -->Z : Symbol(Z, Decl(dottedModuleName.ts, 3, 19), Decl(dottedModuleName.ts, 13, 17)) -+>Y : Symbol(Y, Decl(dottedModuleName.ts, 12, 21)) -+>Z : Symbol(Z, Decl(dottedModuleName.ts, 13, 17)) - - export var v=f(10); - >v : Symbol(v, Decl(dottedModuleName.ts, 14, 15)) -->f : Symbol(f, Decl(dottedModuleName.ts, 1, 21)) - } - } - } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.errors.txt b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.errors.txt deleted file mode 100644 index 7c3542ef28..0000000000 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.errors.txt +++ /dev/null @@ -1,55 +0,0 @@ -dottedModuleName2.ts(19,18): error TS2339: Property 'B' does not exist on type 'typeof A'. -dottedModuleName2.ts(38,19): error TS2694: Namespace 'A' has no exported member 'B'. -dottedModuleName2.ts(40,19): error TS2694: Namespace 'A' has no exported member 'B'. - - -==== dottedModuleName2.ts (3 errors) ==== - module A.B { - - export var x = 1; - - } - - - - module AA { export module B { - - export var x = 1; - - } } - - - - var tmpOK = AA.B.x; - - var tmpError = A.B.x; - ~ -!!! error TS2339: Property 'B' does not exist on type 'typeof A'. - - - module A.B.C - - { - - export var x = 1; - - } - - - - module M - - { - - import X1 = A; - - import X2 = A.B; - ~ -!!! error TS2694: Namespace 'A' has no exported member 'B'. - - import X3 = A.B.C; - ~ -!!! error TS2694: Namespace 'A' has no exported member 'B'. - - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.errors.txt.diff deleted file mode 100644 index a5bca41311..0000000000 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.errors.txt.diff +++ /dev/null @@ -1,60 +0,0 @@ ---- old.dottedModuleName2.errors.txt -+++ new.dottedModuleName2.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+dottedModuleName2.ts(19,18): error TS2339: Property 'B' does not exist on type 'typeof A'. -+dottedModuleName2.ts(38,19): error TS2694: Namespace 'A' has no exported member 'B'. -+dottedModuleName2.ts(40,19): error TS2694: Namespace 'A' has no exported member 'B'. -+ -+ -+==== dottedModuleName2.ts (3 errors) ==== -+ module A.B { -+ -+ export var x = 1; -+ -+ } -+ -+ -+ -+ module AA { export module B { -+ -+ export var x = 1; -+ -+ } } -+ -+ -+ -+ var tmpOK = AA.B.x; -+ -+ var tmpError = A.B.x; -+ ~ -+!!! error TS2339: Property 'B' does not exist on type 'typeof A'. -+ -+ -+ module A.B.C -+ -+ { -+ -+ export var x = 1; -+ -+ } -+ -+ -+ -+ module M -+ -+ { -+ -+ import X1 = A; -+ -+ import X2 = A.B; -+ ~ -+!!! error TS2694: Namespace 'A' has no exported member 'B'. -+ -+ import X3 = A.B.C; -+ ~ -+!!! error TS2694: Namespace 'A' has no exported member 'B'. -+ -+ } -+ diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols index e7c7328e44..e9af24c84e 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols @@ -3,7 +3,7 @@ === dottedModuleName2.ts === module A.B { >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ->B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9)) +>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) export var x = 1; >x : Symbol(x, Decl(dottedModuleName2.ts, 2, 12)) @@ -33,12 +33,16 @@ var tmpOK = AA.B.x; var tmpError = A.B.x; >tmpError : Symbol(tmpError, Decl(dottedModuleName2.ts, 18, 3)) +>A.B.x : Symbol(x, Decl(dottedModuleName2.ts, 2, 12)) +>A.B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) +>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +>x : Symbol(x, Decl(dottedModuleName2.ts, 2, 12)) module A.B.C >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ->B : Symbol(B, Decl(dottedModuleName2.ts, 21, 9)) +>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) >C : Symbol(C, Decl(dottedModuleName2.ts, 21, 11)) { @@ -62,10 +66,13 @@ module M import X2 = A.B; >X2 : Symbol(X2, Decl(dottedModuleName2.ts, 35, 18)) >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) +>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) import X3 = A.B.C; >X3 : Symbol(X3, Decl(dottedModuleName2.ts, 37, 20)) >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) +>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +>C : Symbol(C, Decl(dottedModuleName2.ts, 21, 11)) } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols.diff b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols.diff index 2571882066..50abaf6e6e 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols.diff @@ -1,15 +1,6 @@ --- old.dottedModuleName2.symbols +++ new.dottedModuleName2.symbols -@@= skipped -2, +2 lines =@@ - === dottedModuleName2.ts === - module A.B { - >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) -->B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) -+>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9)) - - export var x = 1; - >x : Symbol(x, Decl(dottedModuleName2.ts, 2, 12)) -@@= skipped -22, +22 lines =@@ +@@= skipped -24, +24 lines =@@ var tmpOK = AA.B.x; >tmpOK : Symbol(tmpOK, Decl(dottedModuleName2.ts, 16, 3)) @@ -27,19 +18,17 @@ >tmpError : Symbol(tmpError, Decl(dottedModuleName2.ts, 18, 3)) ->A.B.x : Symbol(A.B.x, Decl(dottedModuleName2.ts, 2, 12)) ->A.B : Symbol(A.B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) ++>A.B.x : Symbol(x, Decl(dottedModuleName2.ts, 2, 12)) ++>A.B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ->B : Symbol(A.B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) ->x : Symbol(A.B.x, Decl(dottedModuleName2.ts, 2, 12)) ++>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) ++>x : Symbol(x, Decl(dottedModuleName2.ts, 2, 12)) module A.B.C - >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) -->B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) -+>B : Symbol(B, Decl(dottedModuleName2.ts, 21, 9)) - >C : Symbol(C, Decl(dottedModuleName2.ts, 21, 11)) - - { -@@= skipped -36, +32 lines =@@ +@@= skipped -36, +36 lines =@@ import X1 = A; >X1 : Symbol(X1, Decl(dottedModuleName2.ts, 33, 1)) @@ -51,6 +40,7 @@ ->A : Symbol(X1, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ->B : Symbol(X1.B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +>A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ++>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) import X3 = A.B.C; >X3 : Symbol(X3, Decl(dottedModuleName2.ts, 37, 20)) @@ -58,6 +48,8 @@ ->B : Symbol(X1.B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) ->C : Symbol(X2.C, Decl(dottedModuleName2.ts, 21, 11)) +>A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ++>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) ++>C : Symbol(C, Decl(dottedModuleName2.ts, 21, 11)) } diff --git a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.errors.txt b/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.errors.txt deleted file mode 100644 index 5cb91ed391..0000000000 --- a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -dottedNamesInSystem.ts(6,14): error TS2339: Property 'B' does not exist on type 'typeof A'. - - -==== dottedNamesInSystem.ts (1 errors) ==== - export namespace A.B.C { - export function foo() {} - } - - export function bar() { - return A.B.C.foo(); - ~ -!!! error TS2339: Property 'B' does not exist on type 'typeof A'. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.errors.txt.diff deleted file mode 100644 index 8a7131f1d5..0000000000 --- a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.dottedNamesInSystem.errors.txt -+++ new.dottedNamesInSystem.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+dottedNamesInSystem.ts(6,14): error TS2339: Property 'B' does not exist on type 'typeof A'. -+ -+ -+==== dottedNamesInSystem.ts (1 errors) ==== -+ export namespace A.B.C { -+ export function foo() {} -+ } -+ -+ export function bar() { -+ return A.B.C.foo(); -+ ~ -+!!! error TS2339: Property 'B' does not exist on type 'typeof A'. -+ } diff --git a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.symbols b/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.symbols index c038d179c2..f92303162d 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.symbols +++ b/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.symbols @@ -14,5 +14,11 @@ export function bar() { >bar : Symbol(bar, Decl(dottedNamesInSystem.ts, 2, 1)) return A.B.C.foo(); +>A.B.C.foo : Symbol(foo, Decl(dottedNamesInSystem.ts, 0, 24)) +>A.B.C : Symbol(C, Decl(dottedNamesInSystem.ts, 0, 21)) +>A.B : Symbol(B, Decl(dottedNamesInSystem.ts, 0, 19)) >A : Symbol(A, Decl(dottedNamesInSystem.ts, 0, 0)) +>B : Symbol(B, Decl(dottedNamesInSystem.ts, 0, 19)) +>C : Symbol(C, Decl(dottedNamesInSystem.ts, 0, 21)) +>foo : Symbol(foo, Decl(dottedNamesInSystem.ts, 0, 24)) } diff --git a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.symbols.diff b/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.symbols.diff index 8e0082ea6d..e7a0d1e30d 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.symbols.diff @@ -7,8 +7,14 @@ ->A.B.C.foo : Symbol(A.B.C.foo, Decl(dottedNamesInSystem.ts, 0, 24)) ->A.B.C : Symbol(A.B.C, Decl(dottedNamesInSystem.ts, 0, 21)) ->A.B : Symbol(A.B, Decl(dottedNamesInSystem.ts, 0, 19)) ++>A.B.C.foo : Symbol(foo, Decl(dottedNamesInSystem.ts, 0, 24)) ++>A.B.C : Symbol(C, Decl(dottedNamesInSystem.ts, 0, 21)) ++>A.B : Symbol(B, Decl(dottedNamesInSystem.ts, 0, 19)) >A : Symbol(A, Decl(dottedNamesInSystem.ts, 0, 0)) ->B : Symbol(A.B, Decl(dottedNamesInSystem.ts, 0, 19)) ->C : Symbol(A.B.C, Decl(dottedNamesInSystem.ts, 0, 21)) ->foo : Symbol(A.B.C.foo, Decl(dottedNamesInSystem.ts, 0, 24)) ++>B : Symbol(B, Decl(dottedNamesInSystem.ts, 0, 19)) ++>C : Symbol(C, Decl(dottedNamesInSystem.ts, 0, 21)) ++>foo : Symbol(foo, Decl(dottedNamesInSystem.ts, 0, 24)) } diff --git a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.errors.txt b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.errors.txt deleted file mode 100644 index bf4331e06f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.errors.txt +++ /dev/null @@ -1,28 +0,0 @@ -emitMemberAccessExpression_file2.ts(6,29): error TS2339: Property 'KnockoutExtentions' does not exist on type 'typeof Model'. - - -==== emitMemberAccessExpression_file3.ts (0 errors) ==== - /// - /// - declare var OData: any; - module Microsoft.PeopleAtWork.Model { - export class KnockoutExtentions { - } - } -==== emitMemberAccessExpression_file1.ts (0 errors) ==== - /// - "use strict"; - -==== emitMemberAccessExpression_file2.ts (1 errors) ==== - /// - "use strict"; - module Microsoft.PeopleAtWork.Model { - export class _Person { - public populate(raw: any) { - var res = Model.KnockoutExtentions; - ~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'KnockoutExtentions' does not exist on type 'typeof Model'. - } - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.errors.txt.diff deleted file mode 100644 index 3952a62565..0000000000 --- a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.errors.txt.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- old.emitMemberAccessExpression.errors.txt -+++ new.emitMemberAccessExpression.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+emitMemberAccessExpression_file2.ts(6,29): error TS2339: Property 'KnockoutExtentions' does not exist on type 'typeof Model'. -+ -+ -+==== emitMemberAccessExpression_file3.ts (0 errors) ==== -+ /// -+ /// -+ declare var OData: any; -+ module Microsoft.PeopleAtWork.Model { -+ export class KnockoutExtentions { -+ } -+ } -+==== emitMemberAccessExpression_file1.ts (0 errors) ==== -+ /// -+ "use strict"; -+ -+==== emitMemberAccessExpression_file2.ts (1 errors) ==== -+ /// -+ "use strict"; -+ module Microsoft.PeopleAtWork.Model { -+ export class _Person { -+ public populate(raw: any) { -+ var res = Model.KnockoutExtentions; -+ ~~~~~~~~~~~~~~~~~~ -+!!! error TS2339: Property 'KnockoutExtentions' does not exist on type 'typeof Model'. -+ } -+ } -+ } -+ diff --git a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols index dfd9a41390..e34b77ca68 100644 --- a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols +++ b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols @@ -8,8 +8,8 @@ declare var OData: any; module Microsoft.PeopleAtWork.Model { >Microsoft : Symbol(Microsoft, Decl(emitMemberAccessExpression_file2.ts, 1, 13), Decl(emitMemberAccessExpression_file3.ts, 2, 23)) ->PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file3.ts, 3, 17)) ->Model : Symbol(Model, Decl(emitMemberAccessExpression_file3.ts, 3, 30)) +>PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file2.ts, 2, 17), Decl(emitMemberAccessExpression_file3.ts, 3, 17)) +>Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30), Decl(emitMemberAccessExpression_file3.ts, 3, 30)) export class KnockoutExtentions { >KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 37)) @@ -25,8 +25,8 @@ module Microsoft.PeopleAtWork.Model { "use strict"; module Microsoft.PeopleAtWork.Model { >Microsoft : Symbol(Microsoft, Decl(emitMemberAccessExpression_file2.ts, 1, 13), Decl(emitMemberAccessExpression_file3.ts, 2, 23)) ->PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file2.ts, 2, 17)) ->Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30)) +>PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file2.ts, 2, 17), Decl(emitMemberAccessExpression_file3.ts, 3, 17)) +>Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30), Decl(emitMemberAccessExpression_file3.ts, 3, 30)) export class _Person { >_Person : Symbol(_Person, Decl(emitMemberAccessExpression_file2.ts, 2, 37)) @@ -37,7 +37,9 @@ module Microsoft.PeopleAtWork.Model { var res = Model.KnockoutExtentions; >res : Symbol(res, Decl(emitMemberAccessExpression_file2.ts, 5, 15)) ->Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30)) +>Model.KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 37)) +>Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30), Decl(emitMemberAccessExpression_file3.ts, 3, 30)) +>KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 37)) } } } diff --git a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols.diff b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols.diff index 2ed35a4324..256bc71048 100644 --- a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols.diff @@ -1,26 +1,6 @@ --- old.emitMemberAccessExpression.symbols +++ new.emitMemberAccessExpression.symbols -@@= skipped -7, +7 lines =@@ - - module Microsoft.PeopleAtWork.Model { - >Microsoft : Symbol(Microsoft, Decl(emitMemberAccessExpression_file2.ts, 1, 13), Decl(emitMemberAccessExpression_file3.ts, 2, 23)) -->PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file2.ts, 2, 17), Decl(emitMemberAccessExpression_file3.ts, 3, 17)) -->Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30), Decl(emitMemberAccessExpression_file3.ts, 3, 30)) -+>PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file3.ts, 3, 17)) -+>Model : Symbol(Model, Decl(emitMemberAccessExpression_file3.ts, 3, 30)) - - export class KnockoutExtentions { - >KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 37)) -@@= skipped -17, +17 lines =@@ - "use strict"; - module Microsoft.PeopleAtWork.Model { - >Microsoft : Symbol(Microsoft, Decl(emitMemberAccessExpression_file2.ts, 1, 13), Decl(emitMemberAccessExpression_file3.ts, 2, 23)) -->PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file2.ts, 2, 17), Decl(emitMemberAccessExpression_file3.ts, 3, 17)) -->Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30), Decl(emitMemberAccessExpression_file3.ts, 3, 30)) -+>PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file2.ts, 2, 17)) -+>Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30)) - - export class _Person { +@@= skipped -31, +31 lines =@@ >_Person : Symbol(_Person, Decl(emitMemberAccessExpression_file2.ts, 2, 37)) public populate(raw: any) { @@ -29,11 +9,3 @@ >raw : Symbol(raw, Decl(emitMemberAccessExpression_file2.ts, 4, 24)) var res = Model.KnockoutExtentions; - >res : Symbol(res, Decl(emitMemberAccessExpression_file2.ts, 5, 15)) -->Model.KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 37)) -->Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30), Decl(emitMemberAccessExpression_file3.ts, 3, 30)) -->KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 37)) -+>Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30)) - } - } - } diff --git a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.errors.txt b/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.errors.txt deleted file mode 100644 index cae3f731e3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.errors.txt +++ /dev/null @@ -1,79 +0,0 @@ -exportImportCanSubstituteConstEnumForValue.ts(14,29): error TS2694: Namespace 'MsPortalFx' has no exported member 'ViewModels'. -exportImportCanSubstituteConstEnumForValue.ts(36,36): error TS2304: Cannot find name 'Dialogs'. -exportImportCanSubstituteConstEnumForValue.ts(36,36): error TS2503: Cannot find namespace 'Dialogs'. -exportImportCanSubstituteConstEnumForValue.ts(41,28): error TS2503: Cannot find namespace 'Dialogs'. -exportImportCanSubstituteConstEnumForValue.ts(46,30): error TS2304: Cannot find name 'Dialogs'. -exportImportCanSubstituteConstEnumForValue.ts(46,30): error TS2503: Cannot find namespace 'Dialogs'. - - -==== exportImportCanSubstituteConstEnumForValue.ts (6 errors) ==== - module MsPortalFx.ViewModels.Dialogs { - - export const enum DialogResult { - Abort, - Cancel, - Ignore, - No, - Ok, - Retry, - Yes, - } - - export interface DialogResultCallback { - (result: MsPortalFx.ViewModels.Dialogs.DialogResult): void; - ~~~~~~~~~~ -!!! error TS2694: Namespace 'MsPortalFx' has no exported member 'ViewModels'. - } - - export function someExportedFunction() { - } - - export const enum MessageBoxButtons { - AbortRetryIgnore, - OK, - OKCancel, - RetryCancel, - YesNo, - YesNoCancel, - } - } - - - module MsPortalFx.ViewModels { - - /** - * For some reason javascript code is emitted for this re-exported const enum. - */ - export import ReExportedEnum = Dialogs.DialogResult; - ~~~~~~~ -!!! error TS2304: Cannot find name 'Dialogs'. - ~~~~~~~ -!!! error TS2503: Cannot find namespace 'Dialogs'. - - /** - * Not exported to show difference. No javascript is emmitted (as expected) - */ - import DialogButtons = Dialogs.MessageBoxButtons; - ~~~~~~~ -!!! error TS2503: Cannot find namespace 'Dialogs'. - - /** - * Re-exporting a function type to show difference. No javascript is emmitted (as expected) - */ - export import Callback = Dialogs.DialogResultCallback; - ~~~~~~~ -!!! error TS2304: Cannot find name 'Dialogs'. - ~~~~~~~ -!!! error TS2503: Cannot find namespace 'Dialogs'. - - export class SomeUsagesOfTheseConsts { - constructor() { - // these do get replaced by the const value - const value1 = ReExportedEnum.Cancel; - console.log(value1); - const value2 = DialogButtons.OKCancel; - console.log(value2); - } - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.errors.txt.diff deleted file mode 100644 index 06a79e0ad5..0000000000 --- a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.errors.txt.diff +++ /dev/null @@ -1,84 +0,0 @@ ---- old.exportImportCanSubstituteConstEnumForValue.errors.txt -+++ new.exportImportCanSubstituteConstEnumForValue.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+exportImportCanSubstituteConstEnumForValue.ts(14,29): error TS2694: Namespace 'MsPortalFx' has no exported member 'ViewModels'. -+exportImportCanSubstituteConstEnumForValue.ts(36,36): error TS2304: Cannot find name 'Dialogs'. -+exportImportCanSubstituteConstEnumForValue.ts(36,36): error TS2503: Cannot find namespace 'Dialogs'. -+exportImportCanSubstituteConstEnumForValue.ts(41,28): error TS2503: Cannot find namespace 'Dialogs'. -+exportImportCanSubstituteConstEnumForValue.ts(46,30): error TS2304: Cannot find name 'Dialogs'. -+exportImportCanSubstituteConstEnumForValue.ts(46,30): error TS2503: Cannot find namespace 'Dialogs'. -+ -+ -+==== exportImportCanSubstituteConstEnumForValue.ts (6 errors) ==== -+ module MsPortalFx.ViewModels.Dialogs { -+ -+ export const enum DialogResult { -+ Abort, -+ Cancel, -+ Ignore, -+ No, -+ Ok, -+ Retry, -+ Yes, -+ } -+ -+ export interface DialogResultCallback { -+ (result: MsPortalFx.ViewModels.Dialogs.DialogResult): void; -+ ~~~~~~~~~~ -+!!! error TS2694: Namespace 'MsPortalFx' has no exported member 'ViewModels'. -+ } -+ -+ export function someExportedFunction() { -+ } -+ -+ export const enum MessageBoxButtons { -+ AbortRetryIgnore, -+ OK, -+ OKCancel, -+ RetryCancel, -+ YesNo, -+ YesNoCancel, -+ } -+ } -+ -+ -+ module MsPortalFx.ViewModels { -+ -+ /** -+ * For some reason javascript code is emitted for this re-exported const enum. -+ */ -+ export import ReExportedEnum = Dialogs.DialogResult; -+ ~~~~~~~ -+!!! error TS2304: Cannot find name 'Dialogs'. -+ ~~~~~~~ -+!!! error TS2503: Cannot find namespace 'Dialogs'. -+ -+ /** -+ * Not exported to show difference. No javascript is emmitted (as expected) -+ */ -+ import DialogButtons = Dialogs.MessageBoxButtons; -+ ~~~~~~~ -+!!! error TS2503: Cannot find namespace 'Dialogs'. -+ -+ /** -+ * Re-exporting a function type to show difference. No javascript is emmitted (as expected) -+ */ -+ export import Callback = Dialogs.DialogResultCallback; -+ ~~~~~~~ -+!!! error TS2304: Cannot find name 'Dialogs'. -+ ~~~~~~~ -+!!! error TS2503: Cannot find namespace 'Dialogs'. -+ -+ export class SomeUsagesOfTheseConsts { -+ constructor() { -+ // these do get replaced by the const value -+ const value1 = ReExportedEnum.Cancel; -+ console.log(value1); -+ const value2 = DialogButtons.OKCancel; -+ console.log(value2); -+ } -+ } -+ } -+ diff --git a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.symbols b/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.symbols index 2c8fe6ffe1..08c926268d 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.symbols @@ -3,7 +3,7 @@ === exportImportCanSubstituteConstEnumForValue.ts === module MsPortalFx.ViewModels.Dialogs { >MsPortalFx : Symbol(MsPortalFx, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 0), Decl(exportImportCanSubstituteConstEnumForValue.ts, 27, 1)) ->ViewModels : Symbol(ViewModels, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 18)) +>ViewModels : Symbol(ViewModels, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 18), Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 18)) >Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) export const enum DialogResult { @@ -37,9 +37,9 @@ module MsPortalFx.ViewModels.Dialogs { (result: MsPortalFx.ViewModels.Dialogs.DialogResult): void; >result : Symbol(result, Decl(exportImportCanSubstituteConstEnumForValue.ts, 13, 9)) >MsPortalFx : Symbol(MsPortalFx, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 0), Decl(exportImportCanSubstituteConstEnumForValue.ts, 27, 1)) ->ViewModels : Symbol(ViewModels) ->Dialogs : Symbol(Dialogs) ->DialogResult : Symbol(DialogResult) +>ViewModels : Symbol(ViewModels, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 18), Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 18)) +>Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) +>DialogResult : Symbol(DialogResult, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 38)) } export function someExportedFunction() { @@ -72,25 +72,31 @@ module MsPortalFx.ViewModels.Dialogs { module MsPortalFx.ViewModels { >MsPortalFx : Symbol(MsPortalFx, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 0), Decl(exportImportCanSubstituteConstEnumForValue.ts, 27, 1)) ->ViewModels : Symbol(ViewModels, Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 18)) +>ViewModels : Symbol(ViewModels, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 18), Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 18)) /** * For some reason javascript code is emitted for this re-exported const enum. */ export import ReExportedEnum = Dialogs.DialogResult; >ReExportedEnum : Symbol(ReExportedEnum, Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 30)) +>Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) +>DialogResult : Symbol(DialogResult, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 38)) /** * Not exported to show difference. No javascript is emmitted (as expected) */ import DialogButtons = Dialogs.MessageBoxButtons; >DialogButtons : Symbol(DialogButtons, Decl(exportImportCanSubstituteConstEnumForValue.ts, 35, 56)) +>Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) +>MessageBoxButtons : Symbol(MessageBoxButtons, Decl(exportImportCanSubstituteConstEnumForValue.ts, 17, 5)) /** * Re-exporting a function type to show difference. No javascript is emmitted (as expected) */ export import Callback = Dialogs.DialogResultCallback; >Callback : Symbol(Callback, Decl(exportImportCanSubstituteConstEnumForValue.ts, 40, 53)) +>Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) +>DialogResultCallback : Symbol(DialogResultCallback, Decl(exportImportCanSubstituteConstEnumForValue.ts, 10, 5)) export class SomeUsagesOfTheseConsts { >SomeUsagesOfTheseConsts : Symbol(SomeUsagesOfTheseConsts, Decl(exportImportCanSubstituteConstEnumForValue.ts, 45, 58)) @@ -99,7 +105,9 @@ module MsPortalFx.ViewModels { // these do get replaced by the const value const value1 = ReExportedEnum.Cancel; >value1 : Symbol(value1, Decl(exportImportCanSubstituteConstEnumForValue.ts, 50, 17)) +>ReExportedEnum.Cancel : Symbol(Cancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 3, 14)) >ReExportedEnum : Symbol(ReExportedEnum, Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 30)) +>Cancel : Symbol(Cancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 3, 14)) console.log(value1); >console.log : Symbol(log, Decl(lib.dom.d.ts, --, --)) @@ -109,7 +117,9 @@ module MsPortalFx.ViewModels { const value2 = DialogButtons.OKCancel; >value2 : Symbol(value2, Decl(exportImportCanSubstituteConstEnumForValue.ts, 52, 17)) +>DialogButtons.OKCancel : Symbol(OKCancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 21, 11)) >DialogButtons : Symbol(DialogButtons, Decl(exportImportCanSubstituteConstEnumForValue.ts, 35, 56)) +>OKCancel : Symbol(OKCancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 21, 11)) console.log(value2); >console.log : Symbol(log, Decl(lib.dom.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.symbols.diff b/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.symbols.diff index f92ef1342d..045c6067de 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.symbols.diff @@ -1,14 +1,6 @@ --- old.exportImportCanSubstituteConstEnumForValue.symbols +++ new.exportImportCanSubstituteConstEnumForValue.symbols -@@= skipped -2, +2 lines =@@ - === exportImportCanSubstituteConstEnumForValue.ts === - module MsPortalFx.ViewModels.Dialogs { - >MsPortalFx : Symbol(MsPortalFx, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 0), Decl(exportImportCanSubstituteConstEnumForValue.ts, 27, 1)) -->ViewModels : Symbol(ViewModels, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 18), Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 18)) -+>ViewModels : Symbol(ViewModels, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 18)) - >Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) - - export const enum DialogResult { +@@= skipped -9, +9 lines =@@ >DialogResult : Symbol(DialogResult, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 38)) Abort, @@ -41,20 +33,7 @@ } export interface DialogResultCallback { -@@= skipped -34, +34 lines =@@ - (result: MsPortalFx.ViewModels.Dialogs.DialogResult): void; - >result : Symbol(result, Decl(exportImportCanSubstituteConstEnumForValue.ts, 13, 9)) - >MsPortalFx : Symbol(MsPortalFx, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 0), Decl(exportImportCanSubstituteConstEnumForValue.ts, 27, 1)) -->ViewModels : Symbol(ViewModels, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 18), Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 18)) -->Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) -->DialogResult : Symbol(DialogResult, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 38)) -+>ViewModels : Symbol(ViewModels) -+>Dialogs : Symbol(Dialogs) -+>DialogResult : Symbol(DialogResult) - } - - export function someExportedFunction() { -@@= skipped -13, +13 lines =@@ +@@= skipped -40, +40 lines =@@ >MessageBoxButtons : Symbol(MessageBoxButtons, Decl(exportImportCanSubstituteConstEnumForValue.ts, 17, 5)) AbortRetryIgnore, @@ -83,45 +62,42 @@ } } - - module MsPortalFx.ViewModels { - >MsPortalFx : Symbol(MsPortalFx, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 0), Decl(exportImportCanSubstituteConstEnumForValue.ts, 27, 1)) -->ViewModels : Symbol(ViewModels, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 18), Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 18)) -+>ViewModels : Symbol(ViewModels, Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 18)) - - /** - * For some reason javascript code is emitted for this re-exported const enum. - */ +@@= skipped -30, +30 lines =@@ export import ReExportedEnum = Dialogs.DialogResult; >ReExportedEnum : Symbol(ReExportedEnum, Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 30)) -->Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) + >Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) ->DialogResult : Symbol(ReExportedEnum, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 38)) ++>DialogResult : Symbol(DialogResult, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 38)) /** * Not exported to show difference. No javascript is emmitted (as expected) - */ +@@= skipped -8, +8 lines =@@ import DialogButtons = Dialogs.MessageBoxButtons; >DialogButtons : Symbol(DialogButtons, Decl(exportImportCanSubstituteConstEnumForValue.ts, 35, 56)) -->Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) + >Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) ->MessageBoxButtons : Symbol(DialogButtons, Decl(exportImportCanSubstituteConstEnumForValue.ts, 17, 5)) ++>MessageBoxButtons : Symbol(MessageBoxButtons, Decl(exportImportCanSubstituteConstEnumForValue.ts, 17, 5)) /** * Re-exporting a function type to show difference. No javascript is emmitted (as expected) - */ +@@= skipped -8, +8 lines =@@ export import Callback = Dialogs.DialogResultCallback; >Callback : Symbol(Callback, Decl(exportImportCanSubstituteConstEnumForValue.ts, 40, 53)) -->Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) + >Dialogs : Symbol(Dialogs, Decl(exportImportCanSubstituteConstEnumForValue.ts, 0, 29)) ->DialogResultCallback : Symbol(Callback, Decl(exportImportCanSubstituteConstEnumForValue.ts, 10, 5)) ++>DialogResultCallback : Symbol(DialogResultCallback, Decl(exportImportCanSubstituteConstEnumForValue.ts, 10, 5)) export class SomeUsagesOfTheseConsts { >SomeUsagesOfTheseConsts : Symbol(SomeUsagesOfTheseConsts, Decl(exportImportCanSubstituteConstEnumForValue.ts, 45, 58)) -@@= skipped -55, +49 lines =@@ +@@= skipped -9, +9 lines =@@ // these do get replaced by the const value const value1 = ReExportedEnum.Cancel; >value1 : Symbol(value1, Decl(exportImportCanSubstituteConstEnumForValue.ts, 50, 17)) ->ReExportedEnum.Cancel : Symbol(ReExportedEnum.Cancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 3, 14)) ++>ReExportedEnum.Cancel : Symbol(Cancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 3, 14)) >ReExportedEnum : Symbol(ReExportedEnum, Decl(exportImportCanSubstituteConstEnumForValue.ts, 30, 30)) ->Cancel : Symbol(ReExportedEnum.Cancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 3, 14)) ++>Cancel : Symbol(Cancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 3, 14)) console.log(value1); ->console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) @@ -134,8 +110,10 @@ const value2 = DialogButtons.OKCancel; >value2 : Symbol(value2, Decl(exportImportCanSubstituteConstEnumForValue.ts, 52, 17)) ->DialogButtons.OKCancel : Symbol(DialogButtons.OKCancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 21, 11)) ++>DialogButtons.OKCancel : Symbol(OKCancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 21, 11)) >DialogButtons : Symbol(DialogButtons, Decl(exportImportCanSubstituteConstEnumForValue.ts, 35, 56)) ->OKCancel : Symbol(DialogButtons.OKCancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 21, 11)) ++>OKCancel : Symbol(OKCancel, Decl(exportImportCanSubstituteConstEnumForValue.ts, 21, 11)) console.log(value2); ->console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.errors.txt b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.errors.txt deleted file mode 100644 index 0e3f702747..0000000000 --- a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -functionMergedWithModule.ts(12,9): error TS2304: Cannot find name 'Bar'. - - -==== functionMergedWithModule.ts (1 errors) ==== - function foo(title: string) { - var x = 10; - } - - module foo.Bar { - export function f() { - } - } - - module foo.Baz { - export function g() { - Bar.f(); - ~~~ -!!! error TS2304: Cannot find name 'Bar'. - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.errors.txt.diff deleted file mode 100644 index 888adbfcc8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.errors.txt.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- old.functionMergedWithModule.errors.txt -+++ new.functionMergedWithModule.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+functionMergedWithModule.ts(12,9): error TS2304: Cannot find name 'Bar'. -+ -+ -+==== functionMergedWithModule.ts (1 errors) ==== -+ function foo(title: string) { -+ var x = 10; -+ } -+ -+ module foo.Bar { -+ export function f() { -+ } -+ } -+ -+ module foo.Baz { -+ export function g() { -+ Bar.f(); -+ ~~~ -+!!! error TS2304: Cannot find name 'Bar'. -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols index 3ef91f6e0d..9e33349356 100644 --- a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols @@ -26,5 +26,8 @@ module foo.Baz { >g : Symbol(g, Decl(functionMergedWithModule.ts, 9, 16)) Bar.f(); +>Bar.f : Symbol(f, Decl(functionMergedWithModule.ts, 4, 16)) +>Bar : Symbol(Bar, Decl(functionMergedWithModule.ts, 4, 11)) +>f : Symbol(f, Decl(functionMergedWithModule.ts, 4, 16)) } } diff --git a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols.diff b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols.diff index 5319522ed8..97b39774ef 100644 --- a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols.diff @@ -5,7 +5,9 @@ Bar.f(); ->Bar.f : Symbol(Bar.f, Decl(functionMergedWithModule.ts, 4, 16)) -->Bar : Symbol(Bar, Decl(functionMergedWithModule.ts, 4, 11)) ++>Bar.f : Symbol(f, Decl(functionMergedWithModule.ts, 4, 16)) + >Bar : Symbol(Bar, Decl(functionMergedWithModule.ts, 4, 11)) ->f : Symbol(Bar.f, Decl(functionMergedWithModule.ts, 4, 16)) ++>f : Symbol(f, Decl(functionMergedWithModule.ts, 4, 16)) } } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.errors.txt b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.errors.txt deleted file mode 100644 index 583a9eef85..0000000000 --- a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.errors.txt +++ /dev/null @@ -1,90 +0,0 @@ -genericClassPropertyInheritanceSpecialization.ts(55,51): error TS2339: Property 'Controls' does not exist on type 'typeof Portal'. -genericClassPropertyInheritanceSpecialization.ts(66,50): error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. -genericClassPropertyInheritanceSpecialization.ts(72,57): error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. -genericClassPropertyInheritanceSpecialization.ts(72,137): error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. - - -==== genericClassPropertyInheritanceSpecialization.ts (4 errors) ==== - interface KnockoutObservableBase { - peek(): T; - (): T; - (value: T): void; - } - - interface KnockoutObservable extends KnockoutObservableBase { - equalityComparer(a: T, b: T): boolean; - valueHasMutated(): void; - valueWillMutate(): void; - } - - interface KnockoutObservableArray extends KnockoutObservable { - indexOf(searchElement: T, fromIndex?: number): number; - slice(start: number, end?: number): T[]; - splice(start: number, deleteCount?: number, ...items: T[]): T[]; - pop(): T; - push(...items: T[]): void; - shift(): T; - unshift(...items: T[]): number; - reverse(): T[]; - sort(compareFunction?: (a: T, b: T) => number): void; - replace(oldItem: T, newItem: T): void; - remove(item: T): T[]; - removeAll(items?: T[]): T[]; - destroy(item: T): void; - destroyAll(items?: T[]): void; - } - - interface KnockoutObservableArrayStatic { - fn: KnockoutObservableArray; - - (value?: T[]): KnockoutObservableArray; - } - - declare module ko { - export var observableArray: KnockoutObservableArrayStatic; - } - - module Portal.Controls.Validators { - - export class Validator { - private _subscription; - public message: KnockoutObservable; - public validationState: KnockoutObservable; - public validate: KnockoutObservable; - constructor(message?: string) { } - public destroy(): void { } - public _validate(value: TValue): number {return 0 } - } - } - - module PortalFx.ViewModels.Controls.Validators { - - export class Validator extends Portal.Controls.Validators.Validator { - ~~~~~~~~ -!!! error TS2339: Property 'Controls' does not exist on type 'typeof Portal'. - - constructor(message?: string) { - super(message); - } - } - - } - - interface Contract { - - validators: KnockoutObservableArray>; - ~~~~~~~~~~ -!!! error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. - } - - - class ViewModel implements Contract { - - public validators: KnockoutObservableArray> = ko.observableArray>(); - ~~~~~~~~~~ -!!! error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. - ~~~~~~~~~~ -!!! error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. - } - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.errors.txt.diff deleted file mode 100644 index 4dc252dd1a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.errors.txt.diff +++ /dev/null @@ -1,95 +0,0 @@ ---- old.genericClassPropertyInheritanceSpecialization.errors.txt -+++ new.genericClassPropertyInheritanceSpecialization.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+genericClassPropertyInheritanceSpecialization.ts(55,51): error TS2339: Property 'Controls' does not exist on type 'typeof Portal'. -+genericClassPropertyInheritanceSpecialization.ts(66,50): error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. -+genericClassPropertyInheritanceSpecialization.ts(72,57): error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. -+genericClassPropertyInheritanceSpecialization.ts(72,137): error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. -+ -+ -+==== genericClassPropertyInheritanceSpecialization.ts (4 errors) ==== -+ interface KnockoutObservableBase { -+ peek(): T; -+ (): T; -+ (value: T): void; -+ } -+ -+ interface KnockoutObservable extends KnockoutObservableBase { -+ equalityComparer(a: T, b: T): boolean; -+ valueHasMutated(): void; -+ valueWillMutate(): void; -+ } -+ -+ interface KnockoutObservableArray extends KnockoutObservable { -+ indexOf(searchElement: T, fromIndex?: number): number; -+ slice(start: number, end?: number): T[]; -+ splice(start: number, deleteCount?: number, ...items: T[]): T[]; -+ pop(): T; -+ push(...items: T[]): void; -+ shift(): T; -+ unshift(...items: T[]): number; -+ reverse(): T[]; -+ sort(compareFunction?: (a: T, b: T) => number): void; -+ replace(oldItem: T, newItem: T): void; -+ remove(item: T): T[]; -+ removeAll(items?: T[]): T[]; -+ destroy(item: T): void; -+ destroyAll(items?: T[]): void; -+ } -+ -+ interface KnockoutObservableArrayStatic { -+ fn: KnockoutObservableArray; -+ -+ (value?: T[]): KnockoutObservableArray; -+ } -+ -+ declare module ko { -+ export var observableArray: KnockoutObservableArrayStatic; -+ } -+ -+ module Portal.Controls.Validators { -+ -+ export class Validator { -+ private _subscription; -+ public message: KnockoutObservable; -+ public validationState: KnockoutObservable; -+ public validate: KnockoutObservable; -+ constructor(message?: string) { } -+ public destroy(): void { } -+ public _validate(value: TValue): number {return 0 } -+ } -+ } -+ -+ module PortalFx.ViewModels.Controls.Validators { -+ -+ export class Validator extends Portal.Controls.Validators.Validator { -+ ~~~~~~~~ -+!!! error TS2339: Property 'Controls' does not exist on type 'typeof Portal'. -+ -+ constructor(message?: string) { -+ super(message); -+ } -+ } -+ -+ } -+ -+ interface Contract { -+ -+ validators: KnockoutObservableArray>; -+ ~~~~~~~~~~ -+!!! error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. -+ } -+ -+ -+ class ViewModel implements Contract { -+ -+ public validators: KnockoutObservableArray> = ko.observableArray>(); -+ ~~~~~~~~~~ -+!!! error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. -+ ~~~~~~~~~~ -+!!! error TS2694: Namespace 'PortalFx' has no exported member 'ViewModels'. -+ } -+ -+ diff --git a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols index 72089e93a9..b809a2184e 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols @@ -193,13 +193,20 @@ module PortalFx.ViewModels.Controls.Validators { export class Validator extends Portal.Controls.Validators.Validator { >Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 54, 27)) +>Portal.Controls.Validators.Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) +>Portal.Controls.Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 23)) +>Portal.Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 14)) >Portal : Symbol(Portal, Decl(genericClassPropertyInheritanceSpecialization.ts, 37, 1)) +>Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 14)) +>Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 23)) +>Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 54, 27)) constructor(message?: string) { >message : Symbol(message, Decl(genericClassPropertyInheritanceSpecialization.ts, 56, 20)) super(message); +>super : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) >message : Symbol(message, Decl(genericClassPropertyInheritanceSpecialization.ts, 56, 20)) } } @@ -214,10 +221,10 @@ interface Contract { >validators : Symbol(validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 63, 28)) >KnockoutObservableArray : Symbol(KnockoutObservableArray, Decl(genericClassPropertyInheritanceSpecialization.ts, 10, 1)) >PortalFx : Symbol(PortalFx, Decl(genericClassPropertyInheritanceSpecialization.ts, 50, 1)) ->ViewModels : Symbol(ViewModels) ->Controls : Symbol(Controls) ->Validators : Symbol(Validators) ->Validator : Symbol(Validator) +>ViewModels : Symbol(ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 16)) +>Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) +>Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) +>Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 63, 19)) } @@ -232,19 +239,19 @@ class ViewModel implements Contract { >validators : Symbol(validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 69, 53)) >KnockoutObservableArray : Symbol(KnockoutObservableArray, Decl(genericClassPropertyInheritanceSpecialization.ts, 10, 1)) >PortalFx : Symbol(PortalFx, Decl(genericClassPropertyInheritanceSpecialization.ts, 50, 1)) ->ViewModels : Symbol(ViewModels) ->Controls : Symbol(Controls) ->Validators : Symbol(Validators) ->Validator : Symbol(Validator) +>ViewModels : Symbol(ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 16)) +>Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) +>Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) +>Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 69, 16)) >ko.observableArray : Symbol(observableArray, Decl(genericClassPropertyInheritanceSpecialization.ts, 36, 14)) >ko : Symbol(ko, Decl(genericClassPropertyInheritanceSpecialization.ts, 33, 1)) >observableArray : Symbol(observableArray, Decl(genericClassPropertyInheritanceSpecialization.ts, 36, 14)) >PortalFx : Symbol(PortalFx, Decl(genericClassPropertyInheritanceSpecialization.ts, 50, 1)) ->ViewModels : Symbol(ViewModels) ->Controls : Symbol(Controls) ->Validators : Symbol(Validators) ->Validator : Symbol(Validator) +>ViewModels : Symbol(ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 16)) +>Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) +>Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) +>Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 69, 16)) } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols.diff index 0286a1ef88..e8d26e0769 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols.diff @@ -178,10 +178,16 @@ ->Portal.Controls.Validators.Validator : Symbol(Portal.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) ->Portal.Controls.Validators : Symbol(Portal.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 23)) ->Portal.Controls : Symbol(Portal.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 14)) ++>Portal.Controls.Validators.Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) ++>Portal.Controls.Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 23)) ++>Portal.Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 14)) >Portal : Symbol(Portal, Decl(genericClassPropertyInheritanceSpecialization.ts, 37, 1)) ->Controls : Symbol(Portal.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 14)) ->Validators : Symbol(Portal.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 23)) ->Validator : Symbol(Portal.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) ++>Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 14)) ++>Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 23)) ++>Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 54, 27)) constructor(message?: string) { @@ -189,10 +195,11 @@ super(message); ->super : Symbol(Portal.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) ++>super : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) >message : Symbol(message, Decl(genericClassPropertyInheritanceSpecialization.ts, 56, 20)) } } -@@= skipped -25, +18 lines =@@ +@@= skipped -25, +25 lines =@@ >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 63, 19)) validators: KnockoutObservableArray>; @@ -204,10 +211,10 @@ ->Controls : Symbol(PortalFx.ViewModels.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) ->Validators : Symbol(PortalFx.ViewModels.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) ->Validator : Symbol(PortalFx.ViewModels.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) -+>ViewModels : Symbol(ViewModels) -+>Controls : Symbol(Controls) -+>Validators : Symbol(Validators) -+>Validator : Symbol(Validator) ++>ViewModels : Symbol(ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 16)) ++>Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) ++>Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) ++>Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 63, 19)) } @@ -223,10 +230,10 @@ ->Controls : Symbol(PortalFx.ViewModels.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) ->Validators : Symbol(PortalFx.ViewModels.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) ->Validator : Symbol(PortalFx.ViewModels.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) -+>ViewModels : Symbol(ViewModels) -+>Controls : Symbol(Controls) -+>Validators : Symbol(Validators) -+>Validator : Symbol(Validator) ++>ViewModels : Symbol(ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 16)) ++>Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) ++>Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) ++>Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 69, 16)) ->ko.observableArray : Symbol(ko.observableArray, Decl(genericClassPropertyInheritanceSpecialization.ts, 36, 14)) +>ko.observableArray : Symbol(observableArray, Decl(genericClassPropertyInheritanceSpecialization.ts, 36, 14)) @@ -238,10 +245,10 @@ ->Controls : Symbol(PortalFx.ViewModels.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) ->Validators : Symbol(PortalFx.ViewModels.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) ->Validator : Symbol(PortalFx.ViewModels.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) -+>ViewModels : Symbol(ViewModels) -+>Controls : Symbol(Controls) -+>Validators : Symbol(Validators) -+>Validator : Symbol(Validator) ++>ViewModels : Symbol(ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 16)) ++>Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) ++>Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) ++>Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 69, 16)) } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.errors.txt b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.errors.txt deleted file mode 100644 index beed21235c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.errors.txt +++ /dev/null @@ -1,32 +0,0 @@ -genericConstraintOnExtendedBuiltinTypes.ts(21,38): error TS2304: Cannot find name 'Tween'. - - -==== genericConstraintOnExtendedBuiltinTypes.ts (1 errors) ==== - declare module EndGate { - export interface ICloneable { - Clone(): any; - } - } - - interface Number extends EndGate.ICloneable { } - - module EndGate.Tweening { - export class Tween{ - private _from: T; - - - constructor(from: T) { - this._from = from.Clone(); - } - } - } - - module EndGate.Tweening { - export class NumberTween extends Tween{ - ~~~~~ -!!! error TS2304: Cannot find name 'Tween'. - constructor(from: number) { - super(from); - } - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.errors.txt.diff deleted file mode 100644 index 0c774cfb15..0000000000 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.errors.txt.diff +++ /dev/null @@ -1,37 +0,0 @@ ---- old.genericConstraintOnExtendedBuiltinTypes.errors.txt -+++ new.genericConstraintOnExtendedBuiltinTypes.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+genericConstraintOnExtendedBuiltinTypes.ts(21,38): error TS2304: Cannot find name 'Tween'. -+ -+ -+==== genericConstraintOnExtendedBuiltinTypes.ts (1 errors) ==== -+ declare module EndGate { -+ export interface ICloneable { -+ Clone(): any; -+ } -+ } -+ -+ interface Number extends EndGate.ICloneable { } -+ -+ module EndGate.Tweening { -+ export class Tween{ -+ private _from: T; -+ -+ -+ constructor(from: T) { -+ this._from = from.Clone(); -+ } -+ } -+ } -+ -+ module EndGate.Tweening { -+ export class NumberTween extends Tween{ -+ ~~~~~ -+!!! error TS2304: Cannot find name 'Tween'. -+ constructor(from: number) { -+ super(from); -+ } -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols index 0c6a389ed1..0cf7ea87e3 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols @@ -20,7 +20,7 @@ interface Number extends EndGate.ICloneable { } module EndGate.Tweening { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 17, 1)) ->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 15)) +>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 15)) export class Tween{ >Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 25)) @@ -49,15 +49,17 @@ module EndGate.Tweening { module EndGate.Tweening { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 17, 1)) ->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 15)) +>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 15)) export class NumberTween extends Tween{ >NumberTween : Symbol(NumberTween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 25)) +>Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 25)) constructor(from: number) { >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 21, 20)) super(from); +>super : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 25)) >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 21, 20)) } } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols.diff index d9c47f9e4d..7ee2cb3d6a 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols.diff @@ -19,11 +19,6 @@ module EndGate.Tweening { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 17, 1)) -->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 15)) -+>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 15)) - - export class Tween{ - >Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 25)) @@= skipped -20, +20 lines =@@ >ICloneable : Symbol(ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 24)) @@ -50,21 +45,3 @@ } } } - - module EndGate.Tweening { - >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 17, 1)) -->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 15)) -+>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 15)) - - export class NumberTween extends Tween{ - >NumberTween : Symbol(NumberTween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 25)) -->Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 25)) - - constructor(from: number) { - >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 21, 20)) - - super(from); -->super : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 25)) - >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 21, 20)) - } - } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.errors.txt b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.errors.txt deleted file mode 100644 index c0c8c8a040..0000000000 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.errors.txt +++ /dev/null @@ -1,31 +0,0 @@ -genericConstraintOnExtendedBuiltinTypes2.ts(20,38): error TS2304: Cannot find name 'Tween'. - - -==== genericConstraintOnExtendedBuiltinTypes2.ts (1 errors) ==== - module EndGate { - export interface ICloneable { - Clone(): any; - } - } - - interface Number extends EndGate.ICloneable { } - - module EndGate.Tweening { - export class Tween{ - private _from: T; - - constructor(from: T) { - this._from = from.Clone(); - } - } - } - - module EndGate.Tweening { - export class NumberTween extends Tween{ - ~~~~~ -!!! error TS2304: Cannot find name 'Tween'. - constructor(from: number) { - super(from); - } - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.errors.txt.diff deleted file mode 100644 index ef16735266..0000000000 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.errors.txt.diff +++ /dev/null @@ -1,36 +0,0 @@ ---- old.genericConstraintOnExtendedBuiltinTypes2.errors.txt -+++ new.genericConstraintOnExtendedBuiltinTypes2.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+genericConstraintOnExtendedBuiltinTypes2.ts(20,38): error TS2304: Cannot find name 'Tween'. -+ -+ -+==== genericConstraintOnExtendedBuiltinTypes2.ts (1 errors) ==== -+ module EndGate { -+ export interface ICloneable { -+ Clone(): any; -+ } -+ } -+ -+ interface Number extends EndGate.ICloneable { } -+ -+ module EndGate.Tweening { -+ export class Tween{ -+ private _from: T; -+ -+ constructor(from: T) { -+ this._from = from.Clone(); -+ } -+ } -+ } -+ -+ module EndGate.Tweening { -+ export class NumberTween extends Tween{ -+ ~~~~~ -+!!! error TS2304: Cannot find name 'Tween'. -+ constructor(from: number) { -+ super(from); -+ } -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols index eb687261ba..20a7ea4db9 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols @@ -20,7 +20,7 @@ interface Number extends EndGate.ICloneable { } module EndGate.Tweening { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 16, 1)) ->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 15)) +>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 15)) export class Tween{ >Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) @@ -48,16 +48,18 @@ module EndGate.Tweening { module EndGate.Tweening { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 16, 1)) ->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 15)) +>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 15)) export class NumberTween extends Tween{ >NumberTween : Symbol(NumberTween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 25)) +>Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 4, 1)) constructor(from: number) { >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 20, 20)) super(from); +>super : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 20, 20)) } } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols.diff index 7b5681d7d6..a373eb46b3 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols.diff @@ -19,11 +19,6 @@ module EndGate.Tweening { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 16, 1)) -->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 15)) -+>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 15)) - - export class Tween{ - >Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) @@= skipped -20, +20 lines =@@ >ICloneable : Symbol(ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 16)) @@ -50,22 +45,3 @@ } } } - - module EndGate.Tweening { - >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 16, 1)) -->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 15)) -+>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 15)) - - export class NumberTween extends Tween{ - >NumberTween : Symbol(NumberTween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 25)) -->Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) - >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 4, 1)) - - constructor(from: number) { - >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 20, 20)) - - super(from); -->super : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) - >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 20, 20)) - } - } diff --git a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.errors.txt b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.errors.txt deleted file mode 100644 index 0e7cef8245..0000000000 --- a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.errors.txt +++ /dev/null @@ -1,25 +0,0 @@ -usage.ts(3,26): error TS2694: Namespace 'My' has no exported member 'Internal'. - - -==== usage.ts (1 errors) ==== - /// - namespace SomeOther.Thing { - import Internal = My.Internal; - ~~~~~~~~ -!!! error TS2694: Namespace 'My' has no exported member 'Internal'. - export class Foo { - private _which: Internal.WhichThing; - constructor() { - Internal.getThing(); - Internal.WhichThing.A ? "foo" : "bar"; - } - } - } -==== internal.ts (0 errors) ==== - namespace My.Internal { - export function getThing(): void {} - export const enum WhichThing { - A, B, C - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.errors.txt.diff deleted file mode 100644 index 00985e6a91..0000000000 --- a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.errors.txt.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- old.importAliasFromNamespace.errors.txt -+++ new.importAliasFromNamespace.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+usage.ts(3,26): error TS2694: Namespace 'My' has no exported member 'Internal'. -+ -+ -+==== usage.ts (1 errors) ==== -+ /// -+ namespace SomeOther.Thing { -+ import Internal = My.Internal; -+ ~~~~~~~~ -+!!! error TS2694: Namespace 'My' has no exported member 'Internal'. -+ export class Foo { -+ private _which: Internal.WhichThing; -+ constructor() { -+ Internal.getThing(); -+ Internal.WhichThing.A ? "foo" : "bar"; -+ } -+ } -+ } -+==== internal.ts (0 errors) ==== -+ namespace My.Internal { -+ export function getThing(): void {} -+ export const enum WhichThing { -+ A, B, C -+ } -+ } -+ diff --git a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.symbols b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.symbols index 49ec859668..0931ccf99b 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.symbols +++ b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.symbols @@ -9,6 +9,7 @@ namespace SomeOther.Thing { import Internal = My.Internal; >Internal : Symbol(Internal, Decl(usage.ts, 1, 27)) >My : Symbol(My, Decl(internal.ts, 0, 0)) +>Internal : Symbol(Internal, Decl(internal.ts, 0, 13)) export class Foo { >Foo : Symbol(Foo, Decl(usage.ts, 2, 34)) @@ -16,14 +17,20 @@ namespace SomeOther.Thing { private _which: Internal.WhichThing; >_which : Symbol(_which, Decl(usage.ts, 3, 22)) >Internal : Symbol(Internal, Decl(usage.ts, 1, 27)) ->WhichThing : Symbol(WhichThing) +>WhichThing : Symbol(WhichThing, Decl(internal.ts, 1, 39)) constructor() { Internal.getThing(); +>Internal.getThing : Symbol(getThing, Decl(internal.ts, 0, 23)) >Internal : Symbol(Internal, Decl(usage.ts, 1, 27)) +>getThing : Symbol(getThing, Decl(internal.ts, 0, 23)) Internal.WhichThing.A ? "foo" : "bar"; +>Internal.WhichThing.A : Symbol(A, Decl(internal.ts, 2, 34)) +>Internal.WhichThing : Symbol(WhichThing, Decl(internal.ts, 1, 39)) >Internal : Symbol(Internal, Decl(usage.ts, 1, 27)) +>WhichThing : Symbol(WhichThing, Decl(internal.ts, 1, 39)) +>A : Symbol(A, Decl(internal.ts, 2, 34)) } } } diff --git a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.symbols.diff b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.symbols.diff index 4ebe2ad455..deb6b782b3 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.symbols.diff @@ -1,12 +1,6 @@ --- old.importAliasFromNamespace.symbols +++ new.importAliasFromNamespace.symbols -@@= skipped -8, +8 lines =@@ - import Internal = My.Internal; - >Internal : Symbol(Internal, Decl(usage.ts, 1, 27)) - >My : Symbol(My, Decl(internal.ts, 0, 0)) -->Internal : Symbol(Internal, Decl(internal.ts, 0, 13)) - - export class Foo { +@@= skipped -14, +14 lines =@@ >Foo : Symbol(Foo, Decl(usage.ts, 2, 34)) private _which: Internal.WhichThing; @@ -14,24 +8,30 @@ +>_which : Symbol(_which, Decl(usage.ts, 3, 22)) >Internal : Symbol(Internal, Decl(usage.ts, 1, 27)) ->WhichThing : Symbol(Internal.WhichThing, Decl(internal.ts, 1, 39)) -+>WhichThing : Symbol(WhichThing) ++>WhichThing : Symbol(WhichThing, Decl(internal.ts, 1, 39)) constructor() { Internal.getThing(); ->Internal.getThing : Symbol(Internal.getThing, Decl(internal.ts, 0, 23)) ++>Internal.getThing : Symbol(getThing, Decl(internal.ts, 0, 23)) >Internal : Symbol(Internal, Decl(usage.ts, 1, 27)) ->getThing : Symbol(Internal.getThing, Decl(internal.ts, 0, 23)) ++>getThing : Symbol(getThing, Decl(internal.ts, 0, 23)) Internal.WhichThing.A ? "foo" : "bar"; ->Internal.WhichThing.A : Symbol(Internal.WhichThing.A, Decl(internal.ts, 2, 34)) ->Internal.WhichThing : Symbol(Internal.WhichThing, Decl(internal.ts, 1, 39)) ++>Internal.WhichThing.A : Symbol(A, Decl(internal.ts, 2, 34)) ++>Internal.WhichThing : Symbol(WhichThing, Decl(internal.ts, 1, 39)) >Internal : Symbol(Internal, Decl(usage.ts, 1, 27)) ->WhichThing : Symbol(Internal.WhichThing, Decl(internal.ts, 1, 39)) ->A : Symbol(Internal.WhichThing.A, Decl(internal.ts, 2, 34)) ++>WhichThing : Symbol(WhichThing, Decl(internal.ts, 1, 39)) ++>A : Symbol(A, Decl(internal.ts, 2, 34)) } } } -@@= skipped -37, +30 lines =@@ +@@= skipped -31, +31 lines =@@ >WhichThing : Symbol(WhichThing, Decl(internal.ts, 1, 39)) A, B, C diff --git a/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt b/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt index ec6ec9475c..4d825215ae 100644 --- a/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt @@ -1,4 +1,4 @@ -importAnImport.ts(6,19): error TS2694: Namespace 'c' has no exported member 'a'. +importAnImport.ts(6,23): error TS2694: Namespace 'c.a.b' has no exported member 'ma'. ==== importAnImport.ts (1 errors) ==== @@ -8,6 +8,6 @@ importAnImport.ts(6,19): error TS2694: Namespace 'c' has no exported member 'a'. module m0 { import m8 = c.a.b.ma; - ~ -!!! error TS2694: Namespace 'c' has no exported member 'a'. + ~~ +!!! error TS2694: Namespace 'c.a.b' has no exported member 'ma'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt.diff deleted file mode 100644 index efff508931..0000000000 --- a/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.importAnImport.errors.txt -+++ new.importAnImport.errors.txt -@@= skipped -0, +0 lines =@@ --importAnImport.ts(6,23): error TS2694: Namespace 'c.a.b' has no exported member 'ma'. -+importAnImport.ts(6,19): error TS2694: Namespace 'c' has no exported member 'a'. - - - ==== importAnImport.ts (1 errors) ==== -@@= skipped -7, +7 lines =@@ - - module m0 { - import m8 = c.a.b.ma; -- ~~ --!!! error TS2694: Namespace 'c.a.b' has no exported member 'ma'. -+ ~ -+!!! error TS2694: Namespace 'c' has no exported member 'a'. - } diff --git a/testdata/baselines/reference/submodule/compiler/importAnImport.symbols b/testdata/baselines/reference/submodule/compiler/importAnImport.symbols index e57ec9921c..308a89c6c2 100644 --- a/testdata/baselines/reference/submodule/compiler/importAnImport.symbols +++ b/testdata/baselines/reference/submodule/compiler/importAnImport.symbols @@ -17,4 +17,6 @@ module m0 { import m8 = c.a.b.ma; >m8 : Symbol(m8, Decl(importAnImport.ts, 4, 11)) >c : Symbol(c, Decl(importAnImport.ts, 0, 0)) +>a : Symbol(a, Decl(importAnImport.ts, 0, 9)) +>b : Symbol(b, Decl(importAnImport.ts, 0, 11)) } diff --git a/testdata/baselines/reference/submodule/compiler/importAnImport.symbols.diff b/testdata/baselines/reference/submodule/compiler/importAnImport.symbols.diff index c2162a109e..39555d9438 100644 --- a/testdata/baselines/reference/submodule/compiler/importAnImport.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/importAnImport.symbols.diff @@ -20,4 +20,6 @@ >c : Symbol(c, Decl(importAnImport.ts, 0, 0)) ->a : Symbol(c.a, Decl(importAnImport.ts, 0, 9)) ->b : Symbol(c.a.b, Decl(importAnImport.ts, 0, 11)) ++>a : Symbol(a, Decl(importAnImport.ts, 0, 9)) ++>b : Symbol(b, Decl(importAnImport.ts, 0, 11)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.errors.txt b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.errors.txt deleted file mode 100644 index 0339a29650..0000000000 --- a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -internalAliasWithDottedNameEmit.ts(5,18): error TS2503: Cannot find namespace 'b'. - - -==== internalAliasWithDottedNameEmit.ts (1 errors) ==== - module a.b.c { - export var d; - } - module a.e.f { - import g = b.c; - ~ -!!! error TS2503: Cannot find namespace 'b'. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.errors.txt.diff deleted file mode 100644 index b20de4f530..0000000000 --- a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.internalAliasWithDottedNameEmit.errors.txt -+++ new.internalAliasWithDottedNameEmit.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+internalAliasWithDottedNameEmit.ts(5,18): error TS2503: Cannot find namespace 'b'. -+ -+ -+==== internalAliasWithDottedNameEmit.ts (1 errors) ==== -+ module a.b.c { -+ export var d; -+ } -+ module a.e.f { -+ import g = b.c; -+ ~ -+!!! error TS2503: Cannot find namespace 'b'. -+ } -+ diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols index ab74ce657a..1830daf084 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols @@ -16,5 +16,7 @@ module a.e.f { import g = b.c; >g : Symbol(g, Decl(internalAliasWithDottedNameEmit.ts, 3, 14)) +>b : Symbol(b, Decl(internalAliasWithDottedNameEmit.ts, 0, 9)) +>c : Symbol(c, Decl(internalAliasWithDottedNameEmit.ts, 0, 11)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols.diff b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols.diff index fc01deb1ce..f4664d2bbc 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols.diff @@ -1,10 +1,10 @@ --- old.internalAliasWithDottedNameEmit.symbols +++ new.internalAliasWithDottedNameEmit.symbols -@@= skipped -15, +15 lines =@@ - +@@= skipped -16, +16 lines =@@ import g = b.c; >g : Symbol(g, Decl(internalAliasWithDottedNameEmit.ts, 3, 14)) -->b : Symbol(b, Decl(internalAliasWithDottedNameEmit.ts, 0, 9)) + >b : Symbol(b, Decl(internalAliasWithDottedNameEmit.ts, 0, 9)) ->c : Symbol(g, Decl(internalAliasWithDottedNameEmit.ts, 0, 11)) ++>c : Symbol(c, Decl(internalAliasWithDottedNameEmit.ts, 0, 11)) } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.errors.txt b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.errors.txt deleted file mode 100644 index c4cb5a6784..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -mergedModuleDeclarationCodeGen2.ts(6,9): error TS2304: Cannot find name 'foo'. - - -==== mergedModuleDeclarationCodeGen2.ts (1 errors) ==== - module my.data.foo { - export function buz() { } - } - module my.data { - function data(my) { - foo.buz(); - ~~~ -!!! error TS2304: Cannot find name 'foo'. - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.errors.txt.diff deleted file mode 100644 index 73bf712bcd..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.mergedModuleDeclarationCodeGen2.errors.txt -+++ new.mergedModuleDeclarationCodeGen2.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+mergedModuleDeclarationCodeGen2.ts(6,9): error TS2304: Cannot find name 'foo'. -+ -+ -+==== mergedModuleDeclarationCodeGen2.ts (1 errors) ==== -+ module my.data.foo { -+ export function buz() { } -+ } -+ module my.data { -+ function data(my) { -+ foo.buz(); -+ ~~~ -+!!! error TS2304: Cannot find name 'foo'. -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.symbols b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.symbols index 144372c84d..06a1c61ddc 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.symbols +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.symbols @@ -3,7 +3,7 @@ === mergedModuleDeclarationCodeGen2.ts === module my.data.foo { >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen2.ts, 2, 1)) ->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 10)) +>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 10), Decl(mergedModuleDeclarationCodeGen2.ts, 3, 10)) >foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 15)) export function buz() { } @@ -11,12 +11,15 @@ module my.data.foo { } module my.data { >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen2.ts, 2, 1)) ->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen2.ts, 3, 10)) +>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 10), Decl(mergedModuleDeclarationCodeGen2.ts, 3, 10)) function data(my) { >data : Symbol(data, Decl(mergedModuleDeclarationCodeGen2.ts, 3, 16)) >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen2.ts, 4, 18)) foo.buz(); +>foo.buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 20)) +>foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 15)) +>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 20)) } } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.symbols.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.symbols.diff index 1dec9bf7c9..2ce8cd7876 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.symbols.diff @@ -1,28 +1,13 @@ --- old.mergedModuleDeclarationCodeGen2.symbols +++ new.mergedModuleDeclarationCodeGen2.symbols -@@= skipped -2, +2 lines =@@ - === mergedModuleDeclarationCodeGen2.ts === - module my.data.foo { - >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen2.ts, 2, 1)) -->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 10), Decl(mergedModuleDeclarationCodeGen2.ts, 3, 10)) -+>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 10)) - >foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 15)) - - export function buz() { } -@@= skipped -8, +8 lines =@@ - } - module my.data { - >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen2.ts, 2, 1)) -->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 10), Decl(mergedModuleDeclarationCodeGen2.ts, 3, 10)) -+>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen2.ts, 3, 10)) - - function data(my) { - >data : Symbol(data, Decl(mergedModuleDeclarationCodeGen2.ts, 3, 16)) +@@= skipped -17, +17 lines =@@ >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen2.ts, 4, 18)) foo.buz(); ->foo.buz : Symbol(foo.buz, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 20)) -->foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 15)) ++>foo.buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 20)) + >foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 15)) ->buz : Symbol(foo.buz, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 20)) ++>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen2.ts, 0, 20)) } } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.errors.txt b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.errors.txt deleted file mode 100644 index 166d474f8b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -mergedModuleDeclarationCodeGen3.ts(6,9): error TS2304: Cannot find name 'buz'. - - -==== mergedModuleDeclarationCodeGen3.ts (1 errors) ==== - module my.data { - export function buz() { } - } - module my.data.foo { - function data(my, foo) { - buz(); - ~~~ -!!! error TS2304: Cannot find name 'buz'. - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.errors.txt.diff deleted file mode 100644 index 7fbde0e6ec..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.mergedModuleDeclarationCodeGen3.errors.txt -+++ new.mergedModuleDeclarationCodeGen3.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+mergedModuleDeclarationCodeGen3.ts(6,9): error TS2304: Cannot find name 'buz'. -+ -+ -+==== mergedModuleDeclarationCodeGen3.ts (1 errors) ==== -+ module my.data { -+ export function buz() { } -+ } -+ module my.data.foo { -+ function data(my, foo) { -+ buz(); -+ ~~~ -+!!! error TS2304: Cannot find name 'buz'. -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.symbols b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.symbols index dffe6eb86d..e65e4025a6 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.symbols +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.symbols @@ -3,14 +3,14 @@ === mergedModuleDeclarationCodeGen3.ts === module my.data { >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen3.ts, 2, 1)) ->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 10)) +>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 10), Decl(mergedModuleDeclarationCodeGen3.ts, 3, 10)) export function buz() { } >buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 16)) } module my.data.foo { >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen3.ts, 2, 1)) ->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen3.ts, 3, 10)) +>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 10), Decl(mergedModuleDeclarationCodeGen3.ts, 3, 10)) >foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen3.ts, 3, 15)) function data(my, foo) { @@ -19,5 +19,6 @@ module my.data.foo { >foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen3.ts, 4, 21)) buz(); +>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 16)) } } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.symbols.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.symbols.diff deleted file mode 100644 index 4b2d25df1c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.symbols.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- old.mergedModuleDeclarationCodeGen3.symbols -+++ new.mergedModuleDeclarationCodeGen3.symbols -@@= skipped -2, +2 lines =@@ - === mergedModuleDeclarationCodeGen3.ts === - module my.data { - >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen3.ts, 2, 1)) -->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 10), Decl(mergedModuleDeclarationCodeGen3.ts, 3, 10)) -+>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 10)) - - export function buz() { } - >buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 16)) - } - module my.data.foo { - >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen3.ts, 2, 1)) -->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 10), Decl(mergedModuleDeclarationCodeGen3.ts, 3, 10)) -+>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen3.ts, 3, 10)) - >foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen3.ts, 3, 15)) - - function data(my, foo) { -@@= skipped -16, +16 lines =@@ - >foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen3.ts, 4, 21)) - - buz(); -->buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen3.ts, 0, 16)) - } - } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.errors.txt b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.errors.txt deleted file mode 100644 index 6b1df5f74c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -mergedModuleDeclarationCodeGen4.ts(11,21): error TS2304: Cannot find name 'foo'. - - -==== mergedModuleDeclarationCodeGen4.ts (1 errors) ==== - module superContain { - export module contain { - export module my.buz { - export module data { - export function foo() { } - } - } - export module my.buz { - export module data { - export function bar(contain, my, buz, data) { - foo(); - ~~~ -!!! error TS2304: Cannot find name 'foo'. - } - } - } - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.errors.txt.diff deleted file mode 100644 index 7d33b3147a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.errors.txt.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.mergedModuleDeclarationCodeGen4.errors.txt -+++ new.mergedModuleDeclarationCodeGen4.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+mergedModuleDeclarationCodeGen4.ts(11,21): error TS2304: Cannot find name 'foo'. -+ -+ -+==== mergedModuleDeclarationCodeGen4.ts (1 errors) ==== -+ module superContain { -+ export module contain { -+ export module my.buz { -+ export module data { -+ export function foo() { } -+ } -+ } -+ export module my.buz { -+ export module data { -+ export function bar(contain, my, buz, data) { -+ foo(); -+ ~~~ -+!!! error TS2304: Cannot find name 'foo'. -+ } -+ } -+ } -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.symbols b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.symbols index 15374c71b2..b167c522db 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.symbols +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.symbols @@ -9,10 +9,10 @@ module superContain { export module my.buz { >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen4.ts, 1, 27), Decl(mergedModuleDeclarationCodeGen4.ts, 6, 9)) ->buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 25)) +>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 25), Decl(mergedModuleDeclarationCodeGen4.ts, 7, 25)) export module data { ->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 30)) +>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 30), Decl(mergedModuleDeclarationCodeGen4.ts, 7, 30)) export function foo() { } >foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen4.ts, 3, 32)) @@ -20,10 +20,10 @@ module superContain { } export module my.buz { >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen4.ts, 1, 27), Decl(mergedModuleDeclarationCodeGen4.ts, 6, 9)) ->buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen4.ts, 7, 25)) +>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 25), Decl(mergedModuleDeclarationCodeGen4.ts, 7, 25)) export module data { ->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen4.ts, 7, 30)) +>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 30), Decl(mergedModuleDeclarationCodeGen4.ts, 7, 30)) export function bar(contain, my, buz, data) { >bar : Symbol(bar, Decl(mergedModuleDeclarationCodeGen4.ts, 8, 32)) @@ -33,6 +33,7 @@ module superContain { >data : Symbol(data, Decl(mergedModuleDeclarationCodeGen4.ts, 9, 53)) foo(); +>foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen4.ts, 3, 32)) } } } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.symbols.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.symbols.diff deleted file mode 100644 index 7006f04fcc..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.symbols.diff +++ /dev/null @@ -1,36 +0,0 @@ ---- old.mergedModuleDeclarationCodeGen4.symbols -+++ new.mergedModuleDeclarationCodeGen4.symbols -@@= skipped -8, +8 lines =@@ - - export module my.buz { - >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen4.ts, 1, 27), Decl(mergedModuleDeclarationCodeGen4.ts, 6, 9)) -->buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 25), Decl(mergedModuleDeclarationCodeGen4.ts, 7, 25)) -+>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 25)) - - export module data { -->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 30), Decl(mergedModuleDeclarationCodeGen4.ts, 7, 30)) -+>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 30)) - - export function foo() { } - >foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen4.ts, 3, 32)) -@@= skipped -11, +11 lines =@@ - } - export module my.buz { - >my : Symbol(my, Decl(mergedModuleDeclarationCodeGen4.ts, 1, 27), Decl(mergedModuleDeclarationCodeGen4.ts, 6, 9)) -->buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 25), Decl(mergedModuleDeclarationCodeGen4.ts, 7, 25)) -+>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen4.ts, 7, 25)) - - export module data { -->data : Symbol(data, Decl(mergedModuleDeclarationCodeGen4.ts, 2, 30), Decl(mergedModuleDeclarationCodeGen4.ts, 7, 30)) -+>data : Symbol(data, Decl(mergedModuleDeclarationCodeGen4.ts, 7, 30)) - - export function bar(contain, my, buz, data) { - >bar : Symbol(bar, Decl(mergedModuleDeclarationCodeGen4.ts, 8, 32)) -@@= skipped -13, +13 lines =@@ - >data : Symbol(data, Decl(mergedModuleDeclarationCodeGen4.ts, 9, 53)) - - foo(); -->foo : Symbol(foo, Decl(mergedModuleDeclarationCodeGen4.ts, 3, 32)) - } - } - } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.errors.txt b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.errors.txt deleted file mode 100644 index e4e50b3d65..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -mergedModuleDeclarationCodeGen5.ts(14,21): error TS2304: Cannot find name 'doom'. - - -==== mergedModuleDeclarationCodeGen5.ts (1 errors) ==== - module M.buz.plop { - export function doom() { } - export function M() { } - } - module M.buz.plop { - function gunk() { } - function buz() { } - export class fudge { } - export enum plop { } - - // Emit these references as follows - var v1 = gunk; // gunk - var v2 = buz; // buz - export var v3 = doom; // _plop.doom - ~~~~ -!!! error TS2304: Cannot find name 'doom'. - export var v4 = M; // _plop.M - export var v5 = fudge; // fudge - export var v6 = plop; // plop - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.errors.txt.diff deleted file mode 100644 index e23da0d87b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.errors.txt.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- old.mergedModuleDeclarationCodeGen5.errors.txt -+++ new.mergedModuleDeclarationCodeGen5.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+mergedModuleDeclarationCodeGen5.ts(14,21): error TS2304: Cannot find name 'doom'. -+ -+ -+==== mergedModuleDeclarationCodeGen5.ts (1 errors) ==== -+ module M.buz.plop { -+ export function doom() { } -+ export function M() { } -+ } -+ module M.buz.plop { -+ function gunk() { } -+ function buz() { } -+ export class fudge { } -+ export enum plop { } -+ -+ // Emit these references as follows -+ var v1 = gunk; // gunk -+ var v2 = buz; // buz -+ export var v3 = doom; // _plop.doom -+ ~~~~ -+!!! error TS2304: Cannot find name 'doom'. -+ export var v4 = M; // _plop.M -+ export var v5 = fudge; // fudge -+ export var v6 = plop; // plop -+ } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.symbols b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.symbols index 54b463dec7..f7f5b4ba47 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.symbols +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.symbols @@ -3,8 +3,8 @@ === mergedModuleDeclarationCodeGen5.ts === module M.buz.plop { >M : Symbol(M, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen5.ts, 3, 1)) ->buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 9)) ->plop : Symbol(plop, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 13)) +>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 9), Decl(mergedModuleDeclarationCodeGen5.ts, 4, 9)) +>plop : Symbol(plop, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 13), Decl(mergedModuleDeclarationCodeGen5.ts, 4, 13)) export function doom() { } >doom : Symbol(doom, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 19)) @@ -14,8 +14,8 @@ module M.buz.plop { } module M.buz.plop { >M : Symbol(M, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen5.ts, 3, 1)) ->buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen5.ts, 4, 9)) ->plop : Symbol(plop, Decl(mergedModuleDeclarationCodeGen5.ts, 4, 13)) +>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 9), Decl(mergedModuleDeclarationCodeGen5.ts, 4, 9)) +>plop : Symbol(plop, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 13), Decl(mergedModuleDeclarationCodeGen5.ts, 4, 13)) function gunk() { } >gunk : Symbol(gunk, Decl(mergedModuleDeclarationCodeGen5.ts, 4, 19)) @@ -40,10 +40,11 @@ module M.buz.plop { export var v3 = doom; // _plop.doom >v3 : Symbol(v3, Decl(mergedModuleDeclarationCodeGen5.ts, 13, 14)) +>doom : Symbol(doom, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 19)) export var v4 = M; // _plop.M >v4 : Symbol(v4, Decl(mergedModuleDeclarationCodeGen5.ts, 14, 14)) ->M : Symbol(M, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen5.ts, 3, 1)) +>M : Symbol(M, Decl(mergedModuleDeclarationCodeGen5.ts, 1, 30)) export var v5 = fudge; // fudge >v5 : Symbol(v5, Decl(mergedModuleDeclarationCodeGen5.ts, 15, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.symbols.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.symbols.diff deleted file mode 100644 index 6ea2d370d7..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.symbols.diff +++ /dev/null @@ -1,37 +0,0 @@ ---- old.mergedModuleDeclarationCodeGen5.symbols -+++ new.mergedModuleDeclarationCodeGen5.symbols -@@= skipped -2, +2 lines =@@ - === mergedModuleDeclarationCodeGen5.ts === - module M.buz.plop { - >M : Symbol(M, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen5.ts, 3, 1)) -->buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 9), Decl(mergedModuleDeclarationCodeGen5.ts, 4, 9)) -->plop : Symbol(plop, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 13), Decl(mergedModuleDeclarationCodeGen5.ts, 4, 13)) -+>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 9)) -+>plop : Symbol(plop, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 13)) - - export function doom() { } - >doom : Symbol(doom, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 19)) -@@= skipped -11, +11 lines =@@ - } - module M.buz.plop { - >M : Symbol(M, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen5.ts, 3, 1)) -->buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 9), Decl(mergedModuleDeclarationCodeGen5.ts, 4, 9)) -->plop : Symbol(plop, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 13), Decl(mergedModuleDeclarationCodeGen5.ts, 4, 13)) -+>buz : Symbol(buz, Decl(mergedModuleDeclarationCodeGen5.ts, 4, 9)) -+>plop : Symbol(plop, Decl(mergedModuleDeclarationCodeGen5.ts, 4, 13)) - - function gunk() { } - >gunk : Symbol(gunk, Decl(mergedModuleDeclarationCodeGen5.ts, 4, 19)) -@@= skipped -26, +26 lines =@@ - - export var v3 = doom; // _plop.doom - >v3 : Symbol(v3, Decl(mergedModuleDeclarationCodeGen5.ts, 13, 14)) -->doom : Symbol(doom, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 19)) - - export var v4 = M; // _plop.M - >v4 : Symbol(v4, Decl(mergedModuleDeclarationCodeGen5.ts, 14, 14)) -->M : Symbol(M, Decl(mergedModuleDeclarationCodeGen5.ts, 1, 30)) -+>M : Symbol(M, Decl(mergedModuleDeclarationCodeGen5.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen5.ts, 3, 1)) - - export var v5 = fudge; // fudge - >v5 : Symbol(v5, Decl(mergedModuleDeclarationCodeGen5.ts, 15, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt index d488eeccd9..299a23e0e3 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt @@ -1,9 +1,8 @@ -moduleExports1.ts(7,26): error TS2339: Property 'Strasse' does not exist on type 'typeof TypeScript'. moduleExports1.ts(13,6): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. moduleExports1.ts(13,22): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -==== moduleExports1.ts (3 errors) ==== +==== moduleExports1.ts (2 errors) ==== export module TypeScript.Strasse.Street { export class Rue { public address:string; @@ -11,8 +10,6 @@ moduleExports1.ts(13,22): error TS2580: Cannot find name 'module'. Do you need t } var rue = new TypeScript.Strasse.Street.Rue(); - ~~~~~~~ -!!! error TS2339: Property 'Strasse' does not exist on type 'typeof TypeScript'. rue.address = "1 Main Street"; diff --git a/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt.diff deleted file mode 100644 index 9c28bb3626..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleExports1.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.moduleExports1.errors.txt -+++ new.moduleExports1.errors.txt -@@= skipped -0, +0 lines =@@ -+moduleExports1.ts(7,26): error TS2339: Property 'Strasse' does not exist on type 'typeof TypeScript'. - moduleExports1.ts(13,6): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - moduleExports1.ts(13,22): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - - --==== moduleExports1.ts (2 errors) ==== -+==== moduleExports1.ts (3 errors) ==== - export module TypeScript.Strasse.Street { - export class Rue { - public address:string; -@@= skipped -9, +10 lines =@@ - } - - var rue = new TypeScript.Strasse.Street.Rue(); -+ ~~~~~~~ -+!!! error TS2339: Property 'Strasse' does not exist on type 'typeof TypeScript'. - - rue.address = "1 Main Street"; - diff --git a/testdata/baselines/reference/submodule/compiler/moduleExports1.symbols b/testdata/baselines/reference/submodule/compiler/moduleExports1.symbols index 393372631c..a7b4e749a1 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleExports1.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleExports1.symbols @@ -16,10 +16,18 @@ export module TypeScript.Strasse.Street { var rue = new TypeScript.Strasse.Street.Rue(); >rue : Symbol(rue, Decl(moduleExports1.ts, 6, 3)) +>TypeScript.Strasse.Street.Rue : Symbol(Rue, Decl(moduleExports1.ts, 0, 41)) +>TypeScript.Strasse.Street : Symbol(Street, Decl(moduleExports1.ts, 0, 33)) +>TypeScript.Strasse : Symbol(Strasse, Decl(moduleExports1.ts, 0, 25)) >TypeScript : Symbol(TypeScript, Decl(moduleExports1.ts, 0, 0)) +>Strasse : Symbol(Strasse, Decl(moduleExports1.ts, 0, 25)) +>Street : Symbol(Street, Decl(moduleExports1.ts, 0, 33)) +>Rue : Symbol(Rue, Decl(moduleExports1.ts, 0, 41)) rue.address = "1 Main Street"; +>rue.address : Symbol(address, Decl(moduleExports1.ts, 1, 19)) >rue : Symbol(rue, Decl(moduleExports1.ts, 6, 3)) +>address : Symbol(address, Decl(moduleExports1.ts, 1, 19)) void 0; diff --git a/testdata/baselines/reference/submodule/compiler/moduleExports1.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleExports1.symbols.diff index 6081ef8416..9aaeefcc08 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleExports1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleExports1.symbols.diff @@ -14,15 +14,23 @@ ->TypeScript.Strasse.Street.Rue : Symbol(TypeScript.Strasse.Street.Rue, Decl(moduleExports1.ts, 0, 41)) ->TypeScript.Strasse.Street : Symbol(TypeScript.Strasse.Street, Decl(moduleExports1.ts, 0, 33)) ->TypeScript.Strasse : Symbol(TypeScript.Strasse, Decl(moduleExports1.ts, 0, 25)) ++>TypeScript.Strasse.Street.Rue : Symbol(Rue, Decl(moduleExports1.ts, 0, 41)) ++>TypeScript.Strasse.Street : Symbol(Street, Decl(moduleExports1.ts, 0, 33)) ++>TypeScript.Strasse : Symbol(Strasse, Decl(moduleExports1.ts, 0, 25)) >TypeScript : Symbol(TypeScript, Decl(moduleExports1.ts, 0, 0)) ->Strasse : Symbol(TypeScript.Strasse, Decl(moduleExports1.ts, 0, 25)) ->Street : Symbol(TypeScript.Strasse.Street, Decl(moduleExports1.ts, 0, 33)) ->Rue : Symbol(TypeScript.Strasse.Street.Rue, Decl(moduleExports1.ts, 0, 41)) ++>Strasse : Symbol(Strasse, Decl(moduleExports1.ts, 0, 25)) ++>Street : Symbol(Street, Decl(moduleExports1.ts, 0, 33)) ++>Rue : Symbol(Rue, Decl(moduleExports1.ts, 0, 41)) rue.address = "1 Main Street"; ->rue.address : Symbol(TypeScript.Strasse.Street.Rue.address, Decl(moduleExports1.ts, 1, 19)) ++>rue.address : Symbol(address, Decl(moduleExports1.ts, 1, 19)) >rue : Symbol(rue, Decl(moduleExports1.ts, 6, 3)) ->address : Symbol(TypeScript.Strasse.Street.Rue.address, Decl(moduleExports1.ts, 1, 19)) ++>address : Symbol(address, Decl(moduleExports1.ts, 1, 19)) void 0; diff --git a/testdata/baselines/reference/submodule/compiler/moduleImport.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleImport.errors.txt index 5a1cccce9d..585eb6dfe1 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleImport.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/moduleImport.errors.txt @@ -1,8 +1,7 @@ moduleImport.ts(2,17): error TS2694: Namespace 'X' has no exported member 'Y'. -moduleImport.ts(9,17): error TS2694: Namespace 'A' has no exported member 'B'. -==== moduleImport.ts (2 errors) ==== +==== moduleImport.ts (1 errors) ==== module A.B.C { import XYZ = X.Y.Z; ~ @@ -14,8 +13,6 @@ moduleImport.ts(9,17): error TS2694: Namespace 'A' has no exported member 'B'. module X { import ABC = A.B.C; - ~ -!!! error TS2694: Namespace 'A' has no exported member 'B'. export function pong(x: number) { if (x > 0) ABC.ping(x-1); } diff --git a/testdata/baselines/reference/submodule/compiler/moduleImport.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleImport.errors.txt.diff deleted file mode 100644 index 67813e9140..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleImport.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.moduleImport.errors.txt -+++ new.moduleImport.errors.txt -@@= skipped -0, +0 lines =@@ - moduleImport.ts(2,17): error TS2694: Namespace 'X' has no exported member 'Y'. -+moduleImport.ts(9,17): error TS2694: Namespace 'A' has no exported member 'B'. - - --==== moduleImport.ts (1 errors) ==== -+==== moduleImport.ts (2 errors) ==== - module A.B.C { - import XYZ = X.Y.Z; - ~ -@@= skipped -12, +13 lines =@@ - - module X { - import ABC = A.B.C; -+ ~ -+!!! error TS2694: Namespace 'A' has no exported member 'B'. - export function pong(x: number) { - if (x > 0) ABC.ping(x-1); - } diff --git a/testdata/baselines/reference/submodule/compiler/moduleImport.symbols b/testdata/baselines/reference/submodule/compiler/moduleImport.symbols index ead2e4661b..78a6b761e4 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleImport.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleImport.symbols @@ -27,6 +27,8 @@ module X { import ABC = A.B.C; >ABC : Symbol(ABC, Decl(moduleImport.ts, 7, 10)) >A : Symbol(A, Decl(moduleImport.ts, 0, 0)) +>B : Symbol(B, Decl(moduleImport.ts, 0, 9)) +>C : Symbol(C, Decl(moduleImport.ts, 0, 11)) export function pong(x: number) { >pong : Symbol(pong, Decl(moduleImport.ts, 8, 20)) @@ -34,7 +36,9 @@ module X { if (x > 0) ABC.ping(x-1); >x : Symbol(x, Decl(moduleImport.ts, 9, 22)) +>ABC.ping : Symbol(ping, Decl(moduleImport.ts, 1, 20)) >ABC : Symbol(ABC, Decl(moduleImport.ts, 7, 10)) +>ping : Symbol(ping, Decl(moduleImport.ts, 1, 20)) >x : Symbol(x, Decl(moduleImport.ts, 9, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/moduleImport.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleImport.symbols.diff index 33b5fe0ce2..1febdded57 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleImport.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleImport.symbols.diff @@ -6,16 +6,20 @@ >A : Symbol(A, Decl(moduleImport.ts, 0, 0)) ->B : Symbol(A.B, Decl(moduleImport.ts, 0, 9)) ->C : Symbol(ABC, Decl(moduleImport.ts, 0, 11)) ++>B : Symbol(B, Decl(moduleImport.ts, 0, 9)) ++>C : Symbol(C, Decl(moduleImport.ts, 0, 11)) export function pong(x: number) { >pong : Symbol(pong, Decl(moduleImport.ts, 8, 20)) -@@= skipped -9, +7 lines =@@ +@@= skipped -9, +9 lines =@@ if (x > 0) ABC.ping(x-1); >x : Symbol(x, Decl(moduleImport.ts, 9, 22)) ->ABC.ping : Symbol(ABC.ping, Decl(moduleImport.ts, 1, 20)) ++>ABC.ping : Symbol(ping, Decl(moduleImport.ts, 1, 20)) >ABC : Symbol(ABC, Decl(moduleImport.ts, 7, 10)) ->ping : Symbol(ABC.ping, Decl(moduleImport.ts, 1, 20)) ++>ping : Symbol(ping, Decl(moduleImport.ts, 1, 20)) >x : Symbol(x, Decl(moduleImport.ts, 9, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.errors.txt deleted file mode 100644 index b4977062dc..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.errors.txt +++ /dev/null @@ -1,52 +0,0 @@ -moduleMemberWithoutTypeAnnotation1.ts(15,20): error TS2304: Cannot find name 'Syntax'. - - -==== moduleMemberWithoutTypeAnnotation1.ts (1 errors) ==== - module TypeScript.Parser { - class SyntaxCursor { - public currentNode(): SyntaxNode { - return null; - } - } - } - - module TypeScript { - export interface ISyntaxElement { }; - export interface ISyntaxToken { }; - - export class PositionedElement { - public childIndex(child: ISyntaxElement) { - return Syntax.childIndex(); - ~~~~~~ -!!! error TS2304: Cannot find name 'Syntax'. - } - } - - export class PositionedToken { - constructor(parent: PositionedElement, token: ISyntaxToken, fullStart: number) { - } - } - } - - module TypeScript { - export class SyntaxNode { - public findToken(position: number, includeSkippedTokens: boolean = false): PositionedToken { - var positionedToken = this.findTokenInternal(null, position, 0); - return null; - } - findTokenInternal(x, y, z) { - return null; - } - } - } - - module TypeScript.Syntax { - export function childIndex() { } - - export class VariableWidthTokenWithTrailingTrivia implements ISyntaxToken { - private findTokenInternal(parent: PositionedElement, position: number, fullStart: number) { - return new PositionedToken(parent, this, fullStart); - } - } - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.errors.txt.diff deleted file mode 100644 index 0ebdc7063e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.errors.txt.diff +++ /dev/null @@ -1,57 +0,0 @@ ---- old.moduleMemberWithoutTypeAnnotation1.errors.txt -+++ new.moduleMemberWithoutTypeAnnotation1.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+moduleMemberWithoutTypeAnnotation1.ts(15,20): error TS2304: Cannot find name 'Syntax'. -+ -+ -+==== moduleMemberWithoutTypeAnnotation1.ts (1 errors) ==== -+ module TypeScript.Parser { -+ class SyntaxCursor { -+ public currentNode(): SyntaxNode { -+ return null; -+ } -+ } -+ } -+ -+ module TypeScript { -+ export interface ISyntaxElement { }; -+ export interface ISyntaxToken { }; -+ -+ export class PositionedElement { -+ public childIndex(child: ISyntaxElement) { -+ return Syntax.childIndex(); -+ ~~~~~~ -+!!! error TS2304: Cannot find name 'Syntax'. -+ } -+ } -+ -+ export class PositionedToken { -+ constructor(parent: PositionedElement, token: ISyntaxToken, fullStart: number) { -+ } -+ } -+ } -+ -+ module TypeScript { -+ export class SyntaxNode { -+ public findToken(position: number, includeSkippedTokens: boolean = false): PositionedToken { -+ var positionedToken = this.findTokenInternal(null, position, 0); -+ return null; -+ } -+ findTokenInternal(x, y, z) { -+ return null; -+ } -+ } -+ } -+ -+ module TypeScript.Syntax { -+ export function childIndex() { } -+ -+ export class VariableWidthTokenWithTrailingTrivia implements ISyntaxToken { -+ private findTokenInternal(parent: PositionedElement, position: number, fullStart: number) { -+ return new PositionedToken(parent, this, fullStart); -+ } -+ } -+ } -+ diff --git a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.symbols b/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.symbols index cf5928cf23..f11c0ffaf3 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.symbols @@ -35,6 +35,9 @@ module TypeScript { >ISyntaxElement : Symbol(ISyntaxElement, Decl(moduleMemberWithoutTypeAnnotation1.ts, 8, 19)) return Syntax.childIndex(); +>Syntax.childIndex : Symbol(childIndex, Decl(moduleMemberWithoutTypeAnnotation1.ts, 36, 26)) +>Syntax : Symbol(Syntax, Decl(moduleMemberWithoutTypeAnnotation1.ts, 36, 18)) +>childIndex : Symbol(childIndex, Decl(moduleMemberWithoutTypeAnnotation1.ts, 36, 26)) } } diff --git a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.symbols.diff index a7481b8aed..649def598c 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.symbols.diff @@ -20,12 +20,14 @@ return Syntax.childIndex(); ->Syntax.childIndex : Symbol(Syntax.childIndex, Decl(moduleMemberWithoutTypeAnnotation1.ts, 36, 26)) -->Syntax : Symbol(Syntax, Decl(moduleMemberWithoutTypeAnnotation1.ts, 36, 18)) ++>Syntax.childIndex : Symbol(childIndex, Decl(moduleMemberWithoutTypeAnnotation1.ts, 36, 26)) + >Syntax : Symbol(Syntax, Decl(moduleMemberWithoutTypeAnnotation1.ts, 36, 18)) ->childIndex : Symbol(Syntax.childIndex, Decl(moduleMemberWithoutTypeAnnotation1.ts, 36, 26)) ++>childIndex : Symbol(childIndex, Decl(moduleMemberWithoutTypeAnnotation1.ts, 36, 26)) } } -@@= skipped -31, +28 lines =@@ +@@= skipped -31, +31 lines =@@ >SyntaxNode : Symbol(SyntaxNode, Decl(moduleMemberWithoutTypeAnnotation1.ts, 24, 19)) public findToken(position: number, includeSkippedTokens: boolean = false): PositionedToken { diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.errors.txt deleted file mode 100644 index e21468955c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -moduleSharesNameWithImportDeclarationInsideIt.ts(7,18): error TS2694: Namespace 'Z' has no exported member 'M'. - - -==== moduleSharesNameWithImportDeclarationInsideIt.ts (1 errors) ==== - module Z.M { - export function bar() { - return ""; - } - } - module A.M { - import M = Z.M; - ~ -!!! error TS2694: Namespace 'Z' has no exported member 'M'. - export function bar() { - } - M.bar(); // Should call Z.M.bar - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.errors.txt.diff deleted file mode 100644 index bbc2b73399..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.moduleSharesNameWithImportDeclarationInsideIt.errors.txt -+++ new.moduleSharesNameWithImportDeclarationInsideIt.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+moduleSharesNameWithImportDeclarationInsideIt.ts(7,18): error TS2694: Namespace 'Z' has no exported member 'M'. -+ -+ -+==== moduleSharesNameWithImportDeclarationInsideIt.ts (1 errors) ==== -+ module Z.M { -+ export function bar() { -+ return ""; -+ } -+ } -+ module A.M { -+ import M = Z.M; -+ ~ -+!!! error TS2694: Namespace 'Z' has no exported member 'M'. -+ export function bar() { -+ } -+ M.bar(); // Should call Z.M.bar -+ } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.symbols b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.symbols index b7555a2258..77a5ce898e 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.symbols @@ -18,10 +18,13 @@ module A.M { import M = Z.M; >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 5, 12)) >Z : Symbol(Z, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 0, 0)) +>M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 0, 9)) export function bar() { >bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 6, 19)) } M.bar(); // Should call Z.M.bar +>M.bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 0, 12)) >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 5, 12)) +>bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 0, 12)) } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.symbols.diff index 0a706d0747..037e132912 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.symbols.diff @@ -1,16 +1,12 @@ --- old.moduleSharesNameWithImportDeclarationInsideIt.symbols +++ new.moduleSharesNameWithImportDeclarationInsideIt.symbols -@@= skipped -17, +17 lines =@@ - import M = Z.M; - >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 5, 12)) - >Z : Symbol(Z, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 0, 0)) -->M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 0, 9)) - - export function bar() { +@@= skipped -23, +23 lines =@@ >bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 6, 19)) } M.bar(); // Should call Z.M.bar ->M.bar : Symbol(M.bar, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 0, 12)) ++>M.bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 0, 12)) >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 5, 12)) ->bar : Symbol(M.bar, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 0, 12)) ++>bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt.ts, 0, 12)) } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt deleted file mode 100644 index b13330238a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -moduleSharesNameWithImportDeclarationInsideIt2.ts(7,25): error TS2694: Namespace 'Z' has no exported member 'M'. - - -==== moduleSharesNameWithImportDeclarationInsideIt2.ts (1 errors) ==== - module Z.M { - export function bar() { - return ""; - } - } - module A.M { - export import M = Z.M; - ~ -!!! error TS2694: Namespace 'Z' has no exported member 'M'. - export function bar() { - } - M.bar(); // Should call Z.M.bar - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt.diff deleted file mode 100644 index bfe9a5068b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.moduleSharesNameWithImportDeclarationInsideIt2.errors.txt -+++ new.moduleSharesNameWithImportDeclarationInsideIt2.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+moduleSharesNameWithImportDeclarationInsideIt2.ts(7,25): error TS2694: Namespace 'Z' has no exported member 'M'. -+ -+ -+==== moduleSharesNameWithImportDeclarationInsideIt2.ts (1 errors) ==== -+ module Z.M { -+ export function bar() { -+ return ""; -+ } -+ } -+ module A.M { -+ export import M = Z.M; -+ ~ -+!!! error TS2694: Namespace 'Z' has no exported member 'M'. -+ export function bar() { -+ } -+ M.bar(); // Should call Z.M.bar -+ } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.symbols b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.symbols index 2f0cffdfb6..36589970a6 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.symbols @@ -18,10 +18,13 @@ module A.M { export import M = Z.M; >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 5, 12)) >Z : Symbol(Z, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 0, 0)) +>M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 0, 9)) export function bar() { >bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 6, 26)) } M.bar(); // Should call Z.M.bar +>M.bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 0, 12)) >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 5, 12)) +>bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 0, 12)) } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.symbols.diff index f25d66be7c..ed0dc78281 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.symbols.diff @@ -1,16 +1,12 @@ --- old.moduleSharesNameWithImportDeclarationInsideIt2.symbols +++ new.moduleSharesNameWithImportDeclarationInsideIt2.symbols -@@= skipped -17, +17 lines =@@ - export import M = Z.M; - >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 5, 12)) - >Z : Symbol(Z, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 0, 0)) -->M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 0, 9)) - - export function bar() { +@@= skipped -23, +23 lines =@@ >bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 6, 26)) } M.bar(); // Should call Z.M.bar ->M.bar : Symbol(M.bar, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 0, 12)) ++>M.bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 0, 12)) >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 5, 12)) ->bar : Symbol(M.bar, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 0, 12)) ++>bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt2.ts, 0, 12)) } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt deleted file mode 100644 index fead59dc77..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -moduleSharesNameWithImportDeclarationInsideIt4.ts(8,18): error TS2694: Namespace 'Z' has no exported member 'M'. - - -==== moduleSharesNameWithImportDeclarationInsideIt4.ts (1 errors) ==== - module Z.M { - export function bar() { - return ""; - } - } - module A.M { - interface M { } - import M = Z.M; - ~ -!!! error TS2694: Namespace 'Z' has no exported member 'M'. - export function bar() { - } - M.bar(); // Should call Z.M.bar - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt.diff deleted file mode 100644 index 4280775a9c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.moduleSharesNameWithImportDeclarationInsideIt4.errors.txt -+++ new.moduleSharesNameWithImportDeclarationInsideIt4.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+moduleSharesNameWithImportDeclarationInsideIt4.ts(8,18): error TS2694: Namespace 'Z' has no exported member 'M'. -+ -+ -+==== moduleSharesNameWithImportDeclarationInsideIt4.ts (1 errors) ==== -+ module Z.M { -+ export function bar() { -+ return ""; -+ } -+ } -+ module A.M { -+ interface M { } -+ import M = Z.M; -+ ~ -+!!! error TS2694: Namespace 'Z' has no exported member 'M'. -+ export function bar() { -+ } -+ M.bar(); // Should call Z.M.bar -+ } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.symbols b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.symbols index beab1ee765..766c40dbe8 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.symbols @@ -21,10 +21,13 @@ module A.M { import M = Z.M; >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 5, 12), Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 6, 19)) >Z : Symbol(Z, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 0, 0)) +>M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 0, 9)) export function bar() { >bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 7, 19)) } M.bar(); // Should call Z.M.bar +>M.bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 0, 12)) >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 5, 12), Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 6, 19)) +>bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 0, 12)) } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.symbols.diff index 04725391f9..db01bd4eed 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.symbols.diff @@ -1,16 +1,12 @@ --- old.moduleSharesNameWithImportDeclarationInsideIt4.symbols +++ new.moduleSharesNameWithImportDeclarationInsideIt4.symbols -@@= skipped -20, +20 lines =@@ - import M = Z.M; - >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 5, 12), Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 6, 19)) - >Z : Symbol(Z, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 0, 0)) -->M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 0, 9)) - - export function bar() { +@@= skipped -26, +26 lines =@@ >bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 7, 19)) } M.bar(); // Should call Z.M.bar ->M.bar : Symbol(M.bar, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 0, 12)) ++>M.bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 0, 12)) >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 5, 12), Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 6, 19)) ->bar : Symbol(M.bar, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 0, 12)) ++>bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt4.ts, 0, 12)) } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.errors.txt b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.errors.txt deleted file mode 100644 index d2fa3a2b4f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -moduleSharesNameWithImportDeclarationInsideIt6.ts(7,18): error TS2694: Namespace 'Z' has no exported member 'M'. - - -==== moduleSharesNameWithImportDeclarationInsideIt6.ts (1 errors) ==== - module Z.M { - export function bar() { - return ""; - } - } - module A.M { - import M = Z.M; - ~ -!!! error TS2694: Namespace 'Z' has no exported member 'M'. - export function bar() { - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.errors.txt.diff deleted file mode 100644 index baa6641f30..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.moduleSharesNameWithImportDeclarationInsideIt6.errors.txt -+++ new.moduleSharesNameWithImportDeclarationInsideIt6.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+moduleSharesNameWithImportDeclarationInsideIt6.ts(7,18): error TS2694: Namespace 'Z' has no exported member 'M'. -+ -+ -+==== moduleSharesNameWithImportDeclarationInsideIt6.ts (1 errors) ==== -+ module Z.M { -+ export function bar() { -+ return ""; -+ } -+ } -+ module A.M { -+ import M = Z.M; -+ ~ -+!!! error TS2694: Namespace 'Z' has no exported member 'M'. -+ export function bar() { -+ } -+ } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.symbols b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.symbols index a75f09dd62..b43d0c7951 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.symbols @@ -18,6 +18,7 @@ module A.M { import M = Z.M; >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt6.ts, 5, 12)) >Z : Symbol(Z, Decl(moduleSharesNameWithImportDeclarationInsideIt6.ts, 0, 0)) +>M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt6.ts, 0, 9)) export function bar() { >bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt6.ts, 6, 19)) diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.symbols.diff deleted file mode 100644 index 97533a0448..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.symbols.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.moduleSharesNameWithImportDeclarationInsideIt6.symbols -+++ new.moduleSharesNameWithImportDeclarationInsideIt6.symbols -@@= skipped -17, +17 lines =@@ - import M = Z.M; - >M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt6.ts, 5, 12)) - >Z : Symbol(Z, Decl(moduleSharesNameWithImportDeclarationInsideIt6.ts, 0, 0)) -->M : Symbol(M, Decl(moduleSharesNameWithImportDeclarationInsideIt6.ts, 0, 9)) - - export function bar() { - >bar : Symbol(bar, Decl(moduleSharesNameWithImportDeclarationInsideIt6.ts, 6, 19)) diff --git a/testdata/baselines/reference/submodule/compiler/moduledecl.errors.txt b/testdata/baselines/reference/submodule/compiler/moduledecl.errors.txt deleted file mode 100644 index 733dbacf34..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduledecl.errors.txt +++ /dev/null @@ -1,259 +0,0 @@ -moduledecl.ts(13,18): error TS2694: Namespace 'b' has no exported member 'a'. -moduledecl.ts(15,19): error TS2694: Namespace 'b' has no exported member 'a'. -moduledecl.ts(41,19): error TS2694: Namespace 'b' has no exported member 'a'. -moduledecl.ts(43,19): error TS2694: Namespace 'c' has no exported member 'a'. -moduledecl.ts(44,19): error TS2694: Namespace 'c' has no exported member 'a'. -moduledecl.ts(78,19): error TS2694: Namespace 'b' has no exported member 'a'. -moduledecl.ts(80,19): error TS2694: Namespace 'c' has no exported member 'a'. -moduledecl.ts(81,19): error TS2694: Namespace 'c' has no exported member 'a'. - - -==== moduledecl.ts (8 errors) ==== - module a { - } - - module b.a { - } - - module c.a.b { - import ma = a; - } - - module mImport { - import d = a; - import e = b.a; - ~ -!!! error TS2694: Namespace 'b' has no exported member 'a'. - import d1 = a; - import e1 = b.a; - ~ -!!! error TS2694: Namespace 'b' has no exported member 'a'. - } - - module m0 { - function f1() { - } - - function f2(s: string); - function f2(n: number); - function f2(ns: any) { - } - - class c1 { - public a : ()=>string; - private b: ()=>number; - private static s1; - public static s2; - } - - interface i1 { - () : Object; - [n: number]: c1; - } - - import m2 = a; - import m3 = b; - import m4 = b.a; - ~ -!!! error TS2694: Namespace 'b' has no exported member 'a'. - import m5 = c; - import m6 = c.a; - ~ -!!! error TS2694: Namespace 'c' has no exported member 'a'. - import m7 = c.a.b; - ~ -!!! error TS2694: Namespace 'c' has no exported member 'a'. - } - - module m1 { - export function f1() { - } - - export function f2(s: string); - export function f2(n: number); - export function f2(ns: any) { - } - - export class c1 { - public a: () =>string; - private b: () =>number; - private static s1; - public static s2; - - public d() { - return "Hello"; - } - - public e: { x: number; y: string; }; - constructor (public n, public n2: number, private n3, private n4: string) { - } - } - - export interface i1 { - () : Object; - [n: number]: c1; - } - - import m2 = a; - import m3 = b; - import m4 = b.a; - ~ -!!! error TS2694: Namespace 'b' has no exported member 'a'. - import m5 = c; - import m6 = c.a; - ~ -!!! error TS2694: Namespace 'c' has no exported member 'a'. - import m7 = c.a.b; - ~ -!!! error TS2694: Namespace 'c' has no exported member 'a'. - } - - module m { - export module m2 { - var a = 10; - export var b: number; - } - - export module m3 { - export var c: number; - } - } - - module m { - - export module m25 { - export module m5 { - export var c: number; - } - } - } - - module m13 { - export module m4 { - export module m2 { - export module m3 { - export var c: number; - } - } - - export function f() { - return 20; - } - } - } - - declare module m4 { - export var b; - } - - declare module m5 { - export var c; - } - - declare module m43 { - export var b; - } - - declare module m55 { - export var c; - } - - declare module "m3" { - export var b: number; - } - - module exportTests { - export class C1_public { - private f2() { - return 30; - } - - public f3() { - return "string"; - } - } - class C2_private { - private f2() { - return 30; - } - - public f3() { - return "string"; - } - } - - export class C3_public { - private getC2_private() { - return new C2_private(); - } - private setC2_private(arg: C2_private) { - } - private get c2() { - return new C2_private(); - } - public getC1_public() { - return new C1_public(); - } - public setC1_public(arg: C1_public) { - } - public get c1() { - return new C1_public(); - } - } - } - - declare module mAmbient { - class C { - public myProp: number; - } - - function foo() : C; - var aVar: C; - interface B { - x: number; - y: C; - } - enum e { - x, - y, - z - } - - module m3 { - class C { - public myProp: number; - } - - function foo(): C; - var aVar: C; - interface B { - x: number; - y: C; - } - enum e { - x, - y, - z - } - } - } - - function foo() { - return mAmbient.foo(); - } - - var cVar = new mAmbient.C(); - var aVar = mAmbient.aVar; - var bB: mAmbient.B; - var eVar: mAmbient.e; - - function m3foo() { - return mAmbient.m3.foo(); - } - - var m3cVar = new mAmbient.m3.C(); - var m3aVar = mAmbient.m3.aVar; - var m3bB: mAmbient.m3.B; - var m3eVar: mAmbient.m3.e; - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/moduledecl.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/moduledecl.errors.txt.diff deleted file mode 100644 index c3d0bcb07f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduledecl.errors.txt.diff +++ /dev/null @@ -1,264 +0,0 @@ ---- old.moduledecl.errors.txt -+++ new.moduledecl.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+moduledecl.ts(13,18): error TS2694: Namespace 'b' has no exported member 'a'. -+moduledecl.ts(15,19): error TS2694: Namespace 'b' has no exported member 'a'. -+moduledecl.ts(41,19): error TS2694: Namespace 'b' has no exported member 'a'. -+moduledecl.ts(43,19): error TS2694: Namespace 'c' has no exported member 'a'. -+moduledecl.ts(44,19): error TS2694: Namespace 'c' has no exported member 'a'. -+moduledecl.ts(78,19): error TS2694: Namespace 'b' has no exported member 'a'. -+moduledecl.ts(80,19): error TS2694: Namespace 'c' has no exported member 'a'. -+moduledecl.ts(81,19): error TS2694: Namespace 'c' has no exported member 'a'. -+ -+ -+==== moduledecl.ts (8 errors) ==== -+ module a { -+ } -+ -+ module b.a { -+ } -+ -+ module c.a.b { -+ import ma = a; -+ } -+ -+ module mImport { -+ import d = a; -+ import e = b.a; -+ ~ -+!!! error TS2694: Namespace 'b' has no exported member 'a'. -+ import d1 = a; -+ import e1 = b.a; -+ ~ -+!!! error TS2694: Namespace 'b' has no exported member 'a'. -+ } -+ -+ module m0 { -+ function f1() { -+ } -+ -+ function f2(s: string); -+ function f2(n: number); -+ function f2(ns: any) { -+ } -+ -+ class c1 { -+ public a : ()=>string; -+ private b: ()=>number; -+ private static s1; -+ public static s2; -+ } -+ -+ interface i1 { -+ () : Object; -+ [n: number]: c1; -+ } -+ -+ import m2 = a; -+ import m3 = b; -+ import m4 = b.a; -+ ~ -+!!! error TS2694: Namespace 'b' has no exported member 'a'. -+ import m5 = c; -+ import m6 = c.a; -+ ~ -+!!! error TS2694: Namespace 'c' has no exported member 'a'. -+ import m7 = c.a.b; -+ ~ -+!!! error TS2694: Namespace 'c' has no exported member 'a'. -+ } -+ -+ module m1 { -+ export function f1() { -+ } -+ -+ export function f2(s: string); -+ export function f2(n: number); -+ export function f2(ns: any) { -+ } -+ -+ export class c1 { -+ public a: () =>string; -+ private b: () =>number; -+ private static s1; -+ public static s2; -+ -+ public d() { -+ return "Hello"; -+ } -+ -+ public e: { x: number; y: string; }; -+ constructor (public n, public n2: number, private n3, private n4: string) { -+ } -+ } -+ -+ export interface i1 { -+ () : Object; -+ [n: number]: c1; -+ } -+ -+ import m2 = a; -+ import m3 = b; -+ import m4 = b.a; -+ ~ -+!!! error TS2694: Namespace 'b' has no exported member 'a'. -+ import m5 = c; -+ import m6 = c.a; -+ ~ -+!!! error TS2694: Namespace 'c' has no exported member 'a'. -+ import m7 = c.a.b; -+ ~ -+!!! error TS2694: Namespace 'c' has no exported member 'a'. -+ } -+ -+ module m { -+ export module m2 { -+ var a = 10; -+ export var b: number; -+ } -+ -+ export module m3 { -+ export var c: number; -+ } -+ } -+ -+ module m { -+ -+ export module m25 { -+ export module m5 { -+ export var c: number; -+ } -+ } -+ } -+ -+ module m13 { -+ export module m4 { -+ export module m2 { -+ export module m3 { -+ export var c: number; -+ } -+ } -+ -+ export function f() { -+ return 20; -+ } -+ } -+ } -+ -+ declare module m4 { -+ export var b; -+ } -+ -+ declare module m5 { -+ export var c; -+ } -+ -+ declare module m43 { -+ export var b; -+ } -+ -+ declare module m55 { -+ export var c; -+ } -+ -+ declare module "m3" { -+ export var b: number; -+ } -+ -+ module exportTests { -+ export class C1_public { -+ private f2() { -+ return 30; -+ } -+ -+ public f3() { -+ return "string"; -+ } -+ } -+ class C2_private { -+ private f2() { -+ return 30; -+ } -+ -+ public f3() { -+ return "string"; -+ } -+ } -+ -+ export class C3_public { -+ private getC2_private() { -+ return new C2_private(); -+ } -+ private setC2_private(arg: C2_private) { -+ } -+ private get c2() { -+ return new C2_private(); -+ } -+ public getC1_public() { -+ return new C1_public(); -+ } -+ public setC1_public(arg: C1_public) { -+ } -+ public get c1() { -+ return new C1_public(); -+ } -+ } -+ } -+ -+ declare module mAmbient { -+ class C { -+ public myProp: number; -+ } -+ -+ function foo() : C; -+ var aVar: C; -+ interface B { -+ x: number; -+ y: C; -+ } -+ enum e { -+ x, -+ y, -+ z -+ } -+ -+ module m3 { -+ class C { -+ public myProp: number; -+ } -+ -+ function foo(): C; -+ var aVar: C; -+ interface B { -+ x: number; -+ y: C; -+ } -+ enum e { -+ x, -+ y, -+ z -+ } -+ } -+ } -+ -+ function foo() { -+ return mAmbient.foo(); -+ } -+ -+ var cVar = new mAmbient.C(); -+ var aVar = mAmbient.aVar; -+ var bB: mAmbient.B; -+ var eVar: mAmbient.e; -+ -+ function m3foo() { -+ return mAmbient.m3.foo(); -+ } -+ -+ var m3cVar = new mAmbient.m3.C(); -+ var m3aVar = mAmbient.m3.aVar; -+ var m3bB: mAmbient.m3.B; -+ var m3eVar: mAmbient.m3.e; -+ -+ diff --git a/testdata/baselines/reference/submodule/compiler/moduledecl.symbols b/testdata/baselines/reference/submodule/compiler/moduledecl.symbols index a926d6b28b..ca9d5198e8 100644 --- a/testdata/baselines/reference/submodule/compiler/moduledecl.symbols +++ b/testdata/baselines/reference/submodule/compiler/moduledecl.symbols @@ -30,6 +30,7 @@ module mImport { import e = b.a; >e : Symbol(e, Decl(moduledecl.ts, 11, 17)) >b : Symbol(b, Decl(moduledecl.ts, 1, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 3, 9)) import d1 = a; >d1 : Symbol(d1, Decl(moduledecl.ts, 12, 19)) @@ -38,6 +39,7 @@ module mImport { import e1 = b.a; >e1 : Symbol(e1, Decl(moduledecl.ts, 13, 18)) >b : Symbol(b, Decl(moduledecl.ts, 1, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 3, 9)) } module m0 { @@ -98,6 +100,7 @@ module m0 { import m4 = b.a; >m4 : Symbol(m4, Decl(moduledecl.ts, 39, 18)) >b : Symbol(b, Decl(moduledecl.ts, 1, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 3, 9)) import m5 = c; >m5 : Symbol(m5, Decl(moduledecl.ts, 40, 20)) @@ -106,10 +109,13 @@ module m0 { import m6 = c.a; >m6 : Symbol(m6, Decl(moduledecl.ts, 41, 18)) >c : Symbol(c, Decl(moduledecl.ts, 4, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 6, 9)) import m7 = c.a.b; >m7 : Symbol(m7, Decl(moduledecl.ts, 42, 20)) >c : Symbol(c, Decl(moduledecl.ts, 4, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 6, 9)) +>b : Symbol(b, Decl(moduledecl.ts, 6, 11)) } module m1 { @@ -188,6 +194,7 @@ module m1 { import m4 = b.a; >m4 : Symbol(m4, Decl(moduledecl.ts, 76, 18)) >b : Symbol(b, Decl(moduledecl.ts, 1, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 3, 9)) import m5 = c; >m5 : Symbol(m5, Decl(moduledecl.ts, 77, 20)) @@ -196,10 +203,13 @@ module m1 { import m6 = c.a; >m6 : Symbol(m6, Decl(moduledecl.ts, 78, 18)) >c : Symbol(c, Decl(moduledecl.ts, 4, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 6, 9)) import m7 = c.a.b; >m7 : Symbol(m7, Decl(moduledecl.ts, 79, 20)) >c : Symbol(c, Decl(moduledecl.ts, 4, 1)) +>a : Symbol(a, Decl(moduledecl.ts, 6, 9)) +>b : Symbol(b, Decl(moduledecl.ts, 6, 11)) } module m { diff --git a/testdata/baselines/reference/submodule/compiler/moduledecl.symbols.diff b/testdata/baselines/reference/submodule/compiler/moduledecl.symbols.diff index d9a42bbd2c..fe1ba20d0d 100644 --- a/testdata/baselines/reference/submodule/compiler/moduledecl.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/moduledecl.symbols.diff @@ -25,6 +25,7 @@ >e : Symbol(e, Decl(moduledecl.ts, 11, 17)) >b : Symbol(b, Decl(moduledecl.ts, 1, 1)) ->a : Symbol(e, Decl(moduledecl.ts, 3, 9)) ++>a : Symbol(a, Decl(moduledecl.ts, 3, 9)) import d1 = a; >d1 : Symbol(d1, Decl(moduledecl.ts, 12, 19)) @@ -35,10 +36,11 @@ >e1 : Symbol(e1, Decl(moduledecl.ts, 13, 18)) >b : Symbol(b, Decl(moduledecl.ts, 1, 1)) ->a : Symbol(e, Decl(moduledecl.ts, 3, 9)) ++>a : Symbol(a, Decl(moduledecl.ts, 3, 9)) } module m0 { -@@= skipped -41, +39 lines =@@ +@@= skipped -41, +41 lines =@@ >c1 : Symbol(c1, Decl(moduledecl.ts, 24, 5)) public a : ()=>string; @@ -76,6 +78,7 @@ ->b : Symbol(m3, Decl(moduledecl.ts, 1, 1)) ->a : Symbol(m3.a, Decl(moduledecl.ts, 3, 9)) +>b : Symbol(b, Decl(moduledecl.ts, 1, 1)) ++>a : Symbol(a, Decl(moduledecl.ts, 3, 9)) import m5 = c; >m5 : Symbol(m5, Decl(moduledecl.ts, 40, 20)) @@ -87,6 +90,7 @@ ->c : Symbol(m5, Decl(moduledecl.ts, 4, 1)) ->a : Symbol(m5.a, Decl(moduledecl.ts, 6, 9)) +>c : Symbol(c, Decl(moduledecl.ts, 4, 1)) ++>a : Symbol(a, Decl(moduledecl.ts, 6, 9)) import m7 = c.a.b; >m7 : Symbol(m7, Decl(moduledecl.ts, 42, 20)) @@ -94,10 +98,12 @@ ->a : Symbol(m5.a, Decl(moduledecl.ts, 6, 9)) ->b : Symbol(m6.b, Decl(moduledecl.ts, 6, 11)) +>c : Symbol(c, Decl(moduledecl.ts, 4, 1)) ++>a : Symbol(a, Decl(moduledecl.ts, 6, 9)) ++>b : Symbol(b, Decl(moduledecl.ts, 6, 11)) } module m1 { -@@= skipped -51, +47 lines =@@ +@@= skipped -51, +51 lines =@@ >c1 : Symbol(c1, Decl(moduledecl.ts, 53, 5)) public a: () =>string; @@ -158,6 +164,7 @@ ->b : Symbol(m3, Decl(moduledecl.ts, 1, 1)) ->a : Symbol(m3.a, Decl(moduledecl.ts, 3, 9)) +>b : Symbol(b, Decl(moduledecl.ts, 1, 1)) ++>a : Symbol(a, Decl(moduledecl.ts, 3, 9)) import m5 = c; >m5 : Symbol(m5, Decl(moduledecl.ts, 77, 20)) @@ -169,6 +176,7 @@ ->c : Symbol(m5, Decl(moduledecl.ts, 4, 1)) ->a : Symbol(m5.a, Decl(moduledecl.ts, 6, 9)) +>c : Symbol(c, Decl(moduledecl.ts, 4, 1)) ++>a : Symbol(a, Decl(moduledecl.ts, 6, 9)) import m7 = c.a.b; >m7 : Symbol(m7, Decl(moduledecl.ts, 79, 20)) @@ -176,10 +184,12 @@ ->a : Symbol(m5.a, Decl(moduledecl.ts, 6, 9)) ->b : Symbol(m6.b, Decl(moduledecl.ts, 6, 11)) +>c : Symbol(c, Decl(moduledecl.ts, 4, 1)) ++>a : Symbol(a, Decl(moduledecl.ts, 6, 9)) ++>b : Symbol(b, Decl(moduledecl.ts, 6, 11)) } module m { -@@= skipped -130, +126 lines =@@ +@@= skipped -130, +130 lines =@@ >C1_public : Symbol(C1_public, Decl(moduledecl.ts, 137, 20)) private f2() { diff --git a/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.symbols b/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.symbols index a7e81f2b49..1349d0ac4f 100644 --- a/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.symbols +++ b/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.symbols @@ -8,7 +8,7 @@ declare module Sample.Thing { >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) ->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) export interface IWidget { >IWidget : Symbol(IWidget, Decl(recursiveClassReferenceTest.ts, 5, 29)) @@ -24,7 +24,7 @@ declare module Sample.Thing { >runner : Symbol(runner, Decl(recursiveClassReferenceTest.ts, 10, 6)) >widget : Symbol(widget, Decl(recursiveClassReferenceTest.ts, 10, 14)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) ->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >IWidget : Symbol(IWidget, Decl(recursiveClassReferenceTest.ts, 5, 29)) } @@ -70,9 +70,9 @@ module Sample.Actions.Thing.Find { export class StartFindAction implements Sample.Thing.IAction { >StartFindAction : Symbol(StartFindAction, Decl(recursiveClassReferenceTest.ts, 31, 34)) >Sample.Thing.IAction : Symbol(IAction, Decl(recursiveClassReferenceTest.ts, 23, 2)) ->Sample.Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>Sample.Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) ->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >IAction : Symbol(IAction, Decl(recursiveClassReferenceTest.ts, 23, 2)) public getId() { return "yo"; } @@ -82,7 +82,7 @@ module Sample.Actions.Thing.Find { >run : Symbol(run, Decl(recursiveClassReferenceTest.ts, 34, 33)) >Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 36, 13)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) ->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >ICodeThing : Symbol(ICodeThing, Decl(recursiveClassReferenceTest.ts, 11, 2)) return true; @@ -92,15 +92,15 @@ module Sample.Actions.Thing.Find { module Sample.Thing.Widgets { >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) ->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 43, 14)) +>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >Widgets : Symbol(Widgets, Decl(recursiveClassReferenceTest.ts, 43, 20)) export class FindWidget implements Sample.Thing.IWidget { >FindWidget : Symbol(FindWidget, Decl(recursiveClassReferenceTest.ts, 43, 29)) >Sample.Thing.IWidget : Symbol(IWidget, Decl(recursiveClassReferenceTest.ts, 5, 29)) ->Sample.Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>Sample.Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) ->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >IWidget : Symbol(IWidget, Decl(recursiveClassReferenceTest.ts, 5, 29)) public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} @@ -108,7 +108,7 @@ module Sample.Thing.Widgets { >runner : Symbol(runner, Decl(recursiveClassReferenceTest.ts, 46, 13)) >widget : Symbol(widget, Decl(recursiveClassReferenceTest.ts, 46, 21)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) ->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >IWidget : Symbol(IWidget, Decl(recursiveClassReferenceTest.ts, 5, 29)) >runner : Symbol(runner, Decl(recursiveClassReferenceTest.ts, 46, 13)) >this : Symbol(FindWidget, Decl(recursiveClassReferenceTest.ts, 43, 29)) @@ -119,7 +119,7 @@ module Sample.Thing.Widgets { constructor(private codeThing: Sample.Thing.ICodeThing) { >codeThing : Symbol(codeThing, Decl(recursiveClassReferenceTest.ts, 49, 14)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) ->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >ICodeThing : Symbol(ICodeThing, Decl(recursiveClassReferenceTest.ts, 11, 2)) // scenario 1 @@ -171,7 +171,7 @@ declare var self: Window; module Sample.Thing.Languages.PlainText { >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) ->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 75, 14)) +>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >Languages : Symbol(Languages, Decl(recursiveClassReferenceTest.ts, 75, 20)) >PlainText : Symbol(PlainText, Decl(recursiveClassReferenceTest.ts, 75, 30)) diff --git a/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.symbols.diff b/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.symbols.diff index 3364d01ad3..cc0233fc15 100644 --- a/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.symbols.diff @@ -1,13 +1,6 @@ --- old.recursiveClassReferenceTest.symbols +++ new.recursiveClassReferenceTest.symbols -@@= skipped -7, +7 lines =@@ - - declare module Sample.Thing { - >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) -->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) -+>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) - - export interface IWidget { +@@= skipped -13, +13 lines =@@ >IWidget : Symbol(IWidget, Decl(recursiveClassReferenceTest.ts, 5, 29)) getDomNode(): any; @@ -24,12 +17,7 @@ >runner : Symbol(runner, Decl(recursiveClassReferenceTest.ts, 10, 6)) >widget : Symbol(widget, Decl(recursiveClassReferenceTest.ts, 10, 14)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) -->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) -+>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) - >IWidget : Symbol(IWidget, Decl(recursiveClassReferenceTest.ts, 5, 29)) - } - -@@= skipped -24, +24 lines =@@ +@@= skipped -18, +18 lines =@@ >ICodeThing : Symbol(ICodeThing, Decl(recursiveClassReferenceTest.ts, 11, 2)) getDomNode(): Element; @@ -71,13 +59,11 @@ export class StartFindAction implements Sample.Thing.IAction { >StartFindAction : Symbol(StartFindAction, Decl(recursiveClassReferenceTest.ts, 31, 34)) ->Sample.Thing.IAction : Symbol(Sample.Thing.IAction, Decl(recursiveClassReferenceTest.ts, 23, 2)) -->Sample.Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) +>Sample.Thing.IAction : Symbol(IAction, Decl(recursiveClassReferenceTest.ts, 23, 2)) -+>Sample.Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) + >Sample.Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) -->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) + >Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) ->IAction : Symbol(Sample.Thing.IAction, Decl(recursiveClassReferenceTest.ts, 23, 2)) -+>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>IAction : Symbol(IAction, Decl(recursiveClassReferenceTest.ts, 23, 2)) public getId() { return "yo"; } @@ -89,29 +75,13 @@ +>run : Symbol(run, Decl(recursiveClassReferenceTest.ts, 34, 33)) >Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 36, 13)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) -->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) + >Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) ->ICodeThing : Symbol(Sample.Thing.ICodeThing, Decl(recursiveClassReferenceTest.ts, 11, 2)) -+>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +>ICodeThing : Symbol(ICodeThing, Decl(recursiveClassReferenceTest.ts, 11, 2)) return true; } -@@= skipped -23, +23 lines =@@ - - module Sample.Thing.Widgets { - >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) -->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) -+>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 43, 14)) - >Widgets : Symbol(Widgets, Decl(recursiveClassReferenceTest.ts, 43, 20)) - - export class FindWidget implements Sample.Thing.IWidget { - >FindWidget : Symbol(FindWidget, Decl(recursiveClassReferenceTest.ts, 43, 29)) - >Sample.Thing.IWidget : Symbol(IWidget, Decl(recursiveClassReferenceTest.ts, 5, 29)) -->Sample.Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) -+>Sample.Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) - >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) -->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) -+>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) +@@= skipped -35, +35 lines =@@ >IWidget : Symbol(IWidget, Decl(recursiveClassReferenceTest.ts, 5, 29)) public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} @@ -120,10 +90,7 @@ >runner : Symbol(runner, Decl(recursiveClassReferenceTest.ts, 46, 13)) >widget : Symbol(widget, Decl(recursiveClassReferenceTest.ts, 46, 21)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) -->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) -+>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) - >IWidget : Symbol(IWidget, Decl(recursiveClassReferenceTest.ts, 5, 29)) - >runner : Symbol(runner, Decl(recursiveClassReferenceTest.ts, 46, 13)) +@@= skipped -10, +10 lines =@@ >this : Symbol(FindWidget, Decl(recursiveClassReferenceTest.ts, 43, 29)) private domNode:any = null; @@ -134,8 +101,7 @@ ->codeThing : Symbol(FindWidget.codeThing, Decl(recursiveClassReferenceTest.ts, 49, 14)) +>codeThing : Symbol(codeThing, Decl(recursiveClassReferenceTest.ts, 49, 14)) >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) -->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) -+>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22)) + >Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) >ICodeThing : Symbol(ICodeThing, Decl(recursiveClassReferenceTest.ts, 11, 2)) // scenario 1 @@ -161,7 +127,7 @@ } -@@= skipped -54, +54 lines =@@ +@@= skipped -32, +32 lines =@@ interface IMode { getInitialState(): IState;} >IMode : Symbol(IMode, Decl(recursiveClassReferenceTest.ts, 63, 1)) @@ -186,16 +152,7 @@ >Window : Symbol(Window, Decl(recursiveClassReferenceTest.ts, 68, 19)) } declare var self: Window; -@@= skipped -9, +9 lines =@@ - - module Sample.Thing.Languages.PlainText { - >Sample : Symbol(Sample, Decl(recursiveClassReferenceTest.ts, 0, 0), Decl(recursiveClassReferenceTest.ts, 29, 1), Decl(recursiveClassReferenceTest.ts, 41, 1), Decl(recursiveClassReferenceTest.ts, 73, 25)) -->Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 5, 22), Decl(recursiveClassReferenceTest.ts, 43, 14), Decl(recursiveClassReferenceTest.ts, 75, 14)) -+>Thing : Symbol(Thing, Decl(recursiveClassReferenceTest.ts, 75, 14)) - >Languages : Symbol(Languages, Decl(recursiveClassReferenceTest.ts, 75, 20)) - >PlainText : Symbol(PlainText, Decl(recursiveClassReferenceTest.ts, 75, 30)) - -@@= skipped -9, +9 lines =@@ +@@= skipped -18, +18 lines =@@ >IState : Symbol(IState, Decl(recursiveClassReferenceTest.ts, 66, 88)) constructor(private mode: IMode) { } diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapSample.errors.txt b/testdata/baselines/reference/submodule/compiler/sourceMapSample.errors.txt index 05a53f1ffb..c82d38a07e 100644 --- a/testdata/baselines/reference/submodule/compiler/sourceMapSample.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/sourceMapSample.errors.txt @@ -1,4 +1,4 @@ -sourceMapSample.ts(14,41): error TS2694: Namespace 'Foo' has no exported member 'Bar'. +sourceMapSample.ts(14,45): error TS2694: Namespace 'Foo.Bar' has no exported member 'Greeter'. ==== sourceMapSample.ts (1 errors) ==== @@ -16,8 +16,8 @@ sourceMapSample.ts(14,41): error TS2694: Namespace 'Foo' has no exported member function foo(greeting: string): Foo.Bar.Greeter { - ~~~ -!!! error TS2694: Namespace 'Foo' has no exported member 'Bar'. + ~~~~~~~ +!!! error TS2694: Namespace 'Foo.Bar' has no exported member 'Greeter'. return new Greeter(greeting); } diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapSample.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/sourceMapSample.errors.txt.diff deleted file mode 100644 index 9590f12514..0000000000 --- a/testdata/baselines/reference/submodule/compiler/sourceMapSample.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.sourceMapSample.errors.txt -+++ new.sourceMapSample.errors.txt -@@= skipped -0, +0 lines =@@ --sourceMapSample.ts(14,45): error TS2694: Namespace 'Foo.Bar' has no exported member 'Greeter'. -+sourceMapSample.ts(14,41): error TS2694: Namespace 'Foo' has no exported member 'Bar'. - - - ==== sourceMapSample.ts (1 errors) ==== -@@= skipped -15, +15 lines =@@ - - - function foo(greeting: string): Foo.Bar.Greeter { -- ~~~~~~~ --!!! error TS2694: Namespace 'Foo.Bar' has no exported member 'Greeter'. -+ ~~~ -+!!! error TS2694: Namespace 'Foo' has no exported member 'Bar'. - return new Greeter(greeting); - } - diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapSample.symbols b/testdata/baselines/reference/submodule/compiler/sourceMapSample.symbols index a504183cf1..a7fbd0c597 100644 --- a/testdata/baselines/reference/submodule/compiler/sourceMapSample.symbols +++ b/testdata/baselines/reference/submodule/compiler/sourceMapSample.symbols @@ -29,7 +29,7 @@ module Foo.Bar { >foo : Symbol(foo, Decl(sourceMapSample.ts, 10, 5)) >greeting : Symbol(greeting, Decl(sourceMapSample.ts, 13, 17)) >Foo : Symbol(Foo, Decl(sourceMapSample.ts, 0, 0)) ->Bar : Symbol(Bar) +>Bar : Symbol(Bar, Decl(sourceMapSample.ts, 0, 11)) >Greeter : Symbol(Greeter) return new Greeter(greeting); diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapSample.symbols.diff b/testdata/baselines/reference/submodule/compiler/sourceMapSample.symbols.diff index 99ec12a578..26825b582d 100644 --- a/testdata/baselines/reference/submodule/compiler/sourceMapSample.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/sourceMapSample.symbols.diff @@ -21,18 +21,16 @@ } } -@@= skipped -18, +18 lines =@@ - >foo : Symbol(foo, Decl(sourceMapSample.ts, 10, 5)) +@@= skipped -19, +19 lines =@@ >greeting : Symbol(greeting, Decl(sourceMapSample.ts, 13, 17)) >Foo : Symbol(Foo, Decl(sourceMapSample.ts, 0, 0)) -->Bar : Symbol(Bar, Decl(sourceMapSample.ts, 0, 11)) + >Bar : Symbol(Bar, Decl(sourceMapSample.ts, 0, 11)) ->Greeter : Symbol(Foo.Bar.Greeter) -+>Bar : Symbol(Bar) +>Greeter : Symbol(Greeter) return new Greeter(greeting); >Greeter : Symbol(Greeter, Decl(sourceMapSample.ts, 1, 17)) -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ var str = greeter.greet(); >str : Symbol(str, Decl(sourceMapSample.ts, 18, 7)) diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.errors.txt b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.errors.txt index 670f9fbdd6..4c67c17831 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.errors.txt @@ -1,7 +1,4 @@ -module.ts(3,33): error TS2351: This expression is not constructable. - Type 'typeof Point' has no construct signatures. -test.ts(2,16): error TS2339: Property 'Y' does not exist on type 'typeof X'. -test.ts(3,12): error TS2339: Property 'Y' does not exist on type 'typeof X'. +module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ==== class.ts (0 errors) ==== @@ -19,21 +16,16 @@ test.ts(3,12): error TS2339: Property 'Y' does not exist on type 'typeof X'. ==== module.ts (1 errors) ==== module X.Y { export module Point { + ~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var Origin = new Point(0, 0); - ~~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'typeof Point' has no construct signatures. } } -==== test.ts (2 errors) ==== +==== test.ts (0 errors) ==== //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); - ~ -!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? - ~ -!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. ==== simple.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.errors.txt.diff deleted file mode 100644 index 3870b90265..0000000000 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.errors.txt.diff +++ /dev/null @@ -1,36 +0,0 @@ ---- old.ClassAndModuleWithSameNameAndCommonRoot.errors.txt -+++ new.ClassAndModuleWithSameNameAndCommonRoot.errors.txt -@@= skipped -0, +0 lines =@@ --module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -+module.ts(3,33): error TS2351: This expression is not constructable. -+ Type 'typeof Point' has no construct signatures. -+test.ts(2,16): error TS2339: Property 'Y' does not exist on type 'typeof X'. -+test.ts(3,12): error TS2339: Property 'Y' does not exist on type 'typeof X'. - - - ==== class.ts (0 errors) ==== -@@= skipped -15, +18 lines =@@ - ==== module.ts (1 errors) ==== - module X.Y { - export module Point { -- ~~~~~ --!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var Origin = new Point(0, 0); -+ ~~~~~ -+!!! error TS2351: This expression is not constructable. -+!!! error TS2351: Type 'typeof Point' has no construct signatures. - } - } - --==== test.ts (0 errors) ==== -+==== test.ts (2 errors) ==== - //var cl: { x: number; y: number; } - var cl = new X.Y.Point(1,1); -+ ~ -+!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. - var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? -+ ~ -+!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. - - - ==== simple.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols index 53f25d4712..2538a42a89 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols @@ -3,10 +3,10 @@ === class.ts === module X.Y { >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) ->Y : Symbol(Y, Decl(class.ts, 0, 9)) +>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) export class Point { ->Point : Symbol(Point, Decl(class.ts, 0, 12)) +>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) constructor(x: number, y: number) { >x : Symbol(x, Decl(class.ts, 2, 20)) @@ -14,13 +14,13 @@ module X.Y { this.x = x; >this.x : Symbol(x, Decl(class.ts, 5, 9)) ->this : Symbol(Point, Decl(class.ts, 0, 12)) +>this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) >x : Symbol(x, Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; >this.y : Symbol(y, Decl(class.ts, 6, 18)) ->this : Symbol(Point, Decl(class.ts, 0, 12)) +>this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) >y : Symbol(y, Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } @@ -35,14 +35,14 @@ module X.Y { === module.ts === module X.Y { >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) ->Y : Symbol(Y, Decl(module.ts, 0, 9)) +>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) export module Point { ->Point : Symbol(Point, Decl(module.ts, 0, 12)) +>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) export var Origin = new Point(0, 0); >Origin : Symbol(Origin, Decl(module.ts, 2, 18)) ->Point : Symbol(Point, Decl(module.ts, 0, 12)) +>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) } } @@ -50,11 +50,21 @@ module X.Y { //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); >cl : Symbol(cl, Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) +>X.Y.Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) +>X.Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) +>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) +>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? >cl : Symbol(cl, Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) +>X.Y.Point.Origin : Symbol(Origin, Decl(module.ts, 2, 18)) +>X.Y.Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) +>X.Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) +>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) +>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) +>Origin : Symbol(Origin, Decl(module.ts, 2, 18)) === simple.ts === diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff index a1200fd7db..ba12629ccb 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.symbols.diff @@ -1,35 +1,21 @@ --- old.ClassAndModuleWithSameNameAndCommonRoot.symbols +++ new.ClassAndModuleWithSameNameAndCommonRoot.symbols -@@= skipped -2, +2 lines =@@ - === class.ts === - module X.Y { - >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) -->Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) -+>Y : Symbol(Y, Decl(class.ts, 0, 9)) - - export class Point { -->Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) -+>Point : Symbol(Point, Decl(class.ts, 0, 12)) - - constructor(x: number, y: number) { - >x : Symbol(x, Decl(class.ts, 2, 20)) +@@= skipped -12, +12 lines =@@ >y : Symbol(y, Decl(class.ts, 2, 30)) this.x = x; ->this.x : Symbol(Point.x, Decl(class.ts, 5, 9)) -->this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) -->x : Symbol(Point.x, Decl(class.ts, 5, 9)) +>this.x : Symbol(x, Decl(class.ts, 5, 9)) -+>this : Symbol(Point, Decl(class.ts, 0, 12)) + >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) +->x : Symbol(Point.x, Decl(class.ts, 5, 9)) +>x : Symbol(x, Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; ->this.y : Symbol(Point.y, Decl(class.ts, 6, 18)) -->this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) -->y : Symbol(Point.y, Decl(class.ts, 6, 18)) +>this.y : Symbol(y, Decl(class.ts, 6, 18)) -+>this : Symbol(Point, Decl(class.ts, 0, 12)) + >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) +->y : Symbol(Point.y, Decl(class.ts, 6, 18)) +>y : Symbol(y, Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } @@ -43,46 +29,39 @@ } } - === module.ts === - module X.Y { - >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) -->Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) -+>Y : Symbol(Y, Decl(module.ts, 0, 9)) - - export module Point { -->Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) -+>Point : Symbol(Point, Decl(module.ts, 0, 12)) - - export var Origin = new Point(0, 0); - >Origin : Symbol(Origin, Decl(module.ts, 2, 18)) -->Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) -+>Point : Symbol(Point, Decl(module.ts, 0, 12)) - } - } - -@@= skipped -47, +47 lines =@@ +@@= skipped -37, +37 lines =@@ //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); >cl : Symbol(cl, Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) ->X.Y.Point : Symbol(X.Y.Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->X.Y : Symbol(X.Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ++>X.Y.Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ++>X.Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) ->Y : Symbol(X.Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ->Point : Symbol(X.Y.Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ++>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ++>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? >cl : Symbol(cl, Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) ->X.Y.Point.Origin : Symbol(X.Y.Point.Origin, Decl(module.ts, 2, 18)) ->X.Y.Point : Symbol(X.Y.Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->X.Y : Symbol(X.Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ++>X.Y.Point.Origin : Symbol(Origin, Decl(module.ts, 2, 18)) ++>X.Y.Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ++>X.Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) ->Y : Symbol(X.Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ->Point : Symbol(X.Y.Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->Origin : Symbol(X.Y.Point.Origin, Decl(module.ts, 2, 18)) ++>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ++>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ++>Origin : Symbol(Origin, Decl(module.ts, 2, 18)) === simple.ts === -@@= skipped -22, +12 lines =@@ +@@= skipped -22, +22 lines =@@ >A : Symbol(A, Decl(simple.ts, 0, 0), Decl(simple.ts, 2, 1)) id: string; diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt index 670f9fbdd6..4c67c17831 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt @@ -1,7 +1,4 @@ -module.ts(3,33): error TS2351: This expression is not constructable. - Type 'typeof Point' has no construct signatures. -test.ts(2,16): error TS2339: Property 'Y' does not exist on type 'typeof X'. -test.ts(3,12): error TS2339: Property 'Y' does not exist on type 'typeof X'. +module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ==== class.ts (0 errors) ==== @@ -19,21 +16,16 @@ test.ts(3,12): error TS2339: Property 'Y' does not exist on type 'typeof X'. ==== module.ts (1 errors) ==== module X.Y { export module Point { + ~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var Origin = new Point(0, 0); - ~~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'typeof Point' has no construct signatures. } } -==== test.ts (2 errors) ==== +==== test.ts (0 errors) ==== //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); - ~ -!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? - ~ -!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. ==== simple.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt.diff deleted file mode 100644 index c5ed5875eb..0000000000 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt.diff +++ /dev/null @@ -1,36 +0,0 @@ ---- old.ClassAndModuleWithSameNameAndCommonRootES6.errors.txt -+++ new.ClassAndModuleWithSameNameAndCommonRootES6.errors.txt -@@= skipped -0, +0 lines =@@ --module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -+module.ts(3,33): error TS2351: This expression is not constructable. -+ Type 'typeof Point' has no construct signatures. -+test.ts(2,16): error TS2339: Property 'Y' does not exist on type 'typeof X'. -+test.ts(3,12): error TS2339: Property 'Y' does not exist on type 'typeof X'. - - - ==== class.ts (0 errors) ==== -@@= skipped -15, +18 lines =@@ - ==== module.ts (1 errors) ==== - module X.Y { - export module Point { -- ~~~~~ --!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var Origin = new Point(0, 0); -+ ~~~~~ -+!!! error TS2351: This expression is not constructable. -+!!! error TS2351: Type 'typeof Point' has no construct signatures. - } - } - --==== test.ts (0 errors) ==== -+==== test.ts (2 errors) ==== - //var cl: { x: number; y: number; } - var cl = new X.Y.Point(1,1); -+ ~ -+!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. - var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? -+ ~ -+!!! error TS2339: Property 'Y' does not exist on type 'typeof X'. - - - ==== simple.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols index 19e1b4bdf4..8420b0dbba 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols @@ -3,10 +3,10 @@ === class.ts === module X.Y { >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) ->Y : Symbol(Y, Decl(class.ts, 0, 9)) +>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) export class Point { ->Point : Symbol(Point, Decl(class.ts, 0, 12)) +>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) constructor(x: number, y: number) { >x : Symbol(x, Decl(class.ts, 2, 20)) @@ -14,13 +14,13 @@ module X.Y { this.x = x; >this.x : Symbol(x, Decl(class.ts, 5, 9)) ->this : Symbol(Point, Decl(class.ts, 0, 12)) +>this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) >x : Symbol(x, Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; >this.y : Symbol(y, Decl(class.ts, 6, 18)) ->this : Symbol(Point, Decl(class.ts, 0, 12)) +>this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) >y : Symbol(y, Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } @@ -35,14 +35,14 @@ module X.Y { === module.ts === module X.Y { >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) ->Y : Symbol(Y, Decl(module.ts, 0, 9)) +>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) export module Point { ->Point : Symbol(Point, Decl(module.ts, 0, 12)) +>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) export var Origin = new Point(0, 0); >Origin : Symbol(Origin, Decl(module.ts, 2, 18)) ->Point : Symbol(Point, Decl(module.ts, 0, 12)) +>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) } } @@ -50,11 +50,21 @@ module X.Y { //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); >cl : Symbol(cl, Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) +>X.Y.Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) +>X.Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) +>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) +>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? >cl : Symbol(cl, Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) +>X.Y.Point.Origin : Symbol(Origin, Decl(module.ts, 2, 18)) +>X.Y.Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) +>X.Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) +>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) +>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) +>Origin : Symbol(Origin, Decl(module.ts, 2, 18)) === simple.ts === diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff index e95a514784..6bee47df4c 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.symbols.diff @@ -1,35 +1,21 @@ --- old.ClassAndModuleWithSameNameAndCommonRootES6.symbols +++ new.ClassAndModuleWithSameNameAndCommonRootES6.symbols -@@= skipped -2, +2 lines =@@ - === class.ts === - module X.Y { - >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) -->Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) -+>Y : Symbol(Y, Decl(class.ts, 0, 9)) - - export class Point { -->Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) -+>Point : Symbol(Point, Decl(class.ts, 0, 12)) - - constructor(x: number, y: number) { - >x : Symbol(x, Decl(class.ts, 2, 20)) +@@= skipped -12, +12 lines =@@ >y : Symbol(y, Decl(class.ts, 2, 30)) this.x = x; ->this.x : Symbol(Point.x, Decl(class.ts, 5, 9)) -->this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) -->x : Symbol(Point.x, Decl(class.ts, 5, 9)) +>this.x : Symbol(x, Decl(class.ts, 5, 9)) -+>this : Symbol(Point, Decl(class.ts, 0, 12)) + >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) +->x : Symbol(Point.x, Decl(class.ts, 5, 9)) +>x : Symbol(x, Decl(class.ts, 5, 9)) >x : Symbol(x, Decl(class.ts, 2, 20)) this.y = y; ->this.y : Symbol(Point.y, Decl(class.ts, 6, 18)) -->this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) -->y : Symbol(Point.y, Decl(class.ts, 6, 18)) +>this.y : Symbol(y, Decl(class.ts, 6, 18)) -+>this : Symbol(Point, Decl(class.ts, 0, 12)) + >this : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) +->y : Symbol(Point.y, Decl(class.ts, 6, 18)) +>y : Symbol(y, Decl(class.ts, 6, 18)) >y : Symbol(y, Decl(class.ts, 2, 30)) } @@ -43,46 +29,39 @@ } } - === module.ts === - module X.Y { - >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) -->Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) -+>Y : Symbol(Y, Decl(module.ts, 0, 9)) - - export module Point { -->Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) -+>Point : Symbol(Point, Decl(module.ts, 0, 12)) - - export var Origin = new Point(0, 0); - >Origin : Symbol(Origin, Decl(module.ts, 2, 18)) -->Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) -+>Point : Symbol(Point, Decl(module.ts, 0, 12)) - } - } - -@@= skipped -47, +47 lines =@@ +@@= skipped -37, +37 lines =@@ //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); >cl : Symbol(cl, Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) ->X.Y.Point : Symbol(X.Y.Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->X.Y : Symbol(X.Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ++>X.Y.Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ++>X.Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) ->Y : Symbol(X.Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ->Point : Symbol(X.Y.Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ++>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ++>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? >cl : Symbol(cl, Decl(test.ts, 1, 3), Decl(test.ts, 2, 3)) ->X.Y.Point.Origin : Symbol(X.Y.Point.Origin, Decl(module.ts, 2, 18)) ->X.Y.Point : Symbol(X.Y.Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->X.Y : Symbol(X.Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ++>X.Y.Point.Origin : Symbol(Origin, Decl(module.ts, 2, 18)) ++>X.Y.Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ++>X.Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) >X : Symbol(X, Decl(class.ts, 0, 0), Decl(module.ts, 0, 0)) ->Y : Symbol(X.Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ->Point : Symbol(X.Y.Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ->Origin : Symbol(X.Y.Point.Origin, Decl(module.ts, 2, 18)) ++>Y : Symbol(Y, Decl(class.ts, 0, 9), Decl(module.ts, 0, 9)) ++>Point : Symbol(Point, Decl(class.ts, 0, 12), Decl(module.ts, 0, 12)) ++>Origin : Symbol(Origin, Decl(module.ts, 2, 18)) === simple.ts === -@@= skipped -22, +12 lines =@@ +@@= skipped -22, +22 lines =@@ >A : Symbol(A, Decl(simple.ts, 0, 0), Decl(simple.ts, 2, 1)) id: string; diff --git a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.errors.txt b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.errors.txt index a239e94528..1da20e5604 100644 --- a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.errors.txt @@ -1,5 +1,4 @@ -module.ts(3,33): error TS2351: This expression is not constructable. - Type 'typeof Point' has no construct signatures. +module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. simple.ts(2,31): error TS2449: Class 'A' used before its declaration. @@ -7,10 +6,9 @@ simple.ts(2,31): error TS2449: Class 'A' used before its declaration. ==== module.ts (1 errors) ==== module X.Y { export module Point { + ~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var Origin = new Point(0, 0); - ~~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'typeof Point' has no construct signatures. } } diff --git a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.errors.txt.diff deleted file mode 100644 index 7e52d4abe7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.ModuleAndClassWithSameNameAndCommonRoot.errors.txt -+++ new.ModuleAndClassWithSameNameAndCommonRoot.errors.txt -@@= skipped -0, +0 lines =@@ --module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -+module.ts(3,33): error TS2351: This expression is not constructable. -+ Type 'typeof Point' has no construct signatures. - simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. - simple.ts(2,31): error TS2449: Class 'A' used before its declaration. - -@@= skipped -5, +6 lines =@@ - ==== module.ts (1 errors) ==== - module X.Y { - export module Point { -- ~~~~~ --!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var Origin = new Point(0, 0); -+ ~~~~~ -+!!! error TS2351: This expression is not constructable. -+!!! error TS2351: Type 'typeof Point' has no construct signatures. - } - } - diff --git a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols index 5c56045494..9f4a5683b0 100644 --- a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols +++ b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols @@ -3,25 +3,25 @@ === module.ts === module X.Y { >X : Symbol(X, Decl(module.ts, 0, 0), Decl(classPoint.ts, 0, 0)) ->Y : Symbol(Y, Decl(module.ts, 0, 9)) +>Y : Symbol(Y, Decl(module.ts, 0, 9), Decl(classPoint.ts, 0, 9)) export module Point { ->Point : Symbol(Point, Decl(module.ts, 0, 12)) +>Point : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) export var Origin = new Point(0, 0); >Origin : Symbol(Origin, Decl(module.ts, 2, 18)) ->Point : Symbol(Point, Decl(module.ts, 0, 12)) +>Point : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) } } === classPoint.ts === module X.Y { >X : Symbol(X, Decl(module.ts, 0, 0), Decl(classPoint.ts, 0, 0)) ->Y : Symbol(Y, Decl(classPoint.ts, 0, 9)) +>Y : Symbol(Y, Decl(module.ts, 0, 9), Decl(classPoint.ts, 0, 9)) // duplicate identifier export class Point { ->Point : Symbol(Point, Decl(classPoint.ts, 0, 12)) +>Point : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) constructor(x: number, y: number) { >x : Symbol(x, Decl(classPoint.ts, 3, 20)) @@ -29,13 +29,13 @@ module X.Y { this.x = x; >this.x : Symbol(x, Decl(classPoint.ts, 6, 9)) ->this : Symbol(Point, Decl(classPoint.ts, 0, 12)) +>this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) >x : Symbol(x, Decl(classPoint.ts, 6, 9)) >x : Symbol(x, Decl(classPoint.ts, 3, 20)) this.y = y; >this.y : Symbol(y, Decl(classPoint.ts, 7, 18)) ->this : Symbol(Point, Decl(classPoint.ts, 0, 12)) +>this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) >y : Symbol(y, Decl(classPoint.ts, 7, 18)) >y : Symbol(y, Decl(classPoint.ts, 3, 30)) } diff --git a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff index 3807b48cad..21b8b5a549 100644 --- a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.symbols.diff @@ -1,53 +1,21 @@ --- old.ModuleAndClassWithSameNameAndCommonRoot.symbols +++ new.ModuleAndClassWithSameNameAndCommonRoot.symbols -@@= skipped -2, +2 lines =@@ - === module.ts === - module X.Y { - >X : Symbol(X, Decl(module.ts, 0, 0), Decl(classPoint.ts, 0, 0)) -->Y : Symbol(Y, Decl(module.ts, 0, 9), Decl(classPoint.ts, 0, 9)) -+>Y : Symbol(Y, Decl(module.ts, 0, 9)) - - export module Point { -->Point : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) -+>Point : Symbol(Point, Decl(module.ts, 0, 12)) - - export var Origin = new Point(0, 0); - >Origin : Symbol(Origin, Decl(module.ts, 2, 18)) -->Point : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) -+>Point : Symbol(Point, Decl(module.ts, 0, 12)) - } - } - - === classPoint.ts === - module X.Y { - >X : Symbol(X, Decl(module.ts, 0, 0), Decl(classPoint.ts, 0, 0)) -->Y : Symbol(Y, Decl(module.ts, 0, 9), Decl(classPoint.ts, 0, 9)) -+>Y : Symbol(Y, Decl(classPoint.ts, 0, 9)) - - // duplicate identifier - export class Point { -->Point : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) -+>Point : Symbol(Point, Decl(classPoint.ts, 0, 12)) - - constructor(x: number, y: number) { - >x : Symbol(x, Decl(classPoint.ts, 3, 20)) +@@= skipped -27, +27 lines =@@ >y : Symbol(y, Decl(classPoint.ts, 3, 30)) this.x = x; ->this.x : Symbol(Point.x, Decl(classPoint.ts, 6, 9)) -->this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) -->x : Symbol(Point.x, Decl(classPoint.ts, 6, 9)) +>this.x : Symbol(x, Decl(classPoint.ts, 6, 9)) -+>this : Symbol(Point, Decl(classPoint.ts, 0, 12)) + >this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) +->x : Symbol(Point.x, Decl(classPoint.ts, 6, 9)) +>x : Symbol(x, Decl(classPoint.ts, 6, 9)) >x : Symbol(x, Decl(classPoint.ts, 3, 20)) this.y = y; ->this.y : Symbol(Point.y, Decl(classPoint.ts, 7, 18)) -->this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) -->y : Symbol(Point.y, Decl(classPoint.ts, 7, 18)) +>this.y : Symbol(y, Decl(classPoint.ts, 7, 18)) -+>this : Symbol(Point, Decl(classPoint.ts, 0, 12)) + >this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12)) +->y : Symbol(Point.y, Decl(classPoint.ts, 7, 18)) +>y : Symbol(y, Decl(classPoint.ts, 7, 18)) >y : Symbol(y, Decl(classPoint.ts, 3, 30)) } @@ -61,7 +29,7 @@ } } -@@= skipped -58, +58 lines =@@ +@@= skipped -33, +33 lines =@@ >A : Symbol(A, Decl(simple.ts, 0, 0), Decl(simple.ts, 2, 1)) id: string; diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.errors.txt b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.errors.txt deleted file mode 100644 index 77fb0d3260..0000000000 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.errors.txt +++ /dev/null @@ -1,46 +0,0 @@ -TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts(38,14): error TS2694: Namespace 'X.Y.Z' has no exported member 'Line'. - - -==== TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts (1 errors) ==== - module A { - export class Point { - x: number; - y: number; - } - } - - module A { - class Point { - fromCarthesian(p: A.Point) { - return { x: p.x, y: p.y }; - } - } - } - - // ensure merges as expected - var p: { x: number; y: number; }; - var p: A.Point; - - module X.Y.Z { - export class Line { - length: number; - } - } - - module X { - export module Y { - export module Z { - class Line { - name: string; - } - } - } - } - - // ensure merges as expected - var l: { length: number; } - var l: X.Y.Z.Line; - ~~~~ -!!! error TS2694: Namespace 'X.Y.Z' has no exported member 'Line'. - - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.errors.txt.diff deleted file mode 100644 index 65802bf7ab..0000000000 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.errors.txt.diff +++ /dev/null @@ -1,51 +0,0 @@ ---- old.TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.errors.txt -+++ new.TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts(38,14): error TS2694: Namespace 'X.Y.Z' has no exported member 'Line'. -+ -+ -+==== TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts (1 errors) ==== -+ module A { -+ export class Point { -+ x: number; -+ y: number; -+ } -+ } -+ -+ module A { -+ class Point { -+ fromCarthesian(p: A.Point) { -+ return { x: p.x, y: p.y }; -+ } -+ } -+ } -+ -+ // ensure merges as expected -+ var p: { x: number; y: number; }; -+ var p: A.Point; -+ -+ module X.Y.Z { -+ export class Line { -+ length: number; -+ } -+ } -+ -+ module X { -+ export module Y { -+ export module Z { -+ class Line { -+ name: string; -+ } -+ } -+ } -+ } -+ -+ // ensure merges as expected -+ var l: { length: number; } -+ var l: X.Y.Z.Line; -+ ~~~~ -+!!! error TS2694: Namespace 'X.Y.Z' has no exported member 'Line'. -+ -+ diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols index cb976e6f22..b84590ed30 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols @@ -53,8 +53,8 @@ var p: A.Point; module X.Y.Z { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 17, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 23, 1)) ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 9)) ->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 11)) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) export class Line { >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 14)) @@ -68,10 +68,10 @@ module X { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 17, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 23, 1)) export module Y { ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) export module Z { ->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) class Line { >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 27, 25)) @@ -91,8 +91,8 @@ var l: { length: number; } var l: X.Y.Z.Line; >l : Symbol(l, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 36, 3), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 37, 3)) >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 17, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 23, 1)) ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) ->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) ->Line : Symbol(Line) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) +>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 14)) diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols.diff index 07dc0fb01d..3c05a3875a 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.symbols.diff @@ -48,12 +48,7 @@ module X.Y.Z { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 17, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 23, 1)) -->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) -->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 9)) -+>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 11)) - - export class Line { +@@= skipped -11, +11 lines =@@ >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 14)) length: number; @@ -62,18 +57,7 @@ } } -@@= skipped -19, +19 lines =@@ - >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 17, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 23, 1)) - - export module Y { -->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) - - export module Z { -->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) -+>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) - - class Line { +@@= skipped -17, +17 lines =@@ >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 27, 25)) name: string; @@ -82,15 +66,15 @@ } } } -@@= skipped -23, +23 lines =@@ +@@= skipped -14, +14 lines =@@ var l: X.Y.Z.Line; >l : Symbol(l, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 36, 3), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 37, 3)) >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 17, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 23, 1)) ->Y : Symbol(X.Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) ->Z : Symbol(X.Y.Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) ->Line : Symbol(X.Y.Z.Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 14)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) -+>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) -+>Line : Symbol(Line) ++>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 25, 10)) ++>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 26, 21)) ++>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts, 19, 14)) diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.errors.txt b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.errors.txt deleted file mode 100644 index 9f486b0fe5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.errors.txt +++ /dev/null @@ -1,43 +0,0 @@ -TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts(36,12): error TS2694: Namespace 'X.Y' has no exported member 'Z'. - - -==== TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts (1 errors) ==== - module A { - export interface Point { - x: number; - y: number; - toCarth(): Point; - } - } - - module A { - interface Point { - fromCarth(): Point; - } - } - - // ensure merges as expected - var p: { x: number; y: number; toCarth(): A.Point; }; - var p: A.Point; - - module X.Y.Z { - export interface Line { - new (start: A.Point, end: A.Point); - } - } - - module X { - export module Y.Z { - interface Line { - start: A.Point; - end: A.Point; - } - } - } - - // ensure merges as expected - var l: { new (s: A.Point, e: A.Point); } - var l: X.Y.Z.Line; - ~ -!!! error TS2694: Namespace 'X.Y' has no exported member 'Z'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.errors.txt.diff deleted file mode 100644 index 9767b50e55..0000000000 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.errors.txt.diff +++ /dev/null @@ -1,48 +0,0 @@ ---- old.TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.errors.txt -+++ new.TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts(36,12): error TS2694: Namespace 'X.Y' has no exported member 'Z'. -+ -+ -+==== TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts (1 errors) ==== -+ module A { -+ export interface Point { -+ x: number; -+ y: number; -+ toCarth(): Point; -+ } -+ } -+ -+ module A { -+ interface Point { -+ fromCarth(): Point; -+ } -+ } -+ -+ // ensure merges as expected -+ var p: { x: number; y: number; toCarth(): A.Point; }; -+ var p: A.Point; -+ -+ module X.Y.Z { -+ export interface Line { -+ new (start: A.Point, end: A.Point); -+ } -+ } -+ -+ module X { -+ export module Y.Z { -+ interface Line { -+ start: A.Point; -+ end: A.Point; -+ } -+ } -+ } -+ -+ // ensure merges as expected -+ var l: { new (s: A.Point, e: A.Point); } -+ var l: X.Y.Z.Line; -+ ~ -+!!! error TS2694: Namespace 'X.Y' has no exported member 'Z'. -+ diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols index db6e7b6065..e665bb396c 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols @@ -47,8 +47,8 @@ var p: A.Point; module X.Y.Z { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 16, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 22, 1)) ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 9)) ->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 11)) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 20)) export interface Line { >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 14)) @@ -67,8 +67,8 @@ module X { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 16, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 22, 1)) export module Y.Z { ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) ->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 20)) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 20)) interface Line { >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 23)) @@ -99,7 +99,7 @@ var l: { new (s: A.Point, e: A.Point); } var l: X.Y.Z.Line; >l : Symbol(l, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 34, 3), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 35, 3)) >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 16, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 22, 1)) ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) ->Z : Symbol(Z) ->Line : Symbol(Line) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 20)) +>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 14)) diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols.diff index 7162ee1fa0..90dc1463c6 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.symbols.diff @@ -41,13 +41,6 @@ module X.Y.Z { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 16, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 22, 1)) -->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) -->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 20)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 9)) -+>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 11)) - - export interface Line { - >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 14)) @@= skipped -18, +18 lines =@@ new (start: A.Point, end: A.Point); >start : Symbol(start, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 20, 13)) @@ -61,16 +54,7 @@ } } -@@= skipped -11, +11 lines =@@ - >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 16, 15), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 22, 1)) - - export module Y.Z { -->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) -->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 20)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) -+>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 20)) - - interface Line { +@@= skipped -18, +18 lines =@@ >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 23)) start: A.Point; @@ -89,7 +73,7 @@ } } } -@@= skipped -24, +24 lines =@@ +@@= skipped -17, +17 lines =@@ >l : Symbol(l, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 34, 3), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 35, 3)) >s : Symbol(s, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 34, 14)) >A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 6, 1)) @@ -106,7 +90,7 @@ ->Y : Symbol(X.Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) ->Z : Symbol(X.Y.Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 20)) ->Line : Symbol(X.Y.Z.Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 14)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) -+>Z : Symbol(Z) -+>Line : Symbol(Line) ++>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 24, 10)) ++>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 25, 20)) ++>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts, 18, 14)) diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt index 4cf61d29f3..63afa98aa5 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt @@ -1,8 +1,10 @@ TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(2,18): error TS2300: Duplicate identifier 'Point'. TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(10,18): error TS2300: Duplicate identifier 'Point'. +TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(17,18): error TS2300: Duplicate identifier 'Line'. +TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(26,26): error TS2300: Duplicate identifier 'Line'. -==== TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (2 errors) ==== +==== TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (4 errors) ==== module A { export class Point { ~~~~~ @@ -24,6 +26,8 @@ TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(10,18): error module X.Y.Z { export class Line { + ~~~~ +!!! error TS2300: Duplicate identifier 'Line'. length: number; } } @@ -33,6 +37,8 @@ TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(10,18): error export module Z { // expected error export class Line { + ~~~~ +!!! error TS2300: Duplicate identifier 'Line'. name: string; } } diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt.diff deleted file mode 100644 index 1961d5d649..0000000000 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt.diff +++ /dev/null @@ -1,32 +0,0 @@ ---- old.TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt -+++ new.TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt -@@= skipped -0, +0 lines =@@ - TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(2,18): error TS2300: Duplicate identifier 'Point'. - TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(10,18): error TS2300: Duplicate identifier 'Point'. --TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(17,18): error TS2300: Duplicate identifier 'Line'. --TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts(26,26): error TS2300: Duplicate identifier 'Line'. - - --==== TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (4 errors) ==== -+==== TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts (2 errors) ==== - module A { - export class Point { - ~~~~~ -@@= skipped -25, +23 lines =@@ - - module X.Y.Z { - export class Line { -- ~~~~ --!!! error TS2300: Duplicate identifier 'Line'. - length: number; - } - } -@@= skipped -11, +9 lines =@@ - export module Z { - // expected error - export class Line { -- ~~~~ --!!! error TS2300: Duplicate identifier 'Line'. - name: string; - } - } diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols index 2fb552b2ee..2cf2a76166 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols @@ -32,8 +32,8 @@ module A{ module X.Y.Z { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 13, 1), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 19, 1)) ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 9)) ->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 11)) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 9), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 21, 10)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 11), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 22, 21)) export class Line { >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 14)) @@ -47,10 +47,10 @@ module X { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 13, 1), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 19, 1)) export module Y { ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 21, 10)) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 9), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 21, 10)) export module Z { ->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 22, 21)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 11), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 22, 21)) // expected error export class Line { diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols.diff index 92a5ca754b..46e7029b55 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.symbols.diff @@ -26,14 +26,7 @@ } } - module X.Y.Z { - >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 13, 1), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 19, 1)) -->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 9), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 21, 10)) -->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 11), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 22, 21)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 9)) -+>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 11)) - - export class Line { +@@= skipped -16, +16 lines =@@ >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 14)) length: number; @@ -42,19 +35,7 @@ } } -@@= skipped -24, +24 lines =@@ - >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 13, 1), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 19, 1)) - - export module Y { -->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 9), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 21, 10)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 21, 10)) - - export module Z { -->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 15, 11), Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 22, 21)) -+>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 22, 21)) - - // expected error - export class Line { +@@= skipped -18, +18 lines =@@ >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts, 23, 25)) name: string; diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.errors.txt b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.errors.txt deleted file mode 100644 index e1480534ba..0000000000 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.errors.txt +++ /dev/null @@ -1,43 +0,0 @@ -TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts(36,12): error TS2694: Namespace 'X.Y' has no exported member 'Z'. - - -==== TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts (1 errors) ==== - module A { - export interface Point { - x: number; - y: number; - toCarth(): Point; - } - } - - module A { - export interface Point { - fromCarth(): Point; - } - } - - // ensure merges as expected - var p: { x: number; y: number; toCarth(): A.Point; fromCarth(): A.Point; }; - var p: A.Point; - - module X.Y.Z { - export interface Line { - new (start: A.Point, end: A.Point); - } - } - - module X { - export module Y.Z { - export interface Line { - start: A.Point; - end: A.Point; - } - } - } - - // ensure merges as expected - var l: { start: A.Point; end: A.Point; new (s: A.Point, e: A.Point); } - var l: X.Y.Z.Line; - ~ -!!! error TS2694: Namespace 'X.Y' has no exported member 'Z'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.errors.txt.diff deleted file mode 100644 index 710fd3abfb..0000000000 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.errors.txt.diff +++ /dev/null @@ -1,48 +0,0 @@ ---- old.TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.errors.txt -+++ new.TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts(36,12): error TS2694: Namespace 'X.Y' has no exported member 'Z'. -+ -+ -+==== TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts (1 errors) ==== -+ module A { -+ export interface Point { -+ x: number; -+ y: number; -+ toCarth(): Point; -+ } -+ } -+ -+ module A { -+ export interface Point { -+ fromCarth(): Point; -+ } -+ } -+ -+ // ensure merges as expected -+ var p: { x: number; y: number; toCarth(): A.Point; fromCarth(): A.Point; }; -+ var p: A.Point; -+ -+ module X.Y.Z { -+ export interface Line { -+ new (start: A.Point, end: A.Point); -+ } -+ } -+ -+ module X { -+ export module Y.Z { -+ export interface Line { -+ start: A.Point; -+ end: A.Point; -+ } -+ } -+ } -+ -+ // ensure merges as expected -+ var l: { start: A.Point; end: A.Point; new (s: A.Point, e: A.Point); } -+ var l: X.Y.Z.Line; -+ ~ -+!!! error TS2694: Namespace 'X.Y' has no exported member 'Z'. -+ diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols index 5924458d96..803523e66b 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols @@ -50,11 +50,11 @@ var p: A.Point; module X.Y.Z { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 16, 15), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 22, 1)) ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 9)) ->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 11)) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 20)) export interface Line { ->Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14)) +>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23)) new (start: A.Point, end: A.Point); >start : Symbol(start, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 20, 13)) @@ -70,11 +70,11 @@ module X { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 16, 15), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 22, 1)) export module Y.Z { ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) ->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 20)) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 20)) export interface Line { ->Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23)) +>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23)) start: A.Point; >start : Symbol(start, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 26, 31)) @@ -108,7 +108,7 @@ var l: { start: A.Point; end: A.Point; new (s: A.Point, e: A.Point); } var l: X.Y.Z.Line; >l : Symbol(l, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 34, 3), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 35, 3)) >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 16, 15), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 22, 1)) ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) ->Z : Symbol(Z) ->Line : Symbol(Line) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 20)) +>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23)) diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols.diff index 1595b0baae..90e35bff7c 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.symbols.diff @@ -45,15 +45,7 @@ module X.Y.Z { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 16, 15), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 22, 1)) -->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) -->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 20)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 9)) -+>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 11)) - - export interface Line { -->Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23)) -+>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14)) - +@@= skipped -21, +21 lines =@@ new (start: A.Point, end: A.Point); >start : Symbol(start, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 20, 13)) >A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 6, 1)) @@ -66,18 +58,8 @@ } } -@@= skipped -32, +32 lines =@@ - >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 16, 15), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 22, 1)) - - export module Y.Z { -->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) -->Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 20)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) -+>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 20)) - - export interface Line { -->Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23)) -+>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23)) +@@= skipped -18, +18 lines =@@ + >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23)) start: A.Point; ->start : Symbol(Line.start, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 26, 31)) @@ -95,7 +77,7 @@ } } } -@@= skipped -24, +24 lines =@@ +@@= skipped -17, +17 lines =@@ >l : Symbol(l, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 34, 3), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 35, 3)) >start : Symbol(start, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 34, 8)) >A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 6, 1)) @@ -120,7 +102,7 @@ ->Y : Symbol(X.Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) ->Z : Symbol(X.Y.Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 20)) ->Line : Symbol(X.Y.Z.Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) -+>Z : Symbol(Z) -+>Line : Symbol(Line) ++>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 9), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 24, 10)) ++>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 11), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 20)) ++>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 18, 14), Decl(TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts, 25, 23)) diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.errors.txt b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.errors.txt deleted file mode 100644 index a8a5e12b34..0000000000 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.errors.txt +++ /dev/null @@ -1,43 +0,0 @@ -TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts(13,11): error TS2339: Property 'B' does not exist on type 'typeof A'. -TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts(33,12): error TS2694: Namespace 'X.Y' has no exported member 'Z'. - - -==== TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts (2 errors) ==== - module A.B { - export var x: number; - } - - module A{ - module B { - export var x: string; - } - } - - // ensure the right var decl is exported - var x: number; - var x = A.B.x; - ~ -!!! error TS2339: Property 'B' does not exist on type 'typeof A'. - - module X.Y.Z { - export class Line { - length: number; - } - } - - module X { - export module Y { - module Z { - export class Line { - name: string; - } - } - } - } - - // make sure merging works as expected - var l: { length: number }; - var l: X.Y.Z.Line; - ~ -!!! error TS2694: Namespace 'X.Y' has no exported member 'Z'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.errors.txt.diff deleted file mode 100644 index 4697d3288e..0000000000 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.errors.txt.diff +++ /dev/null @@ -1,48 +0,0 @@ ---- old.TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.errors.txt -+++ new.TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts(13,11): error TS2339: Property 'B' does not exist on type 'typeof A'. -+TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts(33,12): error TS2694: Namespace 'X.Y' has no exported member 'Z'. -+ -+ -+==== TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts (2 errors) ==== -+ module A.B { -+ export var x: number; -+ } -+ -+ module A{ -+ module B { -+ export var x: string; -+ } -+ } -+ -+ // ensure the right var decl is exported -+ var x: number; -+ var x = A.B.x; -+ ~ -+!!! error TS2339: Property 'B' does not exist on type 'typeof A'. -+ -+ module X.Y.Z { -+ export class Line { -+ length: number; -+ } -+ } -+ -+ module X { -+ export module Y { -+ module Z { -+ export class Line { -+ name: string; -+ } -+ } -+ } -+ } -+ -+ // make sure merging works as expected -+ var l: { length: number }; -+ var l: X.Y.Z.Line; -+ ~ -+!!! error TS2694: Namespace 'X.Y' has no exported member 'Z'. -+ diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols index 60443b341a..4a6c482ddc 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols @@ -26,11 +26,15 @@ var x: number; var x = A.B.x; >x : Symbol(x, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 11, 3), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 12, 3)) +>A.B.x : Symbol(x, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 1, 14)) +>A.B : Symbol(B, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 0, 9)) >A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 2, 1)) +>B : Symbol(B, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 0, 9)) +>x : Symbol(x, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 1, 14)) module X.Y.Z { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 12, 14), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 18, 1)) ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 9)) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 9), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) >Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 11)) export class Line { @@ -45,7 +49,7 @@ module X { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 12, 14), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 18, 1)) export module Y { ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 9), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) module Z { >Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 21, 21)) @@ -68,7 +72,7 @@ var l: { length: number }; var l: X.Y.Z.Line; >l : Symbol(l, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 31, 3), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 32, 3)) >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 12, 14), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 18, 1)) ->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) ->Z : Symbol(Z) ->Line : Symbol(Line) +>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 9), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) +>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 11)) +>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 14)) diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols.diff index 3aba3bd977..a8655a396f 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.symbols.diff @@ -6,17 +6,17 @@ >x : Symbol(x, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 11, 3), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 12, 3)) ->A.B.x : Symbol(A.B.x, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 1, 14)) ->A.B : Symbol(A.B, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 0, 9)) ++>A.B.x : Symbol(x, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 1, 14)) ++>A.B : Symbol(B, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 0, 9)) >A : Symbol(A, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 0, 0), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 2, 1)) ->B : Symbol(A.B, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 0, 9)) ->x : Symbol(A.B.x, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 1, 14)) ++>B : Symbol(B, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 0, 9)) ++>x : Symbol(x, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 1, 14)) module X.Y.Z { >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 12, 14), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 18, 1)) -->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 9), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 9)) - >Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 11)) - - export class Line { +@@= skipped -15, +15 lines =@@ >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 14)) length: number; @@ -25,16 +25,7 @@ } } -@@= skipped -23, +19 lines =@@ - >X : Symbol(X, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 12, 14), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 18, 1)) - - export module Y { -->Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 9), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) - - module Z { - >Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 21, 21)) -@@= skipped -9, +9 lines =@@ +@@= skipped -17, +17 lines =@@ >Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 22, 18)) name: string; @@ -50,7 +41,7 @@ ->Y : Symbol(X.Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 9), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) ->Z : Symbol(X.Y.Z, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 11)) ->Line : Symbol(X.Y.Z.Line, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 14)) -+>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) -+>Z : Symbol(Z) -+>Line : Symbol(Line) ++>Y : Symbol(Y, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 9), Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 20, 10)) ++>Z : Symbol(Z, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 11)) ++>Line : Symbol(Line, Decl(TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts, 14, 14)) diff --git a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.errors.txt b/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.errors.txt deleted file mode 100644 index ef55e4b6b0..0000000000 --- a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -asiPreventsParsingAsNamespace05.ts(7,3): error TS2339: Property 'b' does not exist on type 'typeof a'. - - -==== asiPreventsParsingAsNamespace05.ts (1 errors) ==== - let namespace = 10; - namespace a.b { - export let c = 20; - } - - namespace - a.b.c - ~ -!!! error TS2339: Property 'b' does not exist on type 'typeof a'. - { - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.errors.txt.diff deleted file mode 100644 index a82ea06f2c..0000000000 --- a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.asiPreventsParsingAsNamespace05.errors.txt -+++ new.asiPreventsParsingAsNamespace05.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+asiPreventsParsingAsNamespace05.ts(7,3): error TS2339: Property 'b' does not exist on type 'typeof a'. -+ -+ -+==== asiPreventsParsingAsNamespace05.ts (1 errors) ==== -+ let namespace = 10; -+ namespace a.b { -+ export let c = 20; -+ } -+ -+ namespace -+ a.b.c -+ ~ -+!!! error TS2339: Property 'b' does not exist on type 'typeof a'. -+ { -+ } diff --git a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.symbols b/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.symbols index b09aec5ff8..dfbcd3f51a 100644 --- a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.symbols +++ b/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.symbols @@ -16,6 +16,10 @@ namespace >namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace05.ts, 0, 3)) a.b.c +>a.b.c : Symbol(c, Decl(asiPreventsParsingAsNamespace05.ts, 2, 14)) +>a.b : Symbol(b, Decl(asiPreventsParsingAsNamespace05.ts, 1, 12)) >a : Symbol(a, Decl(asiPreventsParsingAsNamespace05.ts, 0, 19)) +>b : Symbol(b, Decl(asiPreventsParsingAsNamespace05.ts, 1, 12)) +>c : Symbol(c, Decl(asiPreventsParsingAsNamespace05.ts, 2, 14)) { } diff --git a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.symbols.diff b/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.symbols.diff index 9eb650b272..a291b78d20 100644 --- a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.symbols.diff @@ -6,8 +6,12 @@ a.b.c ->a.b.c : Symbol(a.b.c, Decl(asiPreventsParsingAsNamespace05.ts, 2, 14)) ->a.b : Symbol(a.b, Decl(asiPreventsParsingAsNamespace05.ts, 1, 12)) ++>a.b.c : Symbol(c, Decl(asiPreventsParsingAsNamespace05.ts, 2, 14)) ++>a.b : Symbol(b, Decl(asiPreventsParsingAsNamespace05.ts, 1, 12)) >a : Symbol(a, Decl(asiPreventsParsingAsNamespace05.ts, 0, 19)) ->b : Symbol(a.b, Decl(asiPreventsParsingAsNamespace05.ts, 1, 12)) ->c : Symbol(a.b.c, Decl(asiPreventsParsingAsNamespace05.ts, 2, 14)) ++>b : Symbol(b, Decl(asiPreventsParsingAsNamespace05.ts, 1, 12)) ++>c : Symbol(c, Decl(asiPreventsParsingAsNamespace05.ts, 2, 14)) { } diff --git a/testdata/baselines/reference/submodule/conformance/enumMerging.errors.txt b/testdata/baselines/reference/submodule/conformance/enumMerging.errors.txt deleted file mode 100644 index eae39b432f..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumMerging.errors.txt +++ /dev/null @@ -1,72 +0,0 @@ -enumMerging.ts(64,17): error TS2339: Property 'Red' does not exist on type 'typeof Color'. - - -==== enumMerging.ts (1 errors) ==== - // Enum with only constant members across 2 declarations with the same root module - // Enum with initializer in all declarations with constant members with the same root module - module M1 { - enum EImpl1 { - A, B, C - } - - enum EImpl1 { - D = 1, E, F - } - - export enum EConst1 { - A = 3, B = 2, C = 1 - } - - export enum EConst1 { - D = 7, E = 9, F = 8 - } - - var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; - } - - // Enum with only computed members across 2 declarations with the same root module - module M2 { - export enum EComp2 { - A = 'foo'.length, B = 'foo'.length, C = 'foo'.length - } - - export enum EComp2 { - D = 'foo'.length, E = 'foo'.length, F = 'foo'.length - } - - var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; - } - - // Enum with initializer in only one of two declarations with constant members with the same root module - module M3 { - enum EInit { - A, - B - } - - enum EInit { - C = 1, D, E - } - } - - // Enums with same name but different root module - module M4 { - export enum Color { Red, Green, Blue } - } - module M5 { - export enum Color { Red, Green, Blue } - } - - module M6.A { - export enum Color { Red, Green, Blue } - } - module M6 { - export module A { - export enum Color { Yellow = 1 } - } - var t = A.Color.Yellow; - t = A.Color.Red; - ~~~ -!!! error TS2339: Property 'Red' does not exist on type 'typeof Color'. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/enumMerging.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/enumMerging.errors.txt.diff deleted file mode 100644 index 1ceb7f9cf5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumMerging.errors.txt.diff +++ /dev/null @@ -1,77 +0,0 @@ ---- old.enumMerging.errors.txt -+++ new.enumMerging.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+enumMerging.ts(64,17): error TS2339: Property 'Red' does not exist on type 'typeof Color'. -+ -+ -+==== enumMerging.ts (1 errors) ==== -+ // Enum with only constant members across 2 declarations with the same root module -+ // Enum with initializer in all declarations with constant members with the same root module -+ module M1 { -+ enum EImpl1 { -+ A, B, C -+ } -+ -+ enum EImpl1 { -+ D = 1, E, F -+ } -+ -+ export enum EConst1 { -+ A = 3, B = 2, C = 1 -+ } -+ -+ export enum EConst1 { -+ D = 7, E = 9, F = 8 -+ } -+ -+ var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; -+ } -+ -+ // Enum with only computed members across 2 declarations with the same root module -+ module M2 { -+ export enum EComp2 { -+ A = 'foo'.length, B = 'foo'.length, C = 'foo'.length -+ } -+ -+ export enum EComp2 { -+ D = 'foo'.length, E = 'foo'.length, F = 'foo'.length -+ } -+ -+ var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; -+ } -+ -+ // Enum with initializer in only one of two declarations with constant members with the same root module -+ module M3 { -+ enum EInit { -+ A, -+ B -+ } -+ -+ enum EInit { -+ C = 1, D, E -+ } -+ } -+ -+ // Enums with same name but different root module -+ module M4 { -+ export enum Color { Red, Green, Blue } -+ } -+ module M5 { -+ export enum Color { Red, Green, Blue } -+ } -+ -+ module M6.A { -+ export enum Color { Red, Green, Blue } -+ } -+ module M6 { -+ export module A { -+ export enum Color { Yellow = 1 } -+ } -+ var t = A.Color.Yellow; -+ t = A.Color.Red; -+ ~~~ -+!!! error TS2339: Property 'Red' does not exist on type 'typeof Color'. -+ } -+ diff --git a/testdata/baselines/reference/submodule/conformance/enumMerging.symbols b/testdata/baselines/reference/submodule/conformance/enumMerging.symbols index a1a5ae9734..63462d171a 100644 --- a/testdata/baselines/reference/submodule/conformance/enumMerging.symbols +++ b/testdata/baselines/reference/submodule/conformance/enumMerging.symbols @@ -166,10 +166,10 @@ module M5 { module M6.A { >M6 : Symbol(M6, Decl(enumMerging.ts, 53, 1), Decl(enumMerging.ts, 57, 1)) ->A : Symbol(A, Decl(enumMerging.ts, 55, 10)) +>A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11)) export enum Color { Red, Green, Blue } ->Color : Symbol(Color, Decl(enumMerging.ts, 55, 13)) +>Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) >Red : Symbol(Red, Decl(enumMerging.ts, 56, 23)) >Green : Symbol(Green, Decl(enumMerging.ts, 56, 28)) >Blue : Symbol(Blue, Decl(enumMerging.ts, 56, 35)) @@ -178,24 +178,26 @@ module M6 { >M6 : Symbol(M6, Decl(enumMerging.ts, 53, 1), Decl(enumMerging.ts, 57, 1)) export module A { ->A : Symbol(A, Decl(enumMerging.ts, 58, 11)) +>A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11)) export enum Color { Yellow = 1 } ->Color : Symbol(Color, Decl(enumMerging.ts, 59, 21)) +>Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) >Yellow : Symbol(Yellow, Decl(enumMerging.ts, 60, 27)) } var t = A.Color.Yellow; >t : Symbol(t, Decl(enumMerging.ts, 62, 7)) >A.Color.Yellow : Symbol(Yellow, Decl(enumMerging.ts, 60, 27)) ->A.Color : Symbol(Color, Decl(enumMerging.ts, 59, 21)) ->A : Symbol(A, Decl(enumMerging.ts, 58, 11)) ->Color : Symbol(Color, Decl(enumMerging.ts, 59, 21)) +>A.Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) +>A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11)) +>Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) >Yellow : Symbol(Yellow, Decl(enumMerging.ts, 60, 27)) t = A.Color.Red; >t : Symbol(t, Decl(enumMerging.ts, 62, 7)) ->A.Color : Symbol(Color, Decl(enumMerging.ts, 59, 21)) ->A : Symbol(A, Decl(enumMerging.ts, 58, 11)) ->Color : Symbol(Color, Decl(enumMerging.ts, 59, 21)) +>A.Color.Red : Symbol(Red, Decl(enumMerging.ts, 56, 23)) +>A.Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) +>A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11)) +>Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) +>Red : Symbol(Red, Decl(enumMerging.ts, 56, 23)) } diff --git a/testdata/baselines/reference/submodule/conformance/enumMerging.symbols.diff b/testdata/baselines/reference/submodule/conformance/enumMerging.symbols.diff index b40d395a10..c483a0bc03 100644 --- a/testdata/baselines/reference/submodule/conformance/enumMerging.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/enumMerging.symbols.diff @@ -216,55 +216,48 @@ } module M6.A { - >M6 : Symbol(M6, Decl(enumMerging.ts, 53, 1), Decl(enumMerging.ts, 57, 1)) -->A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11)) -+>A : Symbol(A, Decl(enumMerging.ts, 55, 10)) +@@= skipped -20, +20 lines =@@ export enum Color { Red, Green, Blue } -->Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) + >Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) ->Red : Symbol(Color.Red, Decl(enumMerging.ts, 56, 23)) ->Green : Symbol(Color.Green, Decl(enumMerging.ts, 56, 28)) ->Blue : Symbol(Color.Blue, Decl(enumMerging.ts, 56, 35)) -+>Color : Symbol(Color, Decl(enumMerging.ts, 55, 13)) +>Red : Symbol(Red, Decl(enumMerging.ts, 56, 23)) +>Green : Symbol(Green, Decl(enumMerging.ts, 56, 28)) +>Blue : Symbol(Blue, Decl(enumMerging.ts, 56, 35)) } module M6 { >M6 : Symbol(M6, Decl(enumMerging.ts, 53, 1), Decl(enumMerging.ts, 57, 1)) - - export module A { -->A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11)) -+>A : Symbol(A, Decl(enumMerging.ts, 58, 11)) +@@= skipped -12, +12 lines =@@ export enum Color { Yellow = 1 } -->Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) + >Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) ->Yellow : Symbol(Color.Yellow, Decl(enumMerging.ts, 60, 27)) -+>Color : Symbol(Color, Decl(enumMerging.ts, 59, 21)) +>Yellow : Symbol(Yellow, Decl(enumMerging.ts, 60, 27)) } var t = A.Color.Yellow; >t : Symbol(t, Decl(enumMerging.ts, 62, 7)) ->A.Color.Yellow : Symbol(A.Color.Yellow, Decl(enumMerging.ts, 60, 27)) ->A.Color : Symbol(A.Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) -->A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11)) ++>A.Color.Yellow : Symbol(Yellow, Decl(enumMerging.ts, 60, 27)) ++>A.Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) + >A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11)) ->Color : Symbol(A.Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) ->Yellow : Symbol(A.Color.Yellow, Decl(enumMerging.ts, 60, 27)) -+>A.Color.Yellow : Symbol(Yellow, Decl(enumMerging.ts, 60, 27)) -+>A.Color : Symbol(Color, Decl(enumMerging.ts, 59, 21)) -+>A : Symbol(A, Decl(enumMerging.ts, 58, 11)) -+>Color : Symbol(Color, Decl(enumMerging.ts, 59, 21)) ++>Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) +>Yellow : Symbol(Yellow, Decl(enumMerging.ts, 60, 27)) t = A.Color.Red; >t : Symbol(t, Decl(enumMerging.ts, 62, 7)) ->A.Color.Red : Symbol(A.Color.Red, Decl(enumMerging.ts, 56, 23)) ->A.Color : Symbol(A.Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) -->A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11)) ++>A.Color.Red : Symbol(Red, Decl(enumMerging.ts, 56, 23)) ++>A.Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) + >A : Symbol(A, Decl(enumMerging.ts, 55, 10), Decl(enumMerging.ts, 58, 11)) ->Color : Symbol(A.Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) ->Red : Symbol(A.Color.Red, Decl(enumMerging.ts, 56, 23)) -+>A.Color : Symbol(Color, Decl(enumMerging.ts, 59, 21)) -+>A : Symbol(A, Decl(enumMerging.ts, 58, 11)) -+>Color : Symbol(Color, Decl(enumMerging.ts, 59, 21)) ++>Color : Symbol(Color, Decl(enumMerging.ts, 55, 13), Decl(enumMerging.ts, 59, 21)) ++>Red : Symbol(Red, Decl(enumMerging.ts, 56, 23)) } diff --git a/testdata/baselines/reference/submodule/conformance/invalidNestedModules.errors.txt b/testdata/baselines/reference/submodule/conformance/invalidNestedModules.errors.txt new file mode 100644 index 0000000000..112c2a706c --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/invalidNestedModules.errors.txt @@ -0,0 +1,41 @@ +invalidNestedModules.ts(1,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +invalidNestedModules.ts(17,18): error TS2300: Duplicate identifier 'Point'. +invalidNestedModules.ts(24,20): error TS2300: Duplicate identifier 'Point'. + + +==== invalidNestedModules.ts (3 errors) ==== + module A.B.C { + ~ +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. + export class Point { + x: number; + y: number; + } + } + + module A { + export module B { + export class C { // Error + name: string; + } + } + } + + module M2.X { + export class Point { + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. + x: number; y: number; + } + } + + module M2 { + export module X { + export var Point: number; // Error + ~~~~~ +!!! error TS2300: Duplicate identifier 'Point'. + } + } + + + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/invalidNestedModules.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/invalidNestedModules.errors.txt.diff deleted file mode 100644 index f20fc34380..0000000000 --- a/testdata/baselines/reference/submodule/conformance/invalidNestedModules.errors.txt.diff +++ /dev/null @@ -1,46 +0,0 @@ ---- old.invalidNestedModules.errors.txt -+++ new.invalidNestedModules.errors.txt -@@= skipped -0, +-1 lines =@@ --invalidNestedModules.ts(1,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. --invalidNestedModules.ts(17,18): error TS2300: Duplicate identifier 'Point'. --invalidNestedModules.ts(24,20): error TS2300: Duplicate identifier 'Point'. -- -- --==== invalidNestedModules.ts (3 errors) ==== -- module A.B.C { -- ~ --!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -- export class Point { -- x: number; -- y: number; -- } -- } -- -- module A { -- export module B { -- export class C { // Error -- name: string; -- } -- } -- } -- -- module M2.X { -- export class Point { -- ~~~~~ --!!! error TS2300: Duplicate identifier 'Point'. -- x: number; y: number; -- } -- } -- -- module M2 { -- export module X { -- export var Point: number; // Error -- ~~~~~ --!!! error TS2300: Duplicate identifier 'Point'. -- } -- } -- -- -- -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/conformance/invalidNestedModules.symbols b/testdata/baselines/reference/submodule/conformance/invalidNestedModules.symbols index 4a6ad5af08..8ec95c3a3f 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidNestedModules.symbols +++ b/testdata/baselines/reference/submodule/conformance/invalidNestedModules.symbols @@ -3,8 +3,8 @@ === invalidNestedModules.ts === module A.B.C { >A : Symbol(A, Decl(invalidNestedModules.ts, 0, 0), Decl(invalidNestedModules.ts, 5, 1)) ->B : Symbol(B, Decl(invalidNestedModules.ts, 0, 9)) ->C : Symbol(C, Decl(invalidNestedModules.ts, 0, 11)) +>B : Symbol(B, Decl(invalidNestedModules.ts, 0, 9), Decl(invalidNestedModules.ts, 7, 10)) +>C : Symbol(C, Decl(invalidNestedModules.ts, 0, 11), Decl(invalidNestedModules.ts, 8, 21)) export class Point { >Point : Symbol(Point, Decl(invalidNestedModules.ts, 0, 14)) @@ -21,10 +21,10 @@ module A { >A : Symbol(A, Decl(invalidNestedModules.ts, 0, 0), Decl(invalidNestedModules.ts, 5, 1)) export module B { ->B : Symbol(B, Decl(invalidNestedModules.ts, 7, 10)) +>B : Symbol(B, Decl(invalidNestedModules.ts, 0, 9), Decl(invalidNestedModules.ts, 7, 10)) export class C { // Error ->C : Symbol(C, Decl(invalidNestedModules.ts, 8, 21)) +>C : Symbol(C, Decl(invalidNestedModules.ts, 0, 11), Decl(invalidNestedModules.ts, 8, 21)) name: string; >name : Symbol(name, Decl(invalidNestedModules.ts, 9, 24)) @@ -34,7 +34,7 @@ module A { module M2.X { >M2 : Symbol(M2, Decl(invalidNestedModules.ts, 13, 1), Decl(invalidNestedModules.ts, 19, 1)) ->X : Symbol(X, Decl(invalidNestedModules.ts, 15, 10)) +>X : Symbol(X, Decl(invalidNestedModules.ts, 15, 10), Decl(invalidNestedModules.ts, 21, 11)) export class Point { >Point : Symbol(Point, Decl(invalidNestedModules.ts, 15, 13)) @@ -49,7 +49,7 @@ module M2 { >M2 : Symbol(M2, Decl(invalidNestedModules.ts, 13, 1), Decl(invalidNestedModules.ts, 19, 1)) export module X { ->X : Symbol(X, Decl(invalidNestedModules.ts, 21, 11)) +>X : Symbol(X, Decl(invalidNestedModules.ts, 15, 10), Decl(invalidNestedModules.ts, 21, 11)) export var Point: number; // Error >Point : Symbol(Point, Decl(invalidNestedModules.ts, 23, 18)) diff --git a/testdata/baselines/reference/submodule/conformance/invalidNestedModules.symbols.diff b/testdata/baselines/reference/submodule/conformance/invalidNestedModules.symbols.diff index 5f011a8ac6..6199988c08 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidNestedModules.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/invalidNestedModules.symbols.diff @@ -1,15 +1,6 @@ --- old.invalidNestedModules.symbols +++ new.invalidNestedModules.symbols -@@= skipped -2, +2 lines =@@ - === invalidNestedModules.ts === - module A.B.C { - >A : Symbol(A, Decl(invalidNestedModules.ts, 0, 0), Decl(invalidNestedModules.ts, 5, 1)) -->B : Symbol(B, Decl(invalidNestedModules.ts, 0, 9), Decl(invalidNestedModules.ts, 7, 10)) -->C : Symbol(C, Decl(invalidNestedModules.ts, 0, 11), Decl(invalidNestedModules.ts, 8, 21)) -+>B : Symbol(B, Decl(invalidNestedModules.ts, 0, 9)) -+>C : Symbol(C, Decl(invalidNestedModules.ts, 0, 11)) - - export class Point { +@@= skipped -9, +9 lines =@@ >Point : Symbol(Point, Decl(invalidNestedModules.ts, 0, 14)) x: number; @@ -22,16 +13,8 @@ } } -@@= skipped -18, +18 lines =@@ - >A : Symbol(A, Decl(invalidNestedModules.ts, 0, 0), Decl(invalidNestedModules.ts, 5, 1)) - - export module B { -->B : Symbol(B, Decl(invalidNestedModules.ts, 0, 9), Decl(invalidNestedModules.ts, 7, 10)) -+>B : Symbol(B, Decl(invalidNestedModules.ts, 7, 10)) - - export class C { // Error -->C : Symbol(C, Decl(invalidNestedModules.ts, 0, 11), Decl(invalidNestedModules.ts, 8, 21)) -+>C : Symbol(C, Decl(invalidNestedModules.ts, 8, 21)) +@@= skipped -17, +17 lines =@@ + >C : Symbol(C, Decl(invalidNestedModules.ts, 0, 11), Decl(invalidNestedModules.ts, 8, 21)) name: string; ->name : Symbol(C.name, Decl(invalidNestedModules.ts, 9, 24)) @@ -39,13 +22,7 @@ } } } - - module M2.X { - >M2 : Symbol(M2, Decl(invalidNestedModules.ts, 13, 1), Decl(invalidNestedModules.ts, 19, 1)) -->X : Symbol(X, Decl(invalidNestedModules.ts, 15, 10), Decl(invalidNestedModules.ts, 21, 11)) -+>X : Symbol(X, Decl(invalidNestedModules.ts, 15, 10)) - - export class Point { +@@= skipped -13, +13 lines =@@ >Point : Symbol(Point, Decl(invalidNestedModules.ts, 15, 13)) x: number; y: number; @@ -56,12 +33,3 @@ } } -@@= skipped -28, +28 lines =@@ - >M2 : Symbol(M2, Decl(invalidNestedModules.ts, 13, 1), Decl(invalidNestedModules.ts, 19, 1)) - - export module X { -->X : Symbol(X, Decl(invalidNestedModules.ts, 15, 10), Decl(invalidNestedModules.ts, 21, 11)) -+>X : Symbol(X, Decl(invalidNestedModules.ts, 21, 11)) - - export var Point: number; // Error - >Point : Symbol(Point, Decl(invalidNestedModules.ts, 23, 18)) diff --git a/testdata/baselines/reference/submodule/conformance/nestedModules.errors.txt b/testdata/baselines/reference/submodule/conformance/nestedModules.errors.txt deleted file mode 100644 index d5e0ece928..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nestedModules.errors.txt +++ /dev/null @@ -1,41 +0,0 @@ -nestedModules.ts(10,20): error TS2503: Cannot find namespace 'C'. -nestedModules.ts(31,8): error TS2749: 'M2.X.Point' refers to a value, but is being used as a type here. Did you mean 'typeof M2.X.Point'? - - -==== nestedModules.ts (2 errors) ==== - module A.B.C { - export interface Point { - x: number; - y: number; - } - } - - module A { - export module B { - var Point: C.Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C' - ~ -!!! error TS2503: Cannot find namespace 'C'. - } - } - - module M2.X { - export interface Point { - x: number; y: number; - } - } - - module M2 { - export module X { - export var Point: number; - } - } - - var m = M2.X; - var point: number; - var point = m.Point; - - var p: { x: number; y: number; } - var p: M2.X.Point; - ~~~~~~~~~~ -!!! error TS2749: 'M2.X.Point' refers to a value, but is being used as a type here. Did you mean 'typeof M2.X.Point'? - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nestedModules.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/nestedModules.errors.txt.diff deleted file mode 100644 index ed1825f313..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nestedModules.errors.txt.diff +++ /dev/null @@ -1,46 +0,0 @@ ---- old.nestedModules.errors.txt -+++ new.nestedModules.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+nestedModules.ts(10,20): error TS2503: Cannot find namespace 'C'. -+nestedModules.ts(31,8): error TS2749: 'M2.X.Point' refers to a value, but is being used as a type here. Did you mean 'typeof M2.X.Point'? -+ -+ -+==== nestedModules.ts (2 errors) ==== -+ module A.B.C { -+ export interface Point { -+ x: number; -+ y: number; -+ } -+ } -+ -+ module A { -+ export module B { -+ var Point: C.Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C' -+ ~ -+!!! error TS2503: Cannot find namespace 'C'. -+ } -+ } -+ -+ module M2.X { -+ export interface Point { -+ x: number; y: number; -+ } -+ } -+ -+ module M2 { -+ export module X { -+ export var Point: number; -+ } -+ } -+ -+ var m = M2.X; -+ var point: number; -+ var point = m.Point; -+ -+ var p: { x: number; y: number; } -+ var p: M2.X.Point; -+ ~~~~~~~~~~ -+!!! error TS2749: 'M2.X.Point' refers to a value, but is being used as a type here. Did you mean 'typeof M2.X.Point'? -+ diff --git a/testdata/baselines/reference/submodule/conformance/nestedModules.symbols b/testdata/baselines/reference/submodule/conformance/nestedModules.symbols index dba185db49..cbbecab020 100644 --- a/testdata/baselines/reference/submodule/conformance/nestedModules.symbols +++ b/testdata/baselines/reference/submodule/conformance/nestedModules.symbols @@ -3,7 +3,7 @@ === nestedModules.ts === module A.B.C { >A : Symbol(A, Decl(nestedModules.ts, 0, 0), Decl(nestedModules.ts, 5, 1)) ->B : Symbol(B, Decl(nestedModules.ts, 0, 9)) +>B : Symbol(B, Decl(nestedModules.ts, 0, 9), Decl(nestedModules.ts, 7, 10)) >C : Symbol(C, Decl(nestedModules.ts, 0, 11)) export interface Point { @@ -21,12 +21,12 @@ module A { >A : Symbol(A, Decl(nestedModules.ts, 0, 0), Decl(nestedModules.ts, 5, 1)) export module B { ->B : Symbol(B, Decl(nestedModules.ts, 7, 10)) +>B : Symbol(B, Decl(nestedModules.ts, 0, 9), Decl(nestedModules.ts, 7, 10)) var Point: C.Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C' >Point : Symbol(Point, Decl(nestedModules.ts, 9, 11)) ->C : Symbol(C) ->Point : Symbol(Point) +>C : Symbol(C, Decl(nestedModules.ts, 0, 11)) +>Point : Symbol(Point, Decl(nestedModules.ts, 0, 14)) >x : Symbol(x, Decl(nestedModules.ts, 9, 30)) >y : Symbol(y, Decl(nestedModules.ts, 9, 36)) } @@ -34,10 +34,10 @@ module A { module M2.X { >M2 : Symbol(M2, Decl(nestedModules.ts, 11, 1), Decl(nestedModules.ts, 17, 1)) ->X : Symbol(X, Decl(nestedModules.ts, 13, 10)) +>X : Symbol(X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) export interface Point { ->Point : Symbol(Point, Decl(nestedModules.ts, 13, 13)) +>Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) x: number; y: number; >x : Symbol(x, Decl(nestedModules.ts, 14, 28)) @@ -49,27 +49,27 @@ module M2 { >M2 : Symbol(M2, Decl(nestedModules.ts, 11, 1), Decl(nestedModules.ts, 17, 1)) export module X { ->X : Symbol(X, Decl(nestedModules.ts, 19, 11)) +>X : Symbol(X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) export var Point: number; ->Point : Symbol(Point, Decl(nestedModules.ts, 21, 18)) +>Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) } } var m = M2.X; >m : Symbol(m, Decl(nestedModules.ts, 25, 3)) ->M2.X : Symbol(X, Decl(nestedModules.ts, 19, 11)) +>M2.X : Symbol(X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) >M2 : Symbol(M2, Decl(nestedModules.ts, 11, 1), Decl(nestedModules.ts, 17, 1)) ->X : Symbol(X, Decl(nestedModules.ts, 19, 11)) +>X : Symbol(X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) var point: number; >point : Symbol(point, Decl(nestedModules.ts, 26, 3), Decl(nestedModules.ts, 27, 3)) var point = m.Point; >point : Symbol(point, Decl(nestedModules.ts, 26, 3), Decl(nestedModules.ts, 27, 3)) ->m.Point : Symbol(Point, Decl(nestedModules.ts, 21, 18)) +>m.Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) >m : Symbol(m, Decl(nestedModules.ts, 25, 3)) ->Point : Symbol(Point, Decl(nestedModules.ts, 21, 18)) +>Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) var p: { x: number; y: number; } >p : Symbol(p, Decl(nestedModules.ts, 29, 3), Decl(nestedModules.ts, 30, 3)) @@ -79,6 +79,6 @@ var p: { x: number; y: number; } var p: M2.X.Point; >p : Symbol(p, Decl(nestedModules.ts, 29, 3), Decl(nestedModules.ts, 30, 3)) >M2 : Symbol(M2, Decl(nestedModules.ts, 11, 1), Decl(nestedModules.ts, 17, 1)) ->X : Symbol(X, Decl(nestedModules.ts, 19, 11)) ->Point : Symbol(Point) +>X : Symbol(X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) +>Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) diff --git a/testdata/baselines/reference/submodule/conformance/nestedModules.symbols.diff b/testdata/baselines/reference/submodule/conformance/nestedModules.symbols.diff index ef3aa19b71..7e1e879859 100644 --- a/testdata/baselines/reference/submodule/conformance/nestedModules.symbols.diff +++ b/testdata/baselines/reference/submodule/conformance/nestedModules.symbols.diff @@ -1,14 +1,6 @@ --- old.nestedModules.symbols +++ new.nestedModules.symbols -@@= skipped -2, +2 lines =@@ - === nestedModules.ts === - module A.B.C { - >A : Symbol(A, Decl(nestedModules.ts, 0, 0), Decl(nestedModules.ts, 5, 1)) -->B : Symbol(B, Decl(nestedModules.ts, 0, 9), Decl(nestedModules.ts, 7, 10)) -+>B : Symbol(B, Decl(nestedModules.ts, 0, 9)) - >C : Symbol(C, Decl(nestedModules.ts, 0, 11)) - - export interface Point { +@@= skipped -9, +9 lines =@@ >Point : Symbol(Point, Decl(nestedModules.ts, 0, 14)) x: number; @@ -21,32 +13,17 @@ } } -@@= skipped -18, +18 lines =@@ - >A : Symbol(A, Decl(nestedModules.ts, 0, 0), Decl(nestedModules.ts, 5, 1)) - - export module B { -->B : Symbol(B, Decl(nestedModules.ts, 0, 9), Decl(nestedModules.ts, 7, 10)) -+>B : Symbol(B, Decl(nestedModules.ts, 7, 10)) - +@@= skipped -16, +16 lines =@@ var Point: C.Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C' >Point : Symbol(Point, Decl(nestedModules.ts, 9, 11)) -->C : Symbol(C, Decl(nestedModules.ts, 0, 11)) + >C : Symbol(C, Decl(nestedModules.ts, 0, 11)) ->Point : Symbol(C.Point, Decl(nestedModules.ts, 0, 14)) -+>C : Symbol(C) -+>Point : Symbol(Point) ++>Point : Symbol(Point, Decl(nestedModules.ts, 0, 14)) >x : Symbol(x, Decl(nestedModules.ts, 9, 30)) >y : Symbol(y, Decl(nestedModules.ts, 9, 36)) } -@@= skipped -13, +13 lines =@@ - - module M2.X { - >M2 : Symbol(M2, Decl(nestedModules.ts, 11, 1), Decl(nestedModules.ts, 17, 1)) -->X : Symbol(X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) -+>X : Symbol(X, Decl(nestedModules.ts, 13, 10)) - - export interface Point { -->Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) -+>Point : Symbol(Point, Decl(nestedModules.ts, 13, 13)) +@@= skipped -14, +14 lines =@@ + >Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) x: number; y: number; ->x : Symbol(Point.x, Decl(nestedModules.ts, 14, 28)) @@ -56,26 +33,15 @@ } } -@@= skipped -15, +15 lines =@@ - >M2 : Symbol(M2, Decl(nestedModules.ts, 11, 1), Decl(nestedModules.ts, 17, 1)) - - export module X { -->X : Symbol(X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) -+>X : Symbol(X, Decl(nestedModules.ts, 19, 11)) - - export var Point: number; -->Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) -+>Point : Symbol(Point, Decl(nestedModules.ts, 21, 18)) - } - } +@@= skipped -18, +18 lines =@@ var m = M2.X; >m : Symbol(m, Decl(nestedModules.ts, 25, 3)) ->M2.X : Symbol(M2.X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) -+>M2.X : Symbol(X, Decl(nestedModules.ts, 19, 11)) ++>M2.X : Symbol(X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) >M2 : Symbol(M2, Decl(nestedModules.ts, 11, 1), Decl(nestedModules.ts, 17, 1)) ->X : Symbol(M2.X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) -+>X : Symbol(X, Decl(nestedModules.ts, 19, 11)) ++>X : Symbol(X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) var point: number; >point : Symbol(point, Decl(nestedModules.ts, 26, 3), Decl(nestedModules.ts, 27, 3)) @@ -83,19 +49,19 @@ var point = m.Point; >point : Symbol(point, Decl(nestedModules.ts, 26, 3), Decl(nestedModules.ts, 27, 3)) ->m.Point : Symbol(M2.X.Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) -+>m.Point : Symbol(Point, Decl(nestedModules.ts, 21, 18)) ++>m.Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) >m : Symbol(m, Decl(nestedModules.ts, 25, 3)) ->Point : Symbol(M2.X.Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) -+>Point : Symbol(Point, Decl(nestedModules.ts, 21, 18)) ++>Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) var p: { x: number; y: number; } >p : Symbol(p, Decl(nestedModules.ts, 29, 3), Decl(nestedModules.ts, 30, 3)) -@@= skipped -30, +30 lines =@@ +@@= skipped -21, +21 lines =@@ var p: M2.X.Point; >p : Symbol(p, Decl(nestedModules.ts, 29, 3), Decl(nestedModules.ts, 30, 3)) >M2 : Symbol(M2, Decl(nestedModules.ts, 11, 1), Decl(nestedModules.ts, 17, 1)) ->X : Symbol(M2.X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) ->Point : Symbol(M2.X.Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) -+>X : Symbol(X, Decl(nestedModules.ts, 19, 11)) -+>Point : Symbol(Point) ++>X : Symbol(X, Decl(nestedModules.ts, 13, 10), Decl(nestedModules.ts, 19, 11)) ++>Point : Symbol(Point, Decl(nestedModules.ts, 13, 13), Decl(nestedModules.ts, 21, 18)) From 0b454ca89dba740124e506a8aa5087e1cb89e3d0 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 16:06:53 -0700 Subject: [PATCH 08/31] Print fully qualified type names when requested --- internal/checker/printer.go | 32 +++++++++++++++++++++++++------- internal/checker/relater.go | 8 +++++--- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/internal/checker/printer.go b/internal/checker/printer.go index 5d32930114..3011944c43 100644 --- a/internal/checker/printer.go +++ b/internal/checker/printer.go @@ -122,6 +122,20 @@ func (p *Printer) printName(symbol *ast.Symbol) { p.print(p.c.symbolToString(symbol)) } +func (p *Printer) printTypeName(symbol *ast.Symbol) { + if p.flags&TypeFormatFlagsUseFullyQualifiedType != 0 && symbol.Parent != nil { + p.printTypeName(symbol.Parent) + p.print(".") + } + if symbol.Flags&ast.SymbolFlagsModule != 0 && strings.HasPrefix(symbol.Name, "\"") { + p.print("import(") + p.print(symbol.Name) + p.print(")") + return + } + p.printName(symbol) +} + func (p *Printer) printTypeEx(t *Type, precedence ast.TypePrecedence) { if p.c.getTypePrecedence(t) < precedence { p.print("(") @@ -134,7 +148,7 @@ func (p *Printer) printTypeEx(t *Type, precedence ast.TypePrecedence) { func (p *Printer) printType(t *Type) { if t.alias != nil && (p.flags&TypeFormatFlagsInTypeAlias == 0 || p.depth > 0) { - p.printName(t.alias.symbol) + p.printTypeName(t.alias.symbol) p.printTypeArguments(t.alias.typeArguments) } else { p.printTypeNoAlias(t) @@ -253,10 +267,14 @@ func (p *Printer) printStringMappingType(t *Type) { func (p *Printer) printEnumLiteral(t *Type) { if parent := p.c.getParentOfSymbol(t.symbol); parent != nil { - p.printName(p.c.getParentOfSymbol(t.symbol)) - p.print(".") + p.printTypeName(parent) + if p.c.getDeclaredTypeOfSymbol(parent) != t { + p.print(".") + p.printName(t.symbol) + } + return } - p.printName(t.symbol) + p.printTypeName(t.symbol) } func (p *Printer) printObjectType(t *Type) { @@ -264,7 +282,7 @@ func (p *Printer) printObjectType(t *Type) { case t.objectFlags&ObjectFlagsReference != 0: p.printParameterizedType(t) case t.objectFlags&ObjectFlagsClassOrInterface != 0: - p.printName(t.symbol) + p.printTypeName(t.symbol) case p.c.isGenericMappedType(t) || t.objectFlags&ObjectFlagsMapped != 0 && t.AsMappedType().containsError: p.printMappedType(t) default: @@ -284,7 +302,7 @@ func (p *Printer) printParameterizedType(t *Type) { } func (p *Printer) printTypeReference(t *Type) { - p.printName(t.symbol) + p.printTypeName(t.symbol) p.printTypeArguments(p.c.getTypeArguments(t)[:p.c.getTypeReferenceArity(t)]) } @@ -513,7 +531,7 @@ func (p *Printer) printUnionType(t *Type) { case t.flags&TypeFlagsBoolean != 0: p.print("boolean") case t.flags&TypeFlagsEnumLiteral != 0: - p.printName(t.symbol) + p.printTypeName(t.symbol) default: u := t.AsUnionType() if u.origin != nil { diff --git a/internal/checker/relater.go b/internal/checker/relater.go index 9f92ab349b..0eaedd1c2e 100644 --- a/internal/checker/relater.go +++ b/internal/checker/relater.go @@ -4265,18 +4265,20 @@ func (r *Relater) reportUnmatchedProperty(source *Type, target *Type, unmatchedP } props := r.c.getUnmatchedProperties(source, target, requireOptionalProperties, false /*matchDiscriminantProperties*/) if len(props) == 1 { + sourceType, targetType := r.c.getTypeNamesForErrorDisplay(source, target) propName := r.c.symbolToString(unmatchedProperty) - r.reportError(diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName, r.c.TypeToString(source), r.c.TypeToString(target)) + r.reportError(diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName, sourceType, targetType) if len(unmatchedProperty.Declarations) != 0 { r.relatedInfo = append(r.relatedInfo, createDiagnosticForNode(unmatchedProperty.Declarations[0], diagnostics.X_0_is_declared_here, propName)) } } else if r.tryElaborateArrayLikeErrors(source, target, false /*reportErrors*/) { + sourceType, targetType := r.c.getTypeNamesForErrorDisplay(source, target) if len(props) > 5 { propNames := strings.Join(core.Map(props[:4], r.c.symbolToString), ", ") - r.reportError(diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, r.c.TypeToString(source), r.c.TypeToString(target), propNames, len(props)-4) + r.reportError(diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, sourceType, targetType, propNames, len(props)-4) } else { propNames := strings.Join(core.Map(props, r.c.symbolToString), ", ") - r.reportError(diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, r.c.TypeToString(source), r.c.TypeToString(target), propNames) + r.reportError(diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, sourceType, targetType, propNames) } } } From 0af89df40cb5f19cccf9a8710cdf5dd37db4057d Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 16:07:21 -0700 Subject: [PATCH 09/31] Accept new baselines --- .../differentTypesWithSameName.errors.txt | 4 +- ...differentTypesWithSameName.errors.txt.diff | 4 +- .../duplicateLocalVariable4.errors.txt | 4 +- .../duplicateLocalVariable4.errors.txt.diff | 15 -- .../compiler/duplicatePackage.errors.txt | 4 +- .../compiler/duplicatePackage.errors.txt.diff | 15 +- ...duplicatePackage_referenceTypes.errors.txt | 6 +- ...catePackage_referenceTypes.errors.txt.diff | 6 +- ...age_relativeImportWithinPackage.errors.txt | 4 +- ...elativeImportWithinPackage.errors.txt.diff | 4 +- ...ativeImportWithinPackage_scoped.errors.txt | 4 +- ...ImportWithinPackage_scoped.errors.txt.diff | 4 +- .../duplicatePackage_subModule.errors.txt | 6 +- ...duplicatePackage_subModule.errors.txt.diff | 6 +- .../compiler/enumAssignmentCompat3.errors.txt | 56 +++--- .../enumAssignmentCompat3.errors.txt.diff | 99 ++-------- .../compiler/enumAssignmentCompat6.errors.txt | 36 ++-- .../enumAssignmentCompat6.errors.txt.diff | 75 -------- .../compiler/enumAssignmentCompat7.errors.txt | 8 +- .../enumAssignmentCompat7.errors.txt.diff | 24 --- .../compiler/errorWithSameNameType.errors.txt | 8 +- .../errorWithSameNameType.errors.txt.diff | 25 --- .../nestedExcessPropertyChecking.errors.txt | 4 +- ...stedExcessPropertyChecking.errors.txt.diff | 20 -- .../submodule/compiler/qualify.errors.txt | 4 +- .../compiler/qualify.errors.txt.diff | 20 -- ...assignmentCompatWithEnumIndexer.errors.txt | 4 +- ...nmentCompatWithEnumIndexer.errors.txt.diff | 4 +- .../bestCommonTypeOfTuple.errors.txt | 8 +- .../bestCommonTypeOfTuple.errors.txt.diff | 25 --- .../conformance/enumAssignability.errors.txt | 108 +++++------ .../enumAssignability.errors.txt.diff | 173 ----------------- .../enumAssignabilityInInheritance.errors.txt | 8 +- ...AssignabilityInInheritance.errors.txt.diff | 26 --- ...sNotASubtypeOfAnythingButNumber.errors.txt | 64 +++--- ...SubtypeOfAnythingButNumber.errors.txt.diff | 182 ------------------ ...AnnotationAndInvalidInitializer.errors.txt | 8 +- ...ationAndInvalidInitializer.errors.txt.diff | 27 --- ...lWithGenericSignatureArguments2.errors.txt | 4 +- ...GenericSignatureArguments2.errors.txt.diff | 20 -- .../invalidBooleanAssignments.errors.txt | 4 +- .../invalidBooleanAssignments.errors.txt.diff | 20 -- .../invalidStringAssignments.errors.txt | 4 +- .../invalidStringAssignments.errors.txt.diff | 17 -- .../invalidVoidAssignments.errors.txt | 4 +- .../invalidVoidAssignments.errors.txt.diff | 13 +- .../conformance/invalidVoidValues.errors.txt | 4 +- .../invalidVoidValues.errors.txt.diff | 19 +- ...umentInferenceWithObjectLiteral.errors.txt | 4 +- ...InferenceWithObjectLiteral.errors.txt.diff | 15 -- ...IfEveryConstituentTypeIsSubtype.errors.txt | 4 +- ...ryConstituentTypeIsSubtype.errors.txt.diff | 20 -- 52 files changed, 225 insertions(+), 1029 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/errorWithSameNameType.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/qualify.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumAssignability.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/everyTypeWithAnnotationAndInvalidInitializer.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/invalidStringAssignments.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt index e30404217c..cc817d8dbc 100644 --- a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt @@ -1,4 +1,4 @@ -differentTypesWithSameName.ts(16,15): error TS2741: Property 's' is missing in type 'variable' but required in type 'variable'. +differentTypesWithSameName.ts(16,15): error TS2741: Property 's' is missing in type 'variable' but required in type 'm.variable'. ==== differentTypesWithSameName.ts (1 errors) ==== @@ -19,5 +19,5 @@ differentTypesWithSameName.ts(16,15): error TS2741: Property 's' is missing in t var v: variable = new variable(); m.doSomething(v); ~ -!!! error TS2741: Property 's' is missing in type 'variable' but required in type 'variable'. +!!! error TS2741: Property 's' is missing in type 'variable' but required in type 'm.variable'. !!! related TS2728 differentTypesWithSameName.ts:3:5: 's' is declared here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt.diff index c57965d285..a9a0f4bd8b 100644 --- a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt.diff @@ -3,7 +3,7 @@ @@= skipped -0, +0 lines =@@ -differentTypesWithSameName.ts(16,15): error TS2345: Argument of type 'variable' is not assignable to parameter of type 'm.variable'. - Property 's' is missing in type 'variable' but required in type 'm.variable'. -+differentTypesWithSameName.ts(16,15): error TS2741: Property 's' is missing in type 'variable' but required in type 'variable'. ++differentTypesWithSameName.ts(16,15): error TS2741: Property 's' is missing in type 'variable' but required in type 'm.variable'. ==== differentTypesWithSameName.ts (1 errors) ==== @@ -13,5 +13,5 @@ ~ -!!! error TS2345: Argument of type 'variable' is not assignable to parameter of type 'm.variable'. -!!! error TS2345: Property 's' is missing in type 'variable' but required in type 'm.variable'. -+!!! error TS2741: Property 's' is missing in type 'variable' but required in type 'variable'. ++!!! error TS2741: Property 's' is missing in type 'variable' but required in type 'm.variable'. !!! related TS2728 differentTypesWithSameName.ts:3:5: 's' is declared here. diff --git a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.errors.txt index db7d5536bd..630d7d7eb4 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.errors.txt @@ -1,4 +1,4 @@ -duplicateLocalVariable4.ts(6,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E.a'. +duplicateLocalVariable4.ts(6,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E'. ==== duplicateLocalVariable4.ts (1 errors) ==== @@ -9,5 +9,5 @@ duplicateLocalVariable4.ts(6,5): error TS2403: Subsequent variable declarations var x = E; var x = E.a; ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E.a'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E'. !!! related TS6203 duplicateLocalVariable4.ts:5:5: 'x' was also declared here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.errors.txt.diff deleted file mode 100644 index 41a80afebf..0000000000 --- a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.duplicateLocalVariable4.errors.txt -+++ new.duplicateLocalVariable4.errors.txt -@@= skipped -0, +0 lines =@@ --duplicateLocalVariable4.ts(6,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E'. -+duplicateLocalVariable4.ts(6,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E.a'. - - - ==== duplicateLocalVariable4.ts (1 errors) ==== -@@= skipped -8, +8 lines =@@ - var x = E; - var x = E.a; - ~ --!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E'. -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E.a'. - !!! related TS6203 duplicateLocalVariable4.ts:5:5: 'x' was also declared here. diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicatePackage.errors.txt index 50868c594a..4e9b3720b6 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage.errors.txt @@ -4,7 +4,7 @@ /node_modules/b/node_modules/x/index.d.ts(1,9): error TS1434: Unexpected keyword or identifier. /node_modules/b/node_modules/x/index.d.ts(1,9): error TS2304: Cannot find name 'not'. /node_modules/b/node_modules/x/index.d.ts(1,13): error TS2304: Cannot find name 'parsed'. -/src/a.ts(5,3): error TS2345: Argument of type 'default' is not assignable to parameter of type 'default'. +/src/a.ts(5,3): error TS2345: Argument of type 'import("/node_modules/c/node_modules/x/index").default' is not assignable to parameter of type 'import("/node_modules/a/node_modules/x/index").default'. Types have separate declarations of a private property 'x'. @@ -15,7 +15,7 @@ a(b); // Works a(c); // Error, these are from different versions of the library. ~ -!!! error TS2345: Argument of type 'default' is not assignable to parameter of type 'default'. +!!! error TS2345: Argument of type 'import("/node_modules/c/node_modules/x/index").default' is not assignable to parameter of type 'import("/node_modules/a/node_modules/x/index").default'. !!! error TS2345: Types have separate declarations of a private property 'x'. ==== /node_modules/a/index.d.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicatePackage.errors.txt.diff index 9d2cb2b588..c23372b9ab 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage.errors.txt.diff @@ -1,27 +1,16 @@ --- old.duplicatePackage.errors.txt +++ new.duplicatePackage.errors.txt @@= skipped -0, +0 lines =@@ --/src/a.ts(5,3): error TS2345: Argument of type 'import("/node_modules/c/node_modules/x/index").default' is not assignable to parameter of type 'import("/node_modules/a/node_modules/x/index").default'. +/node_modules/b/index.d.ts(1,15): error TS2306: File '/node_modules/b/node_modules/x/index.d.ts' is not a module. +/node_modules/b/node_modules/x/index.d.ts(1,1): error TS1434: Unexpected keyword or identifier. +/node_modules/b/node_modules/x/index.d.ts(1,1): error TS2304: Cannot find name 'content'. +/node_modules/b/node_modules/x/index.d.ts(1,9): error TS1434: Unexpected keyword or identifier. +/node_modules/b/node_modules/x/index.d.ts(1,9): error TS2304: Cannot find name 'not'. +/node_modules/b/node_modules/x/index.d.ts(1,13): error TS2304: Cannot find name 'parsed'. -+/src/a.ts(5,3): error TS2345: Argument of type 'default' is not assignable to parameter of type 'default'. + /src/a.ts(5,3): error TS2345: Argument of type 'import("/node_modules/c/node_modules/x/index").default' is not assignable to parameter of type 'import("/node_modules/a/node_modules/x/index").default'. Types have separate declarations of a private property 'x'. - -@@= skipped -8, +14 lines =@@ - a(b); // Works - a(c); // Error, these are from different versions of the library. - ~ --!!! error TS2345: Argument of type 'import("/node_modules/c/node_modules/x/index").default' is not assignable to parameter of type 'import("/node_modules/a/node_modules/x/index").default'. -+!!! error TS2345: Argument of type 'default' is not assignable to parameter of type 'default'. - !!! error TS2345: Types have separate declarations of a private property 'x'. - - ==== /node_modules/a/index.d.ts (0 errors) ==== -@@= skipped -15, +15 lines =@@ +@@= skipped -23, +29 lines =@@ ==== /node_modules/a/node_modules/x/package.json (0 errors) ==== { "name": "x", "version": "1.2.3" } diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.errors.txt index c8ec7204ba..954f20ec44 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.errors.txt @@ -1,4 +1,4 @@ -/index.ts(4,5): error TS2719: Type 'Foo' is not assignable to type 'Foo'. Two different types with this name exist, but they are unrelated. +/index.ts(4,5): error TS2322: Type 'import("/node_modules/a/node_modules/foo/index").Foo' is not assignable to type 'import("/node_modules/@types/foo/index").Foo'. Types have separate declarations of a private property 'x'. @@ -8,8 +8,8 @@ let foo: Foo = a.foo; ~~~ -!!! error TS2719: Type 'Foo' is not assignable to type 'Foo'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Types have separate declarations of a private property 'x'. +!!! error TS2322: Type 'import("/node_modules/a/node_modules/foo/index").Foo' is not assignable to type 'import("/node_modules/@types/foo/index").Foo'. +!!! error TS2322: Types have separate declarations of a private property 'x'. ==== /node_modules/a/index.d.ts (0 errors) ==== /// diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.errors.txt.diff index 98e7ac732b..6cb8e949f6 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.errors.txt.diff @@ -3,7 +3,7 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+/index.ts(4,5): error TS2719: Type 'Foo' is not assignable to type 'Foo'. Two different types with this name exist, but they are unrelated. ++/index.ts(4,5): error TS2322: Type 'import("/node_modules/a/node_modules/foo/index").Foo' is not assignable to type 'import("/node_modules/@types/foo/index").Foo'. + Types have separate declarations of a private property 'x'. + + @@ -13,8 +13,8 @@ + + let foo: Foo = a.foo; + ~~~ -+!!! error TS2719: Type 'Foo' is not assignable to type 'Foo'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Types have separate declarations of a private property 'x'. ++!!! error TS2322: Type 'import("/node_modules/a/node_modules/foo/index").Foo' is not assignable to type 'import("/node_modules/@types/foo/index").Foo'. ++!!! error TS2322: Types have separate declarations of a private property 'x'. + +==== /node_modules/a/index.d.ts (0 errors) ==== + /// diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage.errors.txt index 9939eab87e..9f4f6d7f9b 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage.errors.txt @@ -1,4 +1,4 @@ -/index.ts(4,5): error TS2345: Argument of type 'C' is not assignable to parameter of type 'C'. +/index.ts(4,5): error TS2345: Argument of type 'import("/node_modules/a/node_modules/foo/index").C' is not assignable to parameter of type 'import("/node_modules/foo/index").C'. Types have separate declarations of a private property 'x'. @@ -8,7 +8,7 @@ use(o); ~ -!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'C'. +!!! error TS2345: Argument of type 'import("/node_modules/a/node_modules/foo/index").C' is not assignable to parameter of type 'import("/node_modules/foo/index").C'. !!! error TS2345: Types have separate declarations of a private property 'x'. ==== /node_modules/a/node_modules/foo/package.json (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage.errors.txt.diff index a646266f08..3edf66f907 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage.errors.txt.diff @@ -3,7 +3,7 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+/index.ts(4,5): error TS2345: Argument of type 'C' is not assignable to parameter of type 'C'. ++/index.ts(4,5): error TS2345: Argument of type 'import("/node_modules/a/node_modules/foo/index").C' is not assignable to parameter of type 'import("/node_modules/foo/index").C'. + Types have separate declarations of a private property 'x'. + + @@ -13,7 +13,7 @@ + + use(o); + ~ -+!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'C'. ++!!! error TS2345: Argument of type 'import("/node_modules/a/node_modules/foo/index").C' is not assignable to parameter of type 'import("/node_modules/foo/index").C'. +!!! error TS2345: Types have separate declarations of a private property 'x'. + +==== /node_modules/a/node_modules/foo/package.json (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage_scoped.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage_scoped.errors.txt index 12a3608723..19026366ac 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage_scoped.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage_scoped.errors.txt @@ -1,4 +1,4 @@ -/index.ts(4,5): error TS2345: Argument of type 'C' is not assignable to parameter of type 'C'. +/index.ts(4,5): error TS2345: Argument of type 'import("/node_modules/a/node_modules/@foo/bar/index").C' is not assignable to parameter of type 'import("/node_modules/@foo/bar/index").C'. Types have separate declarations of a private property 'x'. @@ -8,7 +8,7 @@ use(o); ~ -!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'C'. +!!! error TS2345: Argument of type 'import("/node_modules/a/node_modules/@foo/bar/index").C' is not assignable to parameter of type 'import("/node_modules/@foo/bar/index").C'. !!! error TS2345: Types have separate declarations of a private property 'x'. ==== /node_modules/a/node_modules/@foo/bar/package.json (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage_scoped.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage_scoped.errors.txt.diff index b4fd3623c8..f30edfecb7 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage_scoped.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage_relativeImportWithinPackage_scoped.errors.txt.diff @@ -3,7 +3,7 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+/index.ts(4,5): error TS2345: Argument of type 'C' is not assignable to parameter of type 'C'. ++/index.ts(4,5): error TS2345: Argument of type 'import("/node_modules/a/node_modules/@foo/bar/index").C' is not assignable to parameter of type 'import("/node_modules/@foo/bar/index").C'. + Types have separate declarations of a private property 'x'. + + @@ -13,7 +13,7 @@ + + use(o); + ~ -+!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'C'. ++!!! error TS2345: Argument of type 'import("/node_modules/a/node_modules/@foo/bar/index").C' is not assignable to parameter of type 'import("/node_modules/@foo/bar/index").C'. +!!! error TS2345: Types have separate declarations of a private property 'x'. + +==== /node_modules/a/node_modules/@foo/bar/package.json (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.errors.txt index 3386829be5..b074dfc99f 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.errors.txt @@ -1,4 +1,4 @@ -/index.ts(4,7): error TS2719: Type 'default' is not assignable to type 'default'. Two different types with this name exist, but they are unrelated. +/index.ts(4,7): error TS2322: Type 'import("/node_modules/a/node_modules/foo/Foo").default' is not assignable to type 'import("/node_modules/foo/Foo").default'. Property 'source' is protected but type 'default' is not a class derived from 'default'. @@ -8,8 +8,8 @@ const o: Foo = a.o; ~ -!!! error TS2719: Type 'default' is not assignable to type 'default'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Property 'source' is protected but type 'default' is not a class derived from 'default'. +!!! error TS2322: Type 'import("/node_modules/a/node_modules/foo/Foo").default' is not assignable to type 'import("/node_modules/foo/Foo").default'. +!!! error TS2322: Property 'source' is protected but type 'default' is not a class derived from 'default'. ==== /node_modules/a/index.d.ts (0 errors) ==== import Foo from "foo/Foo"; diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.errors.txt.diff index ede2eef8c7..0e867f17ac 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.errors.txt.diff @@ -3,7 +3,7 @@ @@= skipped -0, +-1 lines =@@ - @@= skipped --1, +1 lines =@@ -+/index.ts(4,7): error TS2719: Type 'default' is not assignable to type 'default'. Two different types with this name exist, but they are unrelated. ++/index.ts(4,7): error TS2322: Type 'import("/node_modules/a/node_modules/foo/Foo").default' is not assignable to type 'import("/node_modules/foo/Foo").default'. + Property 'source' is protected but type 'default' is not a class derived from 'default'. + + @@ -13,8 +13,8 @@ + + const o: Foo = a.o; + ~ -+!!! error TS2719: Type 'default' is not assignable to type 'default'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Property 'source' is protected but type 'default' is not a class derived from 'default'. ++!!! error TS2322: Type 'import("/node_modules/a/node_modules/foo/Foo").default' is not assignable to type 'import("/node_modules/foo/Foo").default'. ++!!! error TS2322: Property 'source' is protected but type 'default' is not a class derived from 'default'. + +==== /node_modules/a/index.d.ts (0 errors) ==== + import Foo from "foo/Foo"; diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt index 2078b70c65..77801be402 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt @@ -1,22 +1,22 @@ -enumAssignmentCompat3.ts(68,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. +enumAssignmentCompat3.ts(68,1): error TS2322: Type 'Abcd.E' is not assignable to type 'First.E'. Property 'd' is missing in type 'E'. -enumAssignmentCompat3.ts(70,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. +enumAssignmentCompat3.ts(70,1): error TS2322: Type 'Cd.E' is not assignable to type 'First.E'. Each declaration of 'E.c' differs in its value, where '2' was expected but '0' was given. enumAssignmentCompat3.ts(71,1): error TS2322: Type 'Nope' is not assignable to type 'E'. -enumAssignmentCompat3.ts(72,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. +enumAssignmentCompat3.ts(72,1): error TS2322: Type 'Decl.E' is not assignable to type 'First.E'. Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. -enumAssignmentCompat3.ts(75,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. +enumAssignmentCompat3.ts(75,1): error TS2322: Type 'First.E' is not assignable to type 'Ab.E'. Property 'c' is missing in type 'E'. -enumAssignmentCompat3.ts(76,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. +enumAssignmentCompat3.ts(76,1): error TS2322: Type 'First.E' is not assignable to type 'Cd.E'. Property 'a' is missing in type 'E'. enumAssignmentCompat3.ts(77,1): error TS2322: Type 'E' is not assignable to type 'Nope'. -enumAssignmentCompat3.ts(78,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. +enumAssignmentCompat3.ts(78,1): error TS2322: Type 'First.E' is not assignable to type 'Decl.E'. Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. -enumAssignmentCompat3.ts(82,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -enumAssignmentCompat3.ts(83,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -enumAssignmentCompat3.ts(86,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. +enumAssignmentCompat3.ts(82,1): error TS2322: Type 'Const.E' is not assignable to type 'First.E'. +enumAssignmentCompat3.ts(83,1): error TS2322: Type 'First.E' is not assignable to type 'Const.E'. +enumAssignmentCompat3.ts(86,1): error TS2322: Type 'Merged.E' is not assignable to type 'First.E'. Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. -enumAssignmentCompat3.ts(87,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. +enumAssignmentCompat3.ts(87,1): error TS2322: Type 'First.E' is not assignable to type 'Merged.E'. Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. @@ -90,55 +90,55 @@ enumAssignmentCompat3.ts(87,1): error TS2719: Type 'E' is not assignable to type abc = secondAbc; // ok abc = secondAbcd; // missing 'd' ~~~ -!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Property 'd' is missing in type 'E'. +!!! error TS2322: Type 'Abcd.E' is not assignable to type 'First.E'. +!!! error TS2322: Property 'd' is missing in type 'E'. abc = secondAb; // ok abc = secondCd; // missing 'd' ~~~ -!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Each declaration of 'E.c' differs in its value, where '2' was expected but '0' was given. +!!! error TS2322: Type 'Cd.E' is not assignable to type 'First.E'. +!!! error TS2322: Each declaration of 'E.c' differs in its value, where '2' was expected but '0' was given. abc = nope; // nope! ~~~ !!! error TS2322: Type 'Nope' is not assignable to type 'E'. abc = decl; // bad - value of 'c' differs between these enums ~~~ -!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. +!!! error TS2322: Type 'Decl.E' is not assignable to type 'First.E'. +!!! error TS2322: Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. secondAbc = abc; // ok secondAbcd = abc; // ok secondAb = abc; // missing 'c' ~~~~~~~~ -!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Property 'c' is missing in type 'E'. +!!! error TS2322: Type 'First.E' is not assignable to type 'Ab.E'. +!!! error TS2322: Property 'c' is missing in type 'E'. secondCd = abc; // missing 'a' and 'b' ~~~~~~~~ -!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Property 'a' is missing in type 'E'. +!!! error TS2322: Type 'First.E' is not assignable to type 'Cd.E'. +!!! error TS2322: Property 'a' is missing in type 'E'. nope = abc; // nope! ~~~~ !!! error TS2322: Type 'E' is not assignable to type 'Nope'. decl = abc; // bad - value of 'c' differs between these enums ~~~~ -!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. +!!! error TS2322: Type 'First.E' is not assignable to type 'Decl.E'. +!!! error TS2322: Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. // const is only assignable to itself k = k; abc = k; // error ~~~ -!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: Type 'Const.E' is not assignable to type 'First.E'. k = abc; ~ -!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. +!!! error TS2322: Type 'First.E' is not assignable to type 'Const.E'. // merged enums compare all their members abc = merged; // missing 'd' ~~~ -!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. +!!! error TS2322: Type 'Merged.E' is not assignable to type 'First.E'. +!!! error TS2322: Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. merged = abc; // bad - value of 'c' differs between these enums ~~~~~~ -!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. +!!! error TS2322: Type 'First.E' is not assignable to type 'Merged.E'. +!!! error TS2322: Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. abc = merged2; // ok merged2 = abc; // ok \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt.diff index 7c5c01f68f..4c8b946672 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt.diff @@ -1,112 +1,43 @@ --- old.enumAssignmentCompat3.errors.txt +++ new.enumAssignmentCompat3.errors.txt @@= skipped -0, +0 lines =@@ --enumAssignmentCompat3.ts(68,1): error TS2322: Type 'Abcd.E' is not assignable to type 'First.E'. + enumAssignmentCompat3.ts(68,1): error TS2322: Type 'Abcd.E' is not assignable to type 'First.E'. - Property 'd' is missing in type 'First.E'. --enumAssignmentCompat3.ts(70,1): error TS2322: Type 'Cd.E' is not assignable to type 'First.E'. -+enumAssignmentCompat3.ts(68,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. + Property 'd' is missing in type 'E'. -+enumAssignmentCompat3.ts(70,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. + enumAssignmentCompat3.ts(70,1): error TS2322: Type 'Cd.E' is not assignable to type 'First.E'. Each declaration of 'E.c' differs in its value, where '2' was expected but '0' was given. enumAssignmentCompat3.ts(71,1): error TS2322: Type 'Nope' is not assignable to type 'E'. --enumAssignmentCompat3.ts(72,1): error TS2322: Type 'Decl.E' is not assignable to type 'First.E'. -+enumAssignmentCompat3.ts(72,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. + enumAssignmentCompat3.ts(72,1): error TS2322: Type 'Decl.E' is not assignable to type 'First.E'. Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. --enumAssignmentCompat3.ts(75,1): error TS2322: Type 'First.E' is not assignable to type 'Ab.E'. + enumAssignmentCompat3.ts(75,1): error TS2322: Type 'First.E' is not assignable to type 'Ab.E'. - Property 'c' is missing in type 'Ab.E'. --enumAssignmentCompat3.ts(76,1): error TS2322: Type 'First.E' is not assignable to type 'Cd.E'. -- Property 'a' is missing in type 'Cd.E'. -+enumAssignmentCompat3.ts(75,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. + Property 'c' is missing in type 'E'. -+enumAssignmentCompat3.ts(76,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. + enumAssignmentCompat3.ts(76,1): error TS2322: Type 'First.E' is not assignable to type 'Cd.E'. +- Property 'a' is missing in type 'Cd.E'. + Property 'a' is missing in type 'E'. enumAssignmentCompat3.ts(77,1): error TS2322: Type 'E' is not assignable to type 'Nope'. --enumAssignmentCompat3.ts(78,1): error TS2322: Type 'First.E' is not assignable to type 'Decl.E'. -+enumAssignmentCompat3.ts(78,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. + enumAssignmentCompat3.ts(78,1): error TS2322: Type 'First.E' is not assignable to type 'Decl.E'. Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. --enumAssignmentCompat3.ts(82,1): error TS2322: Type 'Const.E' is not assignable to type 'First.E'. --enumAssignmentCompat3.ts(83,1): error TS2322: Type 'First.E' is not assignable to type 'Const.E'. --enumAssignmentCompat3.ts(86,1): error TS2322: Type 'Merged.E' is not assignable to type 'First.E'. -+enumAssignmentCompat3.ts(82,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -+enumAssignmentCompat3.ts(83,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -+enumAssignmentCompat3.ts(86,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. - Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. --enumAssignmentCompat3.ts(87,1): error TS2322: Type 'First.E' is not assignable to type 'Merged.E'. -+enumAssignmentCompat3.ts(87,1): error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. - Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. - - -@@= skipped -89, +89 lines =@@ - abc = secondAbc; // ok +@@= skipped -90, +90 lines =@@ abc = secondAbcd; // missing 'd' ~~~ --!!! error TS2322: Type 'Abcd.E' is not assignable to type 'First.E'. + !!! error TS2322: Type 'Abcd.E' is not assignable to type 'First.E'. -!!! error TS2322: Property 'd' is missing in type 'First.E'. -+!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Property 'd' is missing in type 'E'. ++!!! error TS2322: Property 'd' is missing in type 'E'. abc = secondAb; // ok abc = secondCd; // missing 'd' ~~~ --!!! error TS2322: Type 'Cd.E' is not assignable to type 'First.E'. --!!! error TS2322: Each declaration of 'E.c' differs in its value, where '2' was expected but '0' was given. -+!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Each declaration of 'E.c' differs in its value, where '2' was expected but '0' was given. - abc = nope; // nope! - ~~~ - !!! error TS2322: Type 'Nope' is not assignable to type 'E'. - abc = decl; // bad - value of 'c' differs between these enums - ~~~ --!!! error TS2322: Type 'Decl.E' is not assignable to type 'First.E'. --!!! error TS2322: Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. -+!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. - secondAbc = abc; // ok - secondAbcd = abc; // ok +@@= skipped -18, +18 lines =@@ secondAb = abc; // missing 'c' ~~~~~~~~ --!!! error TS2322: Type 'First.E' is not assignable to type 'Ab.E'. + !!! error TS2322: Type 'First.E' is not assignable to type 'Ab.E'. -!!! error TS2322: Property 'c' is missing in type 'Ab.E'. -+!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Property 'c' is missing in type 'E'. ++!!! error TS2322: Property 'c' is missing in type 'E'. secondCd = abc; // missing 'a' and 'b' ~~~~~~~~ --!!! error TS2322: Type 'First.E' is not assignable to type 'Cd.E'. + !!! error TS2322: Type 'First.E' is not assignable to type 'Cd.E'. -!!! error TS2322: Property 'a' is missing in type 'Cd.E'. -+!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Property 'a' is missing in type 'E'. ++!!! error TS2322: Property 'a' is missing in type 'E'. nope = abc; // nope! ~~~~ !!! error TS2322: Type 'E' is not assignable to type 'Nope'. - decl = abc; // bad - value of 'c' differs between these enums - ~~~~ --!!! error TS2322: Type 'First.E' is not assignable to type 'Decl.E'. --!!! error TS2322: Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. -+!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. - - // const is only assignable to itself - k = k; - abc = k; // error - ~~~ --!!! error TS2322: Type 'Const.E' is not assignable to type 'First.E'. -+!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. - k = abc; - ~ --!!! error TS2322: Type 'First.E' is not assignable to type 'Const.E'. -+!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. - - // merged enums compare all their members - abc = merged; // missing 'd' - ~~~ --!!! error TS2322: Type 'Merged.E' is not assignable to type 'First.E'. --!!! error TS2322: Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. -+!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Each declaration of 'E.c' differs in its value, where '2' was expected but '3' was given. - merged = abc; // bad - value of 'c' differs between these enums - ~~~~~~ --!!! error TS2322: Type 'First.E' is not assignable to type 'Merged.E'. --!!! error TS2322: Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. -+!!! error TS2719: Type 'E' is not assignable to type 'E'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Each declaration of 'E.c' differs in its value, where '3' was expected but '2' was given. - abc = merged2; // ok - merged2 = abc; // ok diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.errors.txt b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.errors.txt index 4dd8d915b2..c6fa9e6465 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.errors.txt @@ -1,16 +1,16 @@ -a.ts(36,5): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. +a.ts(36,5): error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'numerics.DiagnosticCategory'. Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. -a.ts(37,5): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. +a.ts(37,5): error TS2322: Type 'numerics.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. a.ts(41,5): error TS2322: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory2'. a.ts(42,5): error TS2322: Type 'DiagnosticCategory2' is not assignable to type 'DiagnosticCategory'. -a.ts(51,5): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. +a.ts(51,5): error TS2322: Type 'ambients.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. -a.ts(52,5): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. +a.ts(52,5): error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'ambients.DiagnosticCategory'. One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. -f.ts(18,9): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. +f.ts(18,9): error TS2322: Type 'DiagnosticCategory' is not assignable to type 'import("f").DiagnosticCategory'. Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. -f.ts(19,9): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. +f.ts(19,9): error TS2322: Type 'import("f").DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. @@ -52,12 +52,12 @@ f.ts(19,9): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'D function f(x: numerics.DiagnosticCategory, y: strings.DiagnosticCategory) { x = y; ~ -!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. +!!! error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'numerics.DiagnosticCategory'. +!!! error TS2322: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. y = x; ~ -!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. +!!! error TS2322: Type 'numerics.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. +!!! error TS2322: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. } function g(x: numerics.DiagnosticCategory2, y: strings.DiagnosticCategory) { @@ -77,12 +77,12 @@ f.ts(19,9): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'D function i(x: strings.DiagnosticCategory, y: ambients.DiagnosticCategory) { x = y; ~ -!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. +!!! error TS2322: Type 'ambients.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. +!!! error TS2322: One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. y = x; ~ -!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. +!!! error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'ambients.DiagnosticCategory'. +!!! error TS2322: One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. } ==== f.ts (2 errors) ==== @@ -105,11 +105,11 @@ f.ts(19,9): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'D function f(y: DiagnosticCategory) { x = y; ~ -!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. +!!! error TS2322: Type 'DiagnosticCategory' is not assignable to type 'import("f").DiagnosticCategory'. +!!! error TS2322: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. y = x; ~ -!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -!!! error TS2719: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. +!!! error TS2322: Type 'import("f").DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. +!!! error TS2322: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. } })() \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.errors.txt.diff deleted file mode 100644 index 802d8a6ae2..0000000000 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.errors.txt.diff +++ /dev/null @@ -1,75 +0,0 @@ ---- old.enumAssignmentCompat6.errors.txt -+++ new.enumAssignmentCompat6.errors.txt -@@= skipped -0, +0 lines =@@ --a.ts(36,5): error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'numerics.DiagnosticCategory'. -+a.ts(36,5): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. - Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. --a.ts(37,5): error TS2322: Type 'numerics.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. -+a.ts(37,5): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. - Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. - a.ts(41,5): error TS2322: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory2'. - a.ts(42,5): error TS2322: Type 'DiagnosticCategory2' is not assignable to type 'DiagnosticCategory'. --a.ts(51,5): error TS2322: Type 'ambients.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. -+a.ts(51,5): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. - One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. --a.ts(52,5): error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'ambients.DiagnosticCategory'. -+a.ts(52,5): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. - One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. --f.ts(18,9): error TS2322: Type 'DiagnosticCategory' is not assignable to type 'import("f").DiagnosticCategory'. -+f.ts(18,9): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. - Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. --f.ts(19,9): error TS2322: Type 'import("f").DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. -+f.ts(19,9): error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. - Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. - - -@@= skipped -51, +51 lines =@@ - function f(x: numerics.DiagnosticCategory, y: strings.DiagnosticCategory) { - x = y; - ~ --!!! error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'numerics.DiagnosticCategory'. --!!! error TS2322: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. -+!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. - y = x; - ~ --!!! error TS2322: Type 'numerics.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. --!!! error TS2322: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. -+!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. - } - - function g(x: numerics.DiagnosticCategory2, y: strings.DiagnosticCategory) { -@@= skipped -25, +25 lines =@@ - function i(x: strings.DiagnosticCategory, y: ambients.DiagnosticCategory) { - x = y; - ~ --!!! error TS2322: Type 'ambients.DiagnosticCategory' is not assignable to type 'strings.DiagnosticCategory'. --!!! error TS2322: One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. -+!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. - y = x; - ~ --!!! error TS2322: Type 'strings.DiagnosticCategory' is not assignable to type 'ambients.DiagnosticCategory'. --!!! error TS2322: One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. -+!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: One value of 'DiagnosticCategory.Warning' is the string '"Warning"', and the other is assumed to be an unknown numeric value. - } - - ==== f.ts (2 errors) ==== -@@= skipped -28, +28 lines =@@ - function f(y: DiagnosticCategory) { - x = y; - ~ --!!! error TS2322: Type 'DiagnosticCategory' is not assignable to type 'import("f").DiagnosticCategory'. --!!! error TS2322: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. -+!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '0' was expected but '"Warning"' was given. - y = x; - ~ --!!! error TS2322: Type 'import("f").DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. --!!! error TS2322: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. -+!!! error TS2719: Type 'DiagnosticCategory' is not assignable to type 'DiagnosticCategory'. Two different types with this name exist, but they are unrelated. -+!!! error TS2719: Each declaration of 'DiagnosticCategory.Warning' differs in its value, where '"Warning"' was expected but '0' was given. - } - })() diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.errors.txt b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.errors.txt index fdb1122d60..b829d9b65d 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.errors.txt @@ -1,7 +1,7 @@ enumAssignmentCompat7.ts(16,14): error TS2416: Property 'method' in type 'Derived' is not assignable to the same property in base type 'Base'. - Type '(param: E.A) => void' is not assignable to type '(param: E.A) => void'. Two different types with this name exist, but they are unrelated. + Type '(param: second.E) => void' is not assignable to type '(param: first.E) => void'. Types of parameters 'param' and 'param' are incompatible. - Type 'E.A' is not assignable to type 'E.A'. Two different types with this name exist, but they are unrelated. + Type 'first.E' is not assignable to type 'second.E'. enumAssignmentCompat7.ts(20,10): error TS2394: This overload signature is not compatible with its implementation signature. enumAssignmentCompat7.ts(22,21): error TS2339: Property 'B' does not exist on type 'typeof E'. @@ -25,9 +25,9 @@ enumAssignmentCompat7.ts(22,21): error TS2339: Property 'B' does not exist on ty override method(param: second.E) { ~~~~~~ !!! error TS2416: Property 'method' in type 'Derived' is not assignable to the same property in base type 'Base'. -!!! error TS2416: Type '(param: E.A) => void' is not assignable to type '(param: E.A) => void'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: Type '(param: second.E) => void' is not assignable to type '(param: first.E) => void'. !!! error TS2416: Types of parameters 'param' and 'param' are incompatible. -!!! error TS2416: Type 'E.A' is not assignable to type 'E.A'. Two different types with this name exist, but they are unrelated. +!!! error TS2416: Type 'first.E' is not assignable to type 'second.E'. } } diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.errors.txt.diff deleted file mode 100644 index e7bc266811..0000000000 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.errors.txt.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- old.enumAssignmentCompat7.errors.txt -+++ new.enumAssignmentCompat7.errors.txt -@@= skipped -0, +0 lines =@@ - enumAssignmentCompat7.ts(16,14): error TS2416: Property 'method' in type 'Derived' is not assignable to the same property in base type 'Base'. -- Type '(param: second.E) => void' is not assignable to type '(param: first.E) => void'. -+ Type '(param: E.A) => void' is not assignable to type '(param: E.A) => void'. Two different types with this name exist, but they are unrelated. - Types of parameters 'param' and 'param' are incompatible. -- Type 'first.E' is not assignable to type 'second.E'. -+ Type 'E.A' is not assignable to type 'E.A'. Two different types with this name exist, but they are unrelated. - enumAssignmentCompat7.ts(20,10): error TS2394: This overload signature is not compatible with its implementation signature. - enumAssignmentCompat7.ts(22,21): error TS2339: Property 'B' does not exist on type 'typeof E'. - -@@= skipped -24, +24 lines =@@ - override method(param: second.E) { - ~~~~~~ - !!! error TS2416: Property 'method' in type 'Derived' is not assignable to the same property in base type 'Base'. --!!! error TS2416: Type '(param: second.E) => void' is not assignable to type '(param: first.E) => void'. -+!!! error TS2416: Type '(param: E.A) => void' is not assignable to type '(param: E.A) => void'. Two different types with this name exist, but they are unrelated. - !!! error TS2416: Types of parameters 'param' and 'param' are incompatible. --!!! error TS2416: Type 'first.E' is not assignable to type 'second.E'. -+!!! error TS2416: Type 'E.A' is not assignable to type 'E.A'. Two different types with this name exist, but they are unrelated. - } - } - diff --git a/testdata/baselines/reference/submodule/compiler/errorWithSameNameType.errors.txt b/testdata/baselines/reference/submodule/compiler/errorWithSameNameType.errors.txt index 5faf707aa1..282462d525 100644 --- a/testdata/baselines/reference/submodule/compiler/errorWithSameNameType.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/errorWithSameNameType.errors.txt @@ -1,5 +1,5 @@ -c.ts(7,5): error TS2367: This comparison appears to be unintentional because the types 'F' and 'F' have no overlap. -c.ts(11,1): error TS2741: Property 'foo1' is missing in type 'F' but required in type 'F'. +c.ts(7,5): error TS2367: This comparison appears to be unintentional because the types 'import("a").F' and 'import("b").F' have no overlap. +c.ts(11,1): error TS2741: Property 'foo1' is missing in type 'import("b").F' but required in type 'import("a").F'. ==== a.ts (0 errors) ==== @@ -21,12 +21,12 @@ c.ts(11,1): error TS2741: Property 'foo1' is missing in type 'F' but required in if (a === b) { ~~~~~~~ -!!! error TS2367: This comparison appears to be unintentional because the types 'F' and 'F' have no overlap. +!!! error TS2367: This comparison appears to be unintentional because the types 'import("a").F' and 'import("b").F' have no overlap. } a = b ~ -!!! error TS2741: Property 'foo1' is missing in type 'F' but required in type 'F'. +!!! error TS2741: Property 'foo1' is missing in type 'import("b").F' but required in type 'import("a").F'. !!! related TS2728 a.ts:2:5: 'foo1' is declared here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorWithSameNameType.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/errorWithSameNameType.errors.txt.diff deleted file mode 100644 index a08a499b65..0000000000 --- a/testdata/baselines/reference/submodule/compiler/errorWithSameNameType.errors.txt.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- old.errorWithSameNameType.errors.txt -+++ new.errorWithSameNameType.errors.txt -@@= skipped -0, +0 lines =@@ --c.ts(7,5): error TS2367: This comparison appears to be unintentional because the types 'import("a").F' and 'import("b").F' have no overlap. --c.ts(11,1): error TS2741: Property 'foo1' is missing in type 'import("b").F' but required in type 'import("a").F'. -+c.ts(7,5): error TS2367: This comparison appears to be unintentional because the types 'F' and 'F' have no overlap. -+c.ts(11,1): error TS2741: Property 'foo1' is missing in type 'F' but required in type 'F'. - - - ==== a.ts (0 errors) ==== -@@= skipped -20, +20 lines =@@ - - if (a === b) { - ~~~~~~~ --!!! error TS2367: This comparison appears to be unintentional because the types 'import("a").F' and 'import("b").F' have no overlap. -+!!! error TS2367: This comparison appears to be unintentional because the types 'F' and 'F' have no overlap. - - } - - a = b - ~ --!!! error TS2741: Property 'foo1' is missing in type 'import("b").F' but required in type 'import("a").F'. -+!!! error TS2741: Property 'foo1' is missing in type 'F' but required in type 'F'. - !!! related TS2728 a.ts:2:5: 'foo1' is declared here. - diff --git a/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.errors.txt b/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.errors.txt index 4faa14568c..7c131d020a 100644 --- a/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.errors.txt @@ -2,7 +2,7 @@ nestedExcessPropertyChecking.ts(6,7): error TS2322: Type 'C1' is not assignable Types of property 'x' are incompatible. Type '{ c: string; }' has no properties in common with type '{ a?: string | undefined; } & { b?: string | undefined; }'. nestedExcessPropertyChecking.ts(13,7): error TS2559: Type 'C2' has no properties in common with type 'A2 & B2'. -nestedExcessPropertyChecking.ts(17,5): error TS2559: Type 'E.A' has no properties in common with type '{ nope?: any; }'. +nestedExcessPropertyChecking.ts(17,5): error TS2559: Type 'E' has no properties in common with type '{ nope?: any; }'. nestedExcessPropertyChecking.ts(18,5): error TS2559: Type '"A"' has no properties in common with type '{ nope?: any; }'. nestedExcessPropertyChecking.ts(30,22): error TS2559: Type 'false' has no properties in common with type 'OverridesInput'. nestedExcessPropertyChecking.ts(40,9): error TS2559: Type 'false' has no properties in common with type 'OverridesInput'. @@ -33,7 +33,7 @@ nestedExcessPropertyChecking.ts(40,9): error TS2559: Type 'false' has no propert let x: { nope?: any } = E.A; // Error ~ -!!! error TS2559: Type 'E.A' has no properties in common with type '{ nope?: any; }'. +!!! error TS2559: Type 'E' has no properties in common with type '{ nope?: any; }'. let y: { nope?: any } = "A"; // Error ~ !!! error TS2559: Type '"A"' has no properties in common with type '{ nope?: any; }'. diff --git a/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.errors.txt.diff deleted file mode 100644 index 37f8f1425f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.nestedExcessPropertyChecking.errors.txt -+++ new.nestedExcessPropertyChecking.errors.txt -@@= skipped -1, +1 lines =@@ - Types of property 'x' are incompatible. - Type '{ c: string; }' has no properties in common with type '{ a?: string | undefined; } & { b?: string | undefined; }'. - nestedExcessPropertyChecking.ts(13,7): error TS2559: Type 'C2' has no properties in common with type 'A2 & B2'. --nestedExcessPropertyChecking.ts(17,5): error TS2559: Type 'E' has no properties in common with type '{ nope?: any; }'. -+nestedExcessPropertyChecking.ts(17,5): error TS2559: Type 'E.A' has no properties in common with type '{ nope?: any; }'. - nestedExcessPropertyChecking.ts(18,5): error TS2559: Type '"A"' has no properties in common with type '{ nope?: any; }'. - nestedExcessPropertyChecking.ts(30,22): error TS2559: Type 'false' has no properties in common with type 'OverridesInput'. - nestedExcessPropertyChecking.ts(40,9): error TS2559: Type 'false' has no properties in common with type 'OverridesInput'. -@@= skipped -31, +31 lines =@@ - - let x: { nope?: any } = E.A; // Error - ~ --!!! error TS2559: Type 'E' has no properties in common with type '{ nope?: any; }'. -+!!! error TS2559: Type 'E.A' has no properties in common with type '{ nope?: any; }'. - let y: { nope?: any } = "A"; // Error - ~ - !!! error TS2559: Type '"A"' has no properties in common with type '{ nope?: any; }'. diff --git a/testdata/baselines/reference/submodule/compiler/qualify.errors.txt b/testdata/baselines/reference/submodule/compiler/qualify.errors.txt index c5d34cfec2..e1e3b32187 100644 --- a/testdata/baselines/reference/submodule/compiler/qualify.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/qualify.errors.txt @@ -7,7 +7,7 @@ qualify.ts(47,13): error TS2322: Type 'I4' is not assignable to type '() => I3'. qualify.ts(48,13): error TS2322: Type 'I4' is not assignable to type '(k: I3) => void'. Type 'I4' provides no match for the signature '(k: I3): void'. qualify.ts(49,13): error TS2741: Property 'k' is missing in type 'I4' but required in type '{ k: I3; }'. -qualify.ts(58,5): error TS2741: Property 'p' is missing in type 'I' but required in type 'I'. +qualify.ts(58,5): error TS2741: Property 'p' is missing in type 'I' but required in type 'T.I'. ==== qualify.ts (8 errors) ==== @@ -88,7 +88,7 @@ qualify.ts(58,5): error TS2741: Property 'p' is missing in type 'I' but required var y:I; var x:T.I=y; ~ -!!! error TS2741: Property 'p' is missing in type 'I' but required in type 'I'. +!!! error TS2741: Property 'p' is missing in type 'I' but required in type 'T.I'. !!! related TS2728 qualify.ts:18:9: 'p' is declared here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/qualify.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/qualify.errors.txt.diff deleted file mode 100644 index e95a04a211..0000000000 --- a/testdata/baselines/reference/submodule/compiler/qualify.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.qualify.errors.txt -+++ new.qualify.errors.txt -@@= skipped -6, +6 lines =@@ - qualify.ts(48,13): error TS2322: Type 'I4' is not assignable to type '(k: I3) => void'. - Type 'I4' provides no match for the signature '(k: I3): void'. - qualify.ts(49,13): error TS2741: Property 'k' is missing in type 'I4' but required in type '{ k: I3; }'. --qualify.ts(58,5): error TS2741: Property 'p' is missing in type 'I' but required in type 'T.I'. -+qualify.ts(58,5): error TS2741: Property 'p' is missing in type 'I' but required in type 'I'. - - - ==== qualify.ts (8 errors) ==== -@@= skipped -81, +81 lines =@@ - var y:I; - var x:T.I=y; - ~ --!!! error TS2741: Property 'p' is missing in type 'I' but required in type 'T.I'. -+!!! error TS2741: Property 'p' is missing in type 'I' but required in type 'I'. - !!! related TS2728 qualify.ts:18:9: 'p' is declared here. - - diff --git a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.errors.txt b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.errors.txt index 2117a5c903..741f6176b6 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.errors.txt @@ -1,4 +1,4 @@ -assignmentCompatWithEnumIndexer.ts(5,5): error TS2741: Property '0' is missing in type '{}' but required in type 'Record'. +assignmentCompatWithEnumIndexer.ts(5,5): error TS2741: Property '0' is missing in type '{}' but required in type 'Record'. ==== assignmentCompatWithEnumIndexer.ts (1 errors) ==== @@ -8,5 +8,5 @@ assignmentCompatWithEnumIndexer.ts(5,5): error TS2741: Property '0' is missing i let foo: Record = {} ~~~ -!!! error TS2741: Property '0' is missing in type '{}' but required in type 'Record'. +!!! error TS2741: Property '0' is missing in type '{}' but required in type 'Record'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.errors.txt.diff index f4d513cea1..92e30fbf64 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.errors.txt.diff @@ -2,7 +2,7 @@ +++ new.assignmentCompatWithEnumIndexer.errors.txt @@= skipped -0, +0 lines =@@ -assignmentCompatWithEnumIndexer.ts(5,5): error TS2741: Property '[E.A]' is missing in type '{}' but required in type 'Record'. -+assignmentCompatWithEnumIndexer.ts(5,5): error TS2741: Property '0' is missing in type '{}' but required in type 'Record'. ++assignmentCompatWithEnumIndexer.ts(5,5): error TS2741: Property '0' is missing in type '{}' but required in type 'Record'. ==== assignmentCompatWithEnumIndexer.ts (1 errors) ==== @@ -11,5 +11,5 @@ let foo: Record = {} ~~~ -!!! error TS2741: Property '[E.A]' is missing in type '{}' but required in type 'Record'. -+!!! error TS2741: Property '0' is missing in type '{}' but required in type 'Record'. ++!!! error TS2741: Property '0' is missing in type '{}' but required in type 'Record'. diff --git a/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.errors.txt b/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.errors.txt index d02375c6f3..4f90b477de 100644 --- a/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.errors.txt @@ -1,7 +1,7 @@ bestCommonTypeOfTuple.ts(22,13): error TS2493: Tuple type '[(x: number) => string, (x: number) => number]' of length '2' has no element at index '2'. -bestCommonTypeOfTuple.ts(23,13): error TS2493: Tuple type '[E1.one, E2.two]' of length '2' has no element at index '2'. +bestCommonTypeOfTuple.ts(23,13): error TS2493: Tuple type '[E1, E2]' of length '2' has no element at index '2'. bestCommonTypeOfTuple.ts(24,13): error TS2493: Tuple type '[number, any]' of length '2' has no element at index '2'. -bestCommonTypeOfTuple.ts(25,13): error TS2493: Tuple type '[E1.one, E2.two, number]' of length '3' has no element at index '3'. +bestCommonTypeOfTuple.ts(25,13): error TS2493: Tuple type '[E1, E2, number]' of length '3' has no element at index '3'. ==== bestCommonTypeOfTuple.ts (4 errors) ==== @@ -31,10 +31,10 @@ bestCommonTypeOfTuple.ts(25,13): error TS2493: Tuple type '[E1.one, E2.two, numb !!! error TS2493: Tuple type '[(x: number) => string, (x: number) => number]' of length '2' has no element at index '2'. var e2 = t2[2]; // {} ~ -!!! error TS2493: Tuple type '[E1.one, E2.two]' of length '2' has no element at index '2'. +!!! error TS2493: Tuple type '[E1, E2]' of length '2' has no element at index '2'. var e3 = t3[2]; // any ~ !!! error TS2493: Tuple type '[number, any]' of length '2' has no element at index '2'. var e4 = t4[3]; // number ~ -!!! error TS2493: Tuple type '[E1.one, E2.two, number]' of length '3' has no element at index '3'. \ No newline at end of file +!!! error TS2493: Tuple type '[E1, E2, number]' of length '3' has no element at index '3'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.errors.txt.diff deleted file mode 100644 index 2d616f5812..0000000000 --- a/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.errors.txt.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- old.bestCommonTypeOfTuple.errors.txt -+++ new.bestCommonTypeOfTuple.errors.txt -@@= skipped -0, +0 lines =@@ - bestCommonTypeOfTuple.ts(22,13): error TS2493: Tuple type '[(x: number) => string, (x: number) => number]' of length '2' has no element at index '2'. --bestCommonTypeOfTuple.ts(23,13): error TS2493: Tuple type '[E1, E2]' of length '2' has no element at index '2'. -+bestCommonTypeOfTuple.ts(23,13): error TS2493: Tuple type '[E1.one, E2.two]' of length '2' has no element at index '2'. - bestCommonTypeOfTuple.ts(24,13): error TS2493: Tuple type '[number, any]' of length '2' has no element at index '2'. --bestCommonTypeOfTuple.ts(25,13): error TS2493: Tuple type '[E1, E2, number]' of length '3' has no element at index '3'. -+bestCommonTypeOfTuple.ts(25,13): error TS2493: Tuple type '[E1.one, E2.two, number]' of length '3' has no element at index '3'. - - - ==== bestCommonTypeOfTuple.ts (4 errors) ==== -@@= skipped -30, +30 lines =@@ - !!! error TS2493: Tuple type '[(x: number) => string, (x: number) => number]' of length '2' has no element at index '2'. - var e2 = t2[2]; // {} - ~ --!!! error TS2493: Tuple type '[E1, E2]' of length '2' has no element at index '2'. -+!!! error TS2493: Tuple type '[E1.one, E2.two]' of length '2' has no element at index '2'. - var e3 = t3[2]; // any - ~ - !!! error TS2493: Tuple type '[number, any]' of length '2' has no element at index '2'. - var e4 = t4[3]; // number - ~ --!!! error TS2493: Tuple type '[E1, E2, number]' of length '3' has no element at index '3'. -+!!! error TS2493: Tuple type '[E1.one, E2.two, number]' of length '3' has no element at index '3'. diff --git a/testdata/baselines/reference/submodule/conformance/enumAssignability.errors.txt b/testdata/baselines/reference/submodule/conformance/enumAssignability.errors.txt index 79c80b65a1..36a4c7eb63 100644 --- a/testdata/baselines/reference/submodule/conformance/enumAssignability.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/enumAssignability.errors.txt @@ -1,30 +1,30 @@ -enumAssignability.ts(9,1): error TS2322: Type 'F.B' is not assignable to type 'E.A'. -enumAssignability.ts(10,1): error TS2322: Type 'E.A' is not assignable to type 'F.B'. -enumAssignability.ts(11,1): error TS2322: Type '1' is not assignable to type 'E.A'. -enumAssignability.ts(12,1): error TS2322: Type '1' is not assignable to type 'F.B'. -enumAssignability.ts(29,9): error TS2322: Type 'E.A' is not assignable to type 'string'. -enumAssignability.ts(30,9): error TS2322: Type 'E.A' is not assignable to type 'boolean'. -enumAssignability.ts(31,9): error TS2322: Type 'E.A' is not assignable to type 'Date'. -enumAssignability.ts(33,9): error TS2322: Type 'E.A' is not assignable to type 'void'. -enumAssignability.ts(36,9): error TS2322: Type 'E.A' is not assignable to type '() => {}'. -enumAssignability.ts(37,9): error TS2322: Type 'E.A' is not assignable to type 'Function'. -enumAssignability.ts(38,9): error TS2322: Type 'E.A' is not assignable to type '(x: number) => string'. -enumAssignability.ts(39,5): error TS2322: Type 'E.A' is not assignable to type 'C'. -enumAssignability.ts(40,5): error TS2322: Type 'E.A' is not assignable to type 'I'. -enumAssignability.ts(41,9): error TS2322: Type 'E.A' is not assignable to type 'number[]'. -enumAssignability.ts(42,9): error TS2322: Type 'E.A' is not assignable to type '{ foo: string; }'. -enumAssignability.ts(43,9): error TS2322: Type 'E.A' is not assignable to type '(x: T) => T'. -enumAssignability.ts(45,9): error TS2322: Type 'E.A' is not assignable to type 'String'. -enumAssignability.ts(48,9): error TS2322: Type 'E.A' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. -enumAssignability.ts(49,9): error TS2322: Type 'E.A' is not assignable to type 'U'. - 'U' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. -enumAssignability.ts(50,9): error TS2322: Type 'E.A' is not assignable to type 'V'. - 'V' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. -enumAssignability.ts(51,13): error TS2322: Type 'E.A' is not assignable to type 'A'. - 'E.A' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype of constraint 'Number'. -enumAssignability.ts(52,13): error TS2322: Type 'E.A' is not assignable to type 'B'. - 'E.A' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint 'E.A'. +enumAssignability.ts(9,1): error TS2322: Type 'F' is not assignable to type 'E'. +enumAssignability.ts(10,1): error TS2322: Type 'E' is not assignable to type 'F'. +enumAssignability.ts(11,1): error TS2322: Type '1' is not assignable to type 'E'. +enumAssignability.ts(12,1): error TS2322: Type '1' is not assignable to type 'F'. +enumAssignability.ts(29,9): error TS2322: Type 'E' is not assignable to type 'string'. +enumAssignability.ts(30,9): error TS2322: Type 'E' is not assignable to type 'boolean'. +enumAssignability.ts(31,9): error TS2322: Type 'E' is not assignable to type 'Date'. +enumAssignability.ts(33,9): error TS2322: Type 'E' is not assignable to type 'void'. +enumAssignability.ts(36,9): error TS2322: Type 'E' is not assignable to type '() => {}'. +enumAssignability.ts(37,9): error TS2322: Type 'E' is not assignable to type 'Function'. +enumAssignability.ts(38,9): error TS2322: Type 'E' is not assignable to type '(x: number) => string'. +enumAssignability.ts(39,5): error TS2322: Type 'E' is not assignable to type 'C'. +enumAssignability.ts(40,5): error TS2322: Type 'E' is not assignable to type 'I'. +enumAssignability.ts(41,9): error TS2322: Type 'E' is not assignable to type 'number[]'. +enumAssignability.ts(42,9): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. +enumAssignability.ts(43,9): error TS2322: Type 'E' is not assignable to type '(x: T) => T'. +enumAssignability.ts(45,9): error TS2322: Type 'E' is not assignable to type 'String'. +enumAssignability.ts(48,9): error TS2322: Type 'E' is not assignable to type 'T'. + 'T' could be instantiated with an arbitrary type which could be unrelated to 'E'. +enumAssignability.ts(49,9): error TS2322: Type 'E' is not assignable to type 'U'. + 'U' could be instantiated with an arbitrary type which could be unrelated to 'E'. +enumAssignability.ts(50,9): error TS2322: Type 'E' is not assignable to type 'V'. + 'V' could be instantiated with an arbitrary type which could be unrelated to 'E'. +enumAssignability.ts(51,13): error TS2322: Type 'E' is not assignable to type 'A'. + 'E' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype of constraint 'Number'. +enumAssignability.ts(52,13): error TS2322: Type 'E' is not assignable to type 'B'. + 'E' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint 'E'. ==== enumAssignability.ts (22 errors) ==== @@ -38,16 +38,16 @@ enumAssignability.ts(52,13): error TS2322: Type 'E.A' is not assignable to type e = f; ~ -!!! error TS2322: Type 'F.B' is not assignable to type 'E.A'. +!!! error TS2322: Type 'F' is not assignable to type 'E'. f = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'F.B'. +!!! error TS2322: Type 'E' is not assignable to type 'F'. e = 1; // ok ~ -!!! error TS2322: Type '1' is not assignable to type 'E.A'. +!!! error TS2322: Type '1' is not assignable to type 'E'. f = 1; // ok ~ -!!! error TS2322: Type '1' is not assignable to type 'F.B'. +!!! error TS2322: Type '1' is not assignable to type 'F'. var x: number = e; // ok x = f; // ok @@ -66,68 +66,68 @@ enumAssignability.ts(52,13): error TS2322: Type 'E.A' is not assignable to type var b: number = e; // ok var c: string = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'string'. +!!! error TS2322: Type 'E' is not assignable to type 'string'. var d: boolean = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'boolean'. +!!! error TS2322: Type 'E' is not assignable to type 'boolean'. var ee: Date = e; ~~ -!!! error TS2322: Type 'E.A' is not assignable to type 'Date'. +!!! error TS2322: Type 'E' is not assignable to type 'Date'. var f: any = e; // ok var g: void = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'void'. +!!! error TS2322: Type 'E' is not assignable to type 'void'. var h: Object = e; var i: {} = e; var j: () => {} = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type '() => {}'. +!!! error TS2322: Type 'E' is not assignable to type '() => {}'. var k: Function = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'Function'. +!!! error TS2322: Type 'E' is not assignable to type 'Function'. var l: (x: number) => string = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type '(x: number) => string'. +!!! error TS2322: Type 'E' is not assignable to type '(x: number) => string'. ac = e; ~~ -!!! error TS2322: Type 'E.A' is not assignable to type 'C'. +!!! error TS2322: Type 'E' is not assignable to type 'C'. ai = e; ~~ -!!! error TS2322: Type 'E.A' is not assignable to type 'I'. +!!! error TS2322: Type 'E' is not assignable to type 'I'. var m: number[] = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'number[]'. +!!! error TS2322: Type 'E' is not assignable to type 'number[]'. var n: { foo: string } = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type '{ foo: string; }'. +!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. var o: (x: T) => T = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type '(x: T) => T'. +!!! error TS2322: Type 'E' is not assignable to type '(x: T) => T'. var p: Number = e; var q: String = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'String'. +!!! error TS2322: Type 'E' is not assignable to type 'String'. function foo(x: T, y: U, z: V) { x = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'T'. -!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. +!!! error TS2322: Type 'E' is not assignable to type 'T'. +!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'E'. y = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'U'. -!!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. +!!! error TS2322: Type 'E' is not assignable to type 'U'. +!!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'E'. z = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'V'. -!!! error TS2322: 'V' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. +!!! error TS2322: Type 'E' is not assignable to type 'V'. +!!! error TS2322: 'V' could be instantiated with an arbitrary type which could be unrelated to 'E'. var a: A = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'A'. -!!! error TS2322: 'E.A' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype of constraint 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'A'. +!!! error TS2322: 'E' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype of constraint 'Number'. var b: B = e; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'B'. -!!! error TS2322: 'E.A' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint 'E.A'. +!!! error TS2322: Type 'E' is not assignable to type 'B'. +!!! error TS2322: 'E' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint 'E'. } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/enumAssignability.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/enumAssignability.errors.txt.diff deleted file mode 100644 index bb1677f4b8..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumAssignability.errors.txt.diff +++ /dev/null @@ -1,173 +0,0 @@ ---- old.enumAssignability.errors.txt -+++ new.enumAssignability.errors.txt -@@= skipped -0, +0 lines =@@ --enumAssignability.ts(9,1): error TS2322: Type 'F' is not assignable to type 'E'. --enumAssignability.ts(10,1): error TS2322: Type 'E' is not assignable to type 'F'. --enumAssignability.ts(11,1): error TS2322: Type '1' is not assignable to type 'E'. --enumAssignability.ts(12,1): error TS2322: Type '1' is not assignable to type 'F'. --enumAssignability.ts(29,9): error TS2322: Type 'E' is not assignable to type 'string'. --enumAssignability.ts(30,9): error TS2322: Type 'E' is not assignable to type 'boolean'. --enumAssignability.ts(31,9): error TS2322: Type 'E' is not assignable to type 'Date'. --enumAssignability.ts(33,9): error TS2322: Type 'E' is not assignable to type 'void'. --enumAssignability.ts(36,9): error TS2322: Type 'E' is not assignable to type '() => {}'. --enumAssignability.ts(37,9): error TS2322: Type 'E' is not assignable to type 'Function'. --enumAssignability.ts(38,9): error TS2322: Type 'E' is not assignable to type '(x: number) => string'. --enumAssignability.ts(39,5): error TS2322: Type 'E' is not assignable to type 'C'. --enumAssignability.ts(40,5): error TS2322: Type 'E' is not assignable to type 'I'. --enumAssignability.ts(41,9): error TS2322: Type 'E' is not assignable to type 'number[]'. --enumAssignability.ts(42,9): error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. --enumAssignability.ts(43,9): error TS2322: Type 'E' is not assignable to type '(x: T) => T'. --enumAssignability.ts(45,9): error TS2322: Type 'E' is not assignable to type 'String'. --enumAssignability.ts(48,9): error TS2322: Type 'E' is not assignable to type 'T'. -- 'T' could be instantiated with an arbitrary type which could be unrelated to 'E'. --enumAssignability.ts(49,9): error TS2322: Type 'E' is not assignable to type 'U'. -- 'U' could be instantiated with an arbitrary type which could be unrelated to 'E'. --enumAssignability.ts(50,9): error TS2322: Type 'E' is not assignable to type 'V'. -- 'V' could be instantiated with an arbitrary type which could be unrelated to 'E'. --enumAssignability.ts(51,13): error TS2322: Type 'E' is not assignable to type 'A'. -- 'E' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype of constraint 'Number'. --enumAssignability.ts(52,13): error TS2322: Type 'E' is not assignable to type 'B'. -- 'E' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint 'E'. -+enumAssignability.ts(9,1): error TS2322: Type 'F.B' is not assignable to type 'E.A'. -+enumAssignability.ts(10,1): error TS2322: Type 'E.A' is not assignable to type 'F.B'. -+enumAssignability.ts(11,1): error TS2322: Type '1' is not assignable to type 'E.A'. -+enumAssignability.ts(12,1): error TS2322: Type '1' is not assignable to type 'F.B'. -+enumAssignability.ts(29,9): error TS2322: Type 'E.A' is not assignable to type 'string'. -+enumAssignability.ts(30,9): error TS2322: Type 'E.A' is not assignable to type 'boolean'. -+enumAssignability.ts(31,9): error TS2322: Type 'E.A' is not assignable to type 'Date'. -+enumAssignability.ts(33,9): error TS2322: Type 'E.A' is not assignable to type 'void'. -+enumAssignability.ts(36,9): error TS2322: Type 'E.A' is not assignable to type '() => {}'. -+enumAssignability.ts(37,9): error TS2322: Type 'E.A' is not assignable to type 'Function'. -+enumAssignability.ts(38,9): error TS2322: Type 'E.A' is not assignable to type '(x: number) => string'. -+enumAssignability.ts(39,5): error TS2322: Type 'E.A' is not assignable to type 'C'. -+enumAssignability.ts(40,5): error TS2322: Type 'E.A' is not assignable to type 'I'. -+enumAssignability.ts(41,9): error TS2322: Type 'E.A' is not assignable to type 'number[]'. -+enumAssignability.ts(42,9): error TS2322: Type 'E.A' is not assignable to type '{ foo: string; }'. -+enumAssignability.ts(43,9): error TS2322: Type 'E.A' is not assignable to type '(x: T) => T'. -+enumAssignability.ts(45,9): error TS2322: Type 'E.A' is not assignable to type 'String'. -+enumAssignability.ts(48,9): error TS2322: Type 'E.A' is not assignable to type 'T'. -+ 'T' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. -+enumAssignability.ts(49,9): error TS2322: Type 'E.A' is not assignable to type 'U'. -+ 'U' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. -+enumAssignability.ts(50,9): error TS2322: Type 'E.A' is not assignable to type 'V'. -+ 'V' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. -+enumAssignability.ts(51,13): error TS2322: Type 'E.A' is not assignable to type 'A'. -+ 'E.A' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype of constraint 'Number'. -+enumAssignability.ts(52,13): error TS2322: Type 'E.A' is not assignable to type 'B'. -+ 'E.A' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint 'E.A'. - - - ==== enumAssignability.ts (22 errors) ==== -@@= skipped -37, +37 lines =@@ - - e = f; - ~ --!!! error TS2322: Type 'F' is not assignable to type 'E'. -+!!! error TS2322: Type 'F.B' is not assignable to type 'E.A'. - f = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'F'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'F.B'. - e = 1; // ok - ~ --!!! error TS2322: Type '1' is not assignable to type 'E'. -+!!! error TS2322: Type '1' is not assignable to type 'E.A'. - f = 1; // ok - ~ --!!! error TS2322: Type '1' is not assignable to type 'F'. -+!!! error TS2322: Type '1' is not assignable to type 'F.B'. - var x: number = e; // ok - x = f; // ok - -@@= skipped -28, +28 lines =@@ - var b: number = e; // ok - var c: string = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'string'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'string'. - var d: boolean = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'boolean'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'boolean'. - var ee: Date = e; - ~~ --!!! error TS2322: Type 'E' is not assignable to type 'Date'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'Date'. - var f: any = e; // ok - var g: void = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'void'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'void'. - var h: Object = e; - var i: {} = e; - var j: () => {} = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type '() => {}'. -+!!! error TS2322: Type 'E.A' is not assignable to type '() => {}'. - var k: Function = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'Function'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'Function'. - var l: (x: number) => string = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type '(x: number) => string'. -+!!! error TS2322: Type 'E.A' is not assignable to type '(x: number) => string'. - ac = e; - ~~ --!!! error TS2322: Type 'E' is not assignable to type 'C'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'C'. - ai = e; - ~~ --!!! error TS2322: Type 'E' is not assignable to type 'I'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'I'. - var m: number[] = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'number[]'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'number[]'. - var n: { foo: string } = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }'. -+!!! error TS2322: Type 'E.A' is not assignable to type '{ foo: string; }'. - var o: (x: T) => T = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type '(x: T) => T'. -+!!! error TS2322: Type 'E.A' is not assignable to type '(x: T) => T'. - var p: Number = e; - var q: String = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'String'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'String'. - - function foo(x: T, y: U, z: V) { - x = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'T'. --!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'E'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'T'. -+!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. - y = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'U'. --!!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'E'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'U'. -+!!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. - z = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'V'. --!!! error TS2322: 'V' could be instantiated with an arbitrary type which could be unrelated to 'E'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'V'. -+!!! error TS2322: 'V' could be instantiated with an arbitrary type which could be unrelated to 'E.A'. - var a: A = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'A'. --!!! error TS2322: 'E' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype of constraint 'Number'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'A'. -+!!! error TS2322: 'E.A' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype of constraint 'Number'. - var b: B = e; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'B'. --!!! error TS2322: 'E' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint 'E'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'B'. -+!!! error TS2322: 'E.A' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint 'E.A'. - } - } diff --git a/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.errors.txt b/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.errors.txt index b8f3753581..3bfdd2aae9 100644 --- a/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.errors.txt @@ -1,5 +1,5 @@ -enumAssignabilityInInheritance.ts(104,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E.A', but here has type 'Object'. -enumAssignabilityInInheritance.ts(109,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E.A', but here has type 'Object'. +enumAssignabilityInInheritance.ts(104,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. +enumAssignabilityInInheritance.ts(109,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. ==== enumAssignabilityInInheritance.ts (2 errors) ==== @@ -108,7 +108,7 @@ enumAssignabilityInInheritance.ts(109,5): error TS2403: Subsequent variable decl var r4 = foo16(E.A); ~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E.A', but here has type 'Object'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. !!! related TS6203 enumAssignabilityInInheritance.ts:22:5: 'r4' was also declared here. declare function foo17(x: {}): {}; @@ -116,5 +116,5 @@ enumAssignabilityInInheritance.ts(109,5): error TS2403: Subsequent variable decl var r4 = foo16(E.A); ~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E.A', but here has type 'Object'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. !!! related TS6203 enumAssignabilityInInheritance.ts:22:5: 'r4' was also declared here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.errors.txt.diff deleted file mode 100644 index 4d9f92dcf5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.errors.txt.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- old.enumAssignabilityInInheritance.errors.txt -+++ new.enumAssignabilityInInheritance.errors.txt -@@= skipped -0, +0 lines =@@ --enumAssignabilityInInheritance.ts(104,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. --enumAssignabilityInInheritance.ts(109,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. -+enumAssignabilityInInheritance.ts(104,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E.A', but here has type 'Object'. -+enumAssignabilityInInheritance.ts(109,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E.A', but here has type 'Object'. - - - ==== enumAssignabilityInInheritance.ts (2 errors) ==== -@@= skipped -107, +107 lines =@@ - - var r4 = foo16(E.A); - ~~ --!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E.A', but here has type 'Object'. - !!! related TS6203 enumAssignabilityInInheritance.ts:22:5: 'r4' was also declared here. - - declare function foo17(x: {}): {}; -@@= skipped -8, +8 lines =@@ - - var r4 = foo16(E.A); - ~~ --!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. -+!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E.A', but here has type 'Object'. - !!! related TS6203 enumAssignabilityInInheritance.ts:22:5: 'r4' was also declared here. diff --git a/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.errors.txt b/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.errors.txt index c07e7cfe39..de8ee8ae44 100644 --- a/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.errors.txt @@ -1,19 +1,19 @@ -enumIsNotASubtypeOfAnythingButNumber.ts(18,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'string'. -enumIsNotASubtypeOfAnythingButNumber.ts(24,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'boolean'. -enumIsNotASubtypeOfAnythingButNumber.ts(30,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'Date'. -enumIsNotASubtypeOfAnythingButNumber.ts(36,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'RegExp'. -enumIsNotASubtypeOfAnythingButNumber.ts(42,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '{ bar: number; }'. -enumIsNotASubtypeOfAnythingButNumber.ts(48,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'number[]'. -enumIsNotASubtypeOfAnythingButNumber.ts(54,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'I8'. -enumIsNotASubtypeOfAnythingButNumber.ts(60,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'A'. -enumIsNotASubtypeOfAnythingButNumber.ts(66,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'A2'. -enumIsNotASubtypeOfAnythingButNumber.ts(72,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '(x: any) => number'. -enumIsNotASubtypeOfAnythingButNumber.ts(78,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '(x: T) => T'. -enumIsNotASubtypeOfAnythingButNumber.ts(85,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'E2.A'. -enumIsNotASubtypeOfAnythingButNumber.ts(95,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'typeof f'. -enumIsNotASubtypeOfAnythingButNumber.ts(105,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'typeof c'. -enumIsNotASubtypeOfAnythingButNumber.ts(111,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'T'. -enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'U'. +enumIsNotASubtypeOfAnythingButNumber.ts(18,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'string'. +enumIsNotASubtypeOfAnythingButNumber.ts(24,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'boolean'. +enumIsNotASubtypeOfAnythingButNumber.ts(30,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'Date'. +enumIsNotASubtypeOfAnythingButNumber.ts(36,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'RegExp'. +enumIsNotASubtypeOfAnythingButNumber.ts(42,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '{ bar: number; }'. +enumIsNotASubtypeOfAnythingButNumber.ts(48,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'number[]'. +enumIsNotASubtypeOfAnythingButNumber.ts(54,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'I8'. +enumIsNotASubtypeOfAnythingButNumber.ts(60,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'A'. +enumIsNotASubtypeOfAnythingButNumber.ts(66,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'A2'. +enumIsNotASubtypeOfAnythingButNumber.ts(72,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '(x: any) => number'. +enumIsNotASubtypeOfAnythingButNumber.ts(78,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '(x: T) => T'. +enumIsNotASubtypeOfAnythingButNumber.ts(85,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'E2'. +enumIsNotASubtypeOfAnythingButNumber.ts(95,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'typeof f'. +enumIsNotASubtypeOfAnythingButNumber.ts(105,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'typeof c'. +enumIsNotASubtypeOfAnythingButNumber.ts(111,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'T'. +enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'U'. ==== enumIsNotASubtypeOfAnythingButNumber.ts (16 errors) ==== @@ -36,7 +36,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: string; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'string'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'string'. } @@ -44,7 +44,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: boolean; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'boolean'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'boolean'. } @@ -52,7 +52,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: Date; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'Date'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'Date'. } @@ -60,7 +60,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: RegExp; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'RegExp'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'RegExp'. } @@ -68,7 +68,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: { bar: number }; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '{ bar: number; }'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '{ bar: number; }'. } @@ -76,7 +76,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: number[]; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'number[]'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'number[]'. } @@ -84,7 +84,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: I8; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'I8'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'I8'. } class A { foo: number; } @@ -92,7 +92,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: A; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'A'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'A'. } class A2 { foo: T; } @@ -100,7 +100,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: A2; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'A2'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'A2'. } @@ -108,7 +108,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: (x) => number; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '(x: any) => number'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '(x: any) => number'. } @@ -116,7 +116,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: (x: T) => T; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '(x: T) => T'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '(x: T) => T'. } @@ -125,7 +125,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: E2; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'E2.A'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'E2'. } @@ -137,7 +137,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: typeof f; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'typeof f'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'typeof f'. } @@ -149,7 +149,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: typeof c; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'typeof c'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'typeof c'. } @@ -157,7 +157,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: T; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'T'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'T'. } @@ -165,7 +165,7 @@ enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of [x: string]: U; foo: E; ~~~ -!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'U'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'U'. } diff --git a/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.errors.txt.diff deleted file mode 100644 index 484be4c594..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.errors.txt.diff +++ /dev/null @@ -1,182 +0,0 @@ ---- old.enumIsNotASubtypeOfAnythingButNumber.errors.txt -+++ new.enumIsNotASubtypeOfAnythingButNumber.errors.txt -@@= skipped -0, +0 lines =@@ --enumIsNotASubtypeOfAnythingButNumber.ts(18,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'string'. --enumIsNotASubtypeOfAnythingButNumber.ts(24,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'boolean'. --enumIsNotASubtypeOfAnythingButNumber.ts(30,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'Date'. --enumIsNotASubtypeOfAnythingButNumber.ts(36,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'RegExp'. --enumIsNotASubtypeOfAnythingButNumber.ts(42,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '{ bar: number; }'. --enumIsNotASubtypeOfAnythingButNumber.ts(48,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'number[]'. --enumIsNotASubtypeOfAnythingButNumber.ts(54,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'I8'. --enumIsNotASubtypeOfAnythingButNumber.ts(60,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'A'. --enumIsNotASubtypeOfAnythingButNumber.ts(66,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'A2'. --enumIsNotASubtypeOfAnythingButNumber.ts(72,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '(x: any) => number'. --enumIsNotASubtypeOfAnythingButNumber.ts(78,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '(x: T) => T'. --enumIsNotASubtypeOfAnythingButNumber.ts(85,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'E2'. --enumIsNotASubtypeOfAnythingButNumber.ts(95,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'typeof f'. --enumIsNotASubtypeOfAnythingButNumber.ts(105,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'typeof c'. --enumIsNotASubtypeOfAnythingButNumber.ts(111,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'T'. --enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'U'. -+enumIsNotASubtypeOfAnythingButNumber.ts(18,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'string'. -+enumIsNotASubtypeOfAnythingButNumber.ts(24,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'boolean'. -+enumIsNotASubtypeOfAnythingButNumber.ts(30,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'Date'. -+enumIsNotASubtypeOfAnythingButNumber.ts(36,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'RegExp'. -+enumIsNotASubtypeOfAnythingButNumber.ts(42,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '{ bar: number; }'. -+enumIsNotASubtypeOfAnythingButNumber.ts(48,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'number[]'. -+enumIsNotASubtypeOfAnythingButNumber.ts(54,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'I8'. -+enumIsNotASubtypeOfAnythingButNumber.ts(60,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'A'. -+enumIsNotASubtypeOfAnythingButNumber.ts(66,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'A2'. -+enumIsNotASubtypeOfAnythingButNumber.ts(72,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '(x: any) => number'. -+enumIsNotASubtypeOfAnythingButNumber.ts(78,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '(x: T) => T'. -+enumIsNotASubtypeOfAnythingButNumber.ts(85,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'E2.A'. -+enumIsNotASubtypeOfAnythingButNumber.ts(95,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'typeof f'. -+enumIsNotASubtypeOfAnythingButNumber.ts(105,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'typeof c'. -+enumIsNotASubtypeOfAnythingButNumber.ts(111,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'T'. -+enumIsNotASubtypeOfAnythingButNumber.ts(117,5): error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'U'. - - - ==== enumIsNotASubtypeOfAnythingButNumber.ts (16 errors) ==== -@@= skipped -35, +35 lines =@@ - [x: string]: string; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'string'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'string'. - } - - -@@= skipped -8, +8 lines =@@ - [x: string]: boolean; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'boolean'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'boolean'. - } - - -@@= skipped -8, +8 lines =@@ - [x: string]: Date; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'Date'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'Date'. - } - - -@@= skipped -8, +8 lines =@@ - [x: string]: RegExp; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'RegExp'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'RegExp'. - } - - -@@= skipped -8, +8 lines =@@ - [x: string]: { bar: number }; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '{ bar: number; }'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '{ bar: number; }'. - } - - -@@= skipped -8, +8 lines =@@ - [x: string]: number[]; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'number[]'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'number[]'. - } - - -@@= skipped -8, +8 lines =@@ - [x: string]: I8; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'I8'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'I8'. - } - - class A { foo: number; } -@@= skipped -8, +8 lines =@@ - [x: string]: A; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'A'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'A'. - } - - class A2 { foo: T; } -@@= skipped -8, +8 lines =@@ - [x: string]: A2; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'A2'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'A2'. - } - - -@@= skipped -8, +8 lines =@@ - [x: string]: (x) => number; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '(x: any) => number'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '(x: any) => number'. - } - - -@@= skipped -8, +8 lines =@@ - [x: string]: (x: T) => T; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type '(x: T) => T'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type '(x: T) => T'. - } - - -@@= skipped -9, +9 lines =@@ - [x: string]: E2; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'E2'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'E2.A'. - } - - -@@= skipped -12, +12 lines =@@ - [x: string]: typeof f; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'typeof f'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'typeof f'. - } - - -@@= skipped -12, +12 lines =@@ - [x: string]: typeof c; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'typeof c'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'typeof c'. - } - - -@@= skipped -8, +8 lines =@@ - [x: string]: T; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'T'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'T'. - } - - -@@= skipped -8, +8 lines =@@ - [x: string]: U; - foo: E; - ~~~ --!!! error TS2411: Property 'foo' of type 'E' is not assignable to 'string' index type 'U'. -+!!! error TS2411: Property 'foo' of type 'E.A' is not assignable to 'string' index type 'U'. - } - - diff --git a/testdata/baselines/reference/submodule/conformance/everyTypeWithAnnotationAndInvalidInitializer.errors.txt b/testdata/baselines/reference/submodule/conformance/everyTypeWithAnnotationAndInvalidInitializer.errors.txt index 6fcefcbf84..c5e9a1bf5f 100644 --- a/testdata/baselines/reference/submodule/conformance/everyTypeWithAnnotationAndInvalidInitializer.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/everyTypeWithAnnotationAndInvalidInitializer.errors.txt @@ -18,8 +18,8 @@ everyTypeWithAnnotationAndInvalidInitializer.ts(47,5): error TS2322: Type '(x: n everyTypeWithAnnotationAndInvalidInitializer.ts(48,32): error TS2322: Type 'string' is not assignable to type 'number'. everyTypeWithAnnotationAndInvalidInitializer.ts(50,5): error TS2322: Type 'typeof N' is not assignable to type 'typeof M'. The types returned by 'new A()' are incompatible between these types. - Property 'name' is missing in type 'A' but required in type 'A'. -everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2741: Property 'name' is missing in type 'A' but required in type 'A'. + Property 'name' is missing in type 'N.A' but required in type 'M.A'. +everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2741: Property 'name' is missing in type 'N.A' but required in type 'M.A'. everyTypeWithAnnotationAndInvalidInitializer.ts(52,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'. Type 'boolean' is not assignable to type 'string'. @@ -112,11 +112,11 @@ everyTypeWithAnnotationAndInvalidInitializer.ts(52,5): error TS2322: Type '(x: n ~~~~~~~ !!! error TS2322: Type 'typeof N' is not assignable to type 'typeof M'. !!! error TS2322: The types returned by 'new A()' are incompatible between these types. -!!! error TS2322: Property 'name' is missing in type 'A' but required in type 'A'. +!!! error TS2322: Property 'name' is missing in type 'N.A' but required in type 'M.A'. !!! related TS2728 everyTypeWithAnnotationAndInvalidInitializer.ts:20:9: 'name' is declared here. var aClassInModule: M.A = new N.A(); ~~~~~~~~~~~~~~ -!!! error TS2741: Property 'name' is missing in type 'A' but required in type 'A'. +!!! error TS2741: Property 'name' is missing in type 'N.A' but required in type 'M.A'. !!! related TS2728 everyTypeWithAnnotationAndInvalidInitializer.ts:20:9: 'name' is declared here. var aFunctionInModule: typeof M.F2 = F2; ~~~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/everyTypeWithAnnotationAndInvalidInitializer.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/everyTypeWithAnnotationAndInvalidInitializer.errors.txt.diff deleted file mode 100644 index 258737f0f5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/everyTypeWithAnnotationAndInvalidInitializer.errors.txt.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.everyTypeWithAnnotationAndInvalidInitializer.errors.txt -+++ new.everyTypeWithAnnotationAndInvalidInitializer.errors.txt -@@= skipped -17, +17 lines =@@ - everyTypeWithAnnotationAndInvalidInitializer.ts(48,32): error TS2322: Type 'string' is not assignable to type 'number'. - everyTypeWithAnnotationAndInvalidInitializer.ts(50,5): error TS2322: Type 'typeof N' is not assignable to type 'typeof M'. - The types returned by 'new A()' are incompatible between these types. -- Property 'name' is missing in type 'N.A' but required in type 'M.A'. --everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2741: Property 'name' is missing in type 'N.A' but required in type 'M.A'. -+ Property 'name' is missing in type 'A' but required in type 'A'. -+everyTypeWithAnnotationAndInvalidInitializer.ts(51,5): error TS2741: Property 'name' is missing in type 'A' but required in type 'A'. - everyTypeWithAnnotationAndInvalidInitializer.ts(52,5): error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string'. - Type 'boolean' is not assignable to type 'string'. - -@@= skipped -94, +94 lines =@@ - ~~~~~~~ - !!! error TS2322: Type 'typeof N' is not assignable to type 'typeof M'. - !!! error TS2322: The types returned by 'new A()' are incompatible between these types. --!!! error TS2322: Property 'name' is missing in type 'N.A' but required in type 'M.A'. -+!!! error TS2322: Property 'name' is missing in type 'A' but required in type 'A'. - !!! related TS2728 everyTypeWithAnnotationAndInvalidInitializer.ts:20:9: 'name' is declared here. - var aClassInModule: M.A = new N.A(); - ~~~~~~~~~~~~~~ --!!! error TS2741: Property 'name' is missing in type 'N.A' but required in type 'M.A'. -+!!! error TS2741: Property 'name' is missing in type 'A' but required in type 'A'. - !!! related TS2728 everyTypeWithAnnotationAndInvalidInitializer.ts:20:9: 'name' is declared here. - var aFunctionInModule: typeof M.F2 = F2; - ~~~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.errors.txt b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.errors.txt index 3c43e262ba..6a958e04b9 100644 --- a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.errors.txt @@ -9,7 +9,7 @@ genericCallWithGenericSignatureArguments2.ts(25,23): error TS2345: Argument of t Types of parameters 'a' and 'x' are incompatible. Type 'Date' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'Date'. -genericCallWithGenericSignatureArguments2.ts(37,43): error TS2322: Type 'F.A' is not assignable to type 'E.A'. +genericCallWithGenericSignatureArguments2.ts(37,43): error TS2322: Type 'F' is not assignable to type 'E'. genericCallWithGenericSignatureArguments2.ts(50,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'. 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. genericCallWithGenericSignatureArguments2.ts(51,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. @@ -76,7 +76,7 @@ genericCallWithGenericSignatureArguments2.ts(67,57): error TS2304: Cannot find n var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error ~~~ -!!! error TS2322: Type 'F.A' is not assignable to type 'E.A'. +!!! error TS2322: Type 'F' is not assignable to type 'E'. !!! related TS6502 genericCallWithGenericSignatureArguments2.ts:32:47: The expected type comes from the return type of this signature. } diff --git a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.errors.txt.diff deleted file mode 100644 index 1f7e1ebfaa..0000000000 --- a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.genericCallWithGenericSignatureArguments2.errors.txt -+++ new.genericCallWithGenericSignatureArguments2.errors.txt -@@= skipped -8, +8 lines =@@ - Types of parameters 'a' and 'x' are incompatible. - Type 'Date' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'Date'. --genericCallWithGenericSignatureArguments2.ts(37,43): error TS2322: Type 'F' is not assignable to type 'E'. -+genericCallWithGenericSignatureArguments2.ts(37,43): error TS2322: Type 'F.A' is not assignable to type 'E.A'. - genericCallWithGenericSignatureArguments2.ts(50,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'. - 'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'. - genericCallWithGenericSignatureArguments2.ts(51,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. -@@= skipped -67, +67 lines =@@ - - var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error - ~~~ --!!! error TS2322: Type 'F' is not assignable to type 'E'. -+!!! error TS2322: Type 'F.A' is not assignable to type 'E.A'. - !!! related TS6502 genericCallWithGenericSignatureArguments2.ts:32:47: The expected type comes from the return type of this signature. - } - diff --git a/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.errors.txt b/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.errors.txt index 5ef2636a65..15f46942c2 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.errors.txt @@ -1,7 +1,7 @@ invalidBooleanAssignments.ts(3,5): error TS2322: Type 'boolean' is not assignable to type 'number'. invalidBooleanAssignments.ts(4,5): error TS2322: Type 'boolean' is not assignable to type 'string'. invalidBooleanAssignments.ts(5,5): error TS2322: Type 'boolean' is not assignable to type 'void'. -invalidBooleanAssignments.ts(9,5): error TS2322: Type 'true' is not assignable to type 'E.A'. +invalidBooleanAssignments.ts(9,5): error TS2322: Type 'true' is not assignable to type 'E'. invalidBooleanAssignments.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'C'. invalidBooleanAssignments.ts(15,5): error TS2322: Type 'boolean' is not assignable to type 'I'. invalidBooleanAssignments.ts(17,5): error TS2322: Type 'boolean' is not assignable to type '() => string'. @@ -28,7 +28,7 @@ invalidBooleanAssignments.ts(26,1): error TS2630: Cannot assign to 'i' because i enum E { A } var e: E = x; ~ -!!! error TS2322: Type 'true' is not assignable to type 'E.A'. +!!! error TS2322: Type 'true' is not assignable to type 'E'. class C { foo: string } var f: C = x; diff --git a/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.errors.txt.diff deleted file mode 100644 index fc492fca02..0000000000 --- a/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.invalidBooleanAssignments.errors.txt -+++ new.invalidBooleanAssignments.errors.txt -@@= skipped -0, +0 lines =@@ - invalidBooleanAssignments.ts(3,5): error TS2322: Type 'boolean' is not assignable to type 'number'. - invalidBooleanAssignments.ts(4,5): error TS2322: Type 'boolean' is not assignable to type 'string'. - invalidBooleanAssignments.ts(5,5): error TS2322: Type 'boolean' is not assignable to type 'void'. --invalidBooleanAssignments.ts(9,5): error TS2322: Type 'true' is not assignable to type 'E'. -+invalidBooleanAssignments.ts(9,5): error TS2322: Type 'true' is not assignable to type 'E.A'. - invalidBooleanAssignments.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'C'. - invalidBooleanAssignments.ts(15,5): error TS2322: Type 'boolean' is not assignable to type 'I'. - invalidBooleanAssignments.ts(17,5): error TS2322: Type 'boolean' is not assignable to type '() => string'. -@@= skipped -27, +27 lines =@@ - enum E { A } - var e: E = x; - ~ --!!! error TS2322: Type 'true' is not assignable to type 'E'. -+!!! error TS2322: Type 'true' is not assignable to type 'E.A'. - - class C { foo: string } - var f: C = x; diff --git a/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.errors.txt b/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.errors.txt index 2b54aa0aa8..a7800011cd 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.errors.txt @@ -9,7 +9,7 @@ invalidStringAssignments.ts(18,1): error TS2631: Cannot assign to 'M' because it invalidStringAssignments.ts(21,5): error TS2322: Type 'string' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. invalidStringAssignments.ts(23,1): error TS2630: Cannot assign to 'i' because it is a function. -invalidStringAssignments.ts(26,5): error TS2322: Type 'string' is not assignable to type 'E.A'. +invalidStringAssignments.ts(26,5): error TS2322: Type 'string' is not assignable to type 'E'. ==== invalidStringAssignments.ts (11 errors) ==== @@ -61,4 +61,4 @@ invalidStringAssignments.ts(26,5): error TS2322: Type 'string' is not assignable enum E { A } var j: E = x; ~ -!!! error TS2322: Type 'string' is not assignable to type 'E.A'. \ No newline at end of file +!!! error TS2322: Type 'string' is not assignable to type 'E'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.errors.txt.diff deleted file mode 100644 index 3a4817e6ac..0000000000 --- a/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.invalidStringAssignments.errors.txt -+++ new.invalidStringAssignments.errors.txt -@@= skipped -8, +8 lines =@@ - invalidStringAssignments.ts(21,5): error TS2322: Type 'string' is not assignable to type 'T'. - 'T' could be instantiated with an arbitrary type which could be unrelated to 'string'. - invalidStringAssignments.ts(23,1): error TS2630: Cannot assign to 'i' because it is a function. --invalidStringAssignments.ts(26,5): error TS2322: Type 'string' is not assignable to type 'E'. -+invalidStringAssignments.ts(26,5): error TS2322: Type 'string' is not assignable to type 'E.A'. - - - ==== invalidStringAssignments.ts (11 errors) ==== -@@= skipped -52, +52 lines =@@ - enum E { A } - var j: E = x; - ~ --!!! error TS2322: Type 'string' is not assignable to type 'E'. -+!!! error TS2322: Type 'string' is not assignable to type 'E.A'. diff --git a/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.errors.txt b/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.errors.txt index 09b3b07fa5..d22a051c2a 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.errors.txt @@ -10,7 +10,7 @@ invalidVoidAssignments.ts(21,5): error TS2322: Type 'void' is not assignable to 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. invalidVoidAssignments.ts(23,1): error TS2630: Cannot assign to 'i' because it is a function. invalidVoidAssignments.ts(26,1): error TS2322: Type 'typeof E' is not assignable to type 'void'. -invalidVoidAssignments.ts(27,1): error TS2322: Type 'E.A' is not assignable to type 'void'. +invalidVoidAssignments.ts(27,1): error TS2322: Type 'E' is not assignable to type 'void'. invalidVoidAssignments.ts(29,1): error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'. @@ -66,7 +66,7 @@ invalidVoidAssignments.ts(29,1): error TS2322: Type '{ f: () => void; }' is not !!! error TS2322: Type 'typeof E' is not assignable to type 'void'. x = E.A; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'void'. +!!! error TS2322: Type 'E' is not assignable to type 'void'. x = { f() { } } ~ diff --git a/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.errors.txt.diff index d00f4176b9..462cbdc3e8 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.errors.txt.diff @@ -1,22 +1,15 @@ --- old.invalidVoidAssignments.errors.txt +++ new.invalidVoidAssignments.errors.txt -@@= skipped -9, +9 lines =@@ - 'T' could be instantiated with an arbitrary type which could be unrelated to 'void'. +@@= skipped -10, +10 lines =@@ invalidVoidAssignments.ts(23,1): error TS2630: Cannot assign to 'i' because it is a function. invalidVoidAssignments.ts(26,1): error TS2322: Type 'typeof E' is not assignable to type 'void'. --invalidVoidAssignments.ts(27,1): error TS2322: Type 'E' is not assignable to type 'void'. + invalidVoidAssignments.ts(27,1): error TS2322: Type 'E' is not assignable to type 'void'. -invalidVoidAssignments.ts(29,1): error TS2322: Type '{ f(): void; }' is not assignable to type 'void'. -+invalidVoidAssignments.ts(27,1): error TS2322: Type 'E.A' is not assignable to type 'void'. +invalidVoidAssignments.ts(29,1): error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'. ==== invalidVoidAssignments.ts (13 errors) ==== -@@= skipped -56, +56 lines =@@ - !!! error TS2322: Type 'typeof E' is not assignable to type 'void'. - x = E.A; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'void'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'void'. +@@= skipped -59, +59 lines =@@ x = { f() { } } ~ diff --git a/testdata/baselines/reference/submodule/conformance/invalidVoidValues.errors.txt b/testdata/baselines/reference/submodule/conformance/invalidVoidValues.errors.txt index b991a89010..d59620ed56 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidVoidValues.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/invalidVoidValues.errors.txt @@ -2,7 +2,7 @@ invalidVoidValues.ts(2,1): error TS2322: Type 'number' is not assignable to type invalidVoidValues.ts(3,1): error TS2322: Type 'string' is not assignable to type 'void'. invalidVoidValues.ts(4,1): error TS2322: Type 'boolean' is not assignable to type 'void'. invalidVoidValues.ts(7,1): error TS2322: Type 'typeof E' is not assignable to type 'void'. -invalidVoidValues.ts(8,1): error TS2322: Type 'E.A' is not assignable to type 'void'. +invalidVoidValues.ts(8,1): error TS2322: Type 'E' is not assignable to type 'void'. invalidVoidValues.ts(12,1): error TS2322: Type 'C' is not assignable to type 'void'. invalidVoidValues.ts(16,1): error TS2322: Type 'I' is not assignable to type 'void'. invalidVoidValues.ts(18,1): error TS2322: Type '{ f: () => void; }' is not assignable to type 'void'. @@ -29,7 +29,7 @@ invalidVoidValues.ts(26,5): error TS2322: Type '(a: T) => void' is not assign !!! error TS2322: Type 'typeof E' is not assignable to type 'void'. x = E.A; ~ -!!! error TS2322: Type 'E.A' is not assignable to type 'void'. +!!! error TS2322: Type 'E' is not assignable to type 'void'. class C { foo: string } var a: C; diff --git a/testdata/baselines/reference/submodule/conformance/invalidVoidValues.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/invalidVoidValues.errors.txt.diff index 40ed9cd409..7c39019802 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidVoidValues.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/invalidVoidValues.errors.txt.diff @@ -1,11 +1,7 @@ --- old.invalidVoidValues.errors.txt +++ new.invalidVoidValues.errors.txt -@@= skipped -1, +1 lines =@@ - invalidVoidValues.ts(3,1): error TS2322: Type 'string' is not assignable to type 'void'. - invalidVoidValues.ts(4,1): error TS2322: Type 'boolean' is not assignable to type 'void'. - invalidVoidValues.ts(7,1): error TS2322: Type 'typeof E' is not assignable to type 'void'. --invalidVoidValues.ts(8,1): error TS2322: Type 'E' is not assignable to type 'void'. -+invalidVoidValues.ts(8,1): error TS2322: Type 'E.A' is not assignable to type 'void'. +@@= skipped -4, +4 lines =@@ + invalidVoidValues.ts(8,1): error TS2322: Type 'E' is not assignable to type 'void'. invalidVoidValues.ts(12,1): error TS2322: Type 'C' is not assignable to type 'void'. invalidVoidValues.ts(16,1): error TS2322: Type 'I' is not assignable to type 'void'. -invalidVoidValues.ts(18,1): error TS2322: Type '{ f(): void; }' is not assignable to type 'void'. @@ -13,16 +9,7 @@ invalidVoidValues.ts(21,1): error TS2322: Type 'typeof M' is not assignable to type 'void'. invalidVoidValues.ts(24,5): error TS2322: Type 'T' is not assignable to type 'void'. invalidVoidValues.ts(26,5): error TS2322: Type '(a: T) => void' is not assignable to type 'void'. -@@= skipped -27, +27 lines =@@ - !!! error TS2322: Type 'typeof E' is not assignable to type 'void'. - x = E.A; - ~ --!!! error TS2322: Type 'E' is not assignable to type 'void'. -+!!! error TS2322: Type 'E.A' is not assignable to type 'void'. - - class C { foo: string } - var a: C; -@@= skipped -16, +16 lines =@@ +@@= skipped -40, +40 lines =@@ x = { f() {} } ~ diff --git a/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.errors.txt b/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.errors.txt index 3401f247c3..4befe8603a 100644 --- a/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.errors.txt @@ -1,4 +1,4 @@ -typeArgumentInferenceWithObjectLiteral.ts(35,43): error TS2345: Argument of type 'E2.X' is not assignable to parameter of type 'E1.X'. +typeArgumentInferenceWithObjectLiteral.ts(35,43): error TS2345: Argument of type 'E2' is not assignable to parameter of type 'E1'. ==== typeArgumentInferenceWithObjectLiteral.ts (1 errors) ==== @@ -38,5 +38,5 @@ typeArgumentInferenceWithObjectLiteral.ts(35,43): error TS2345: Argument of type var v3 = f1({ w: x => x, r: () => E1.X }, E2.X); // Error ~~~~ -!!! error TS2345: Argument of type 'E2.X' is not assignable to parameter of type 'E1.X'. +!!! error TS2345: Argument of type 'E2' is not assignable to parameter of type 'E1'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.errors.txt.diff deleted file mode 100644 index 1c28a87c41..0000000000 --- a/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.typeArgumentInferenceWithObjectLiteral.errors.txt -+++ new.typeArgumentInferenceWithObjectLiteral.errors.txt -@@= skipped -0, +0 lines =@@ --typeArgumentInferenceWithObjectLiteral.ts(35,43): error TS2345: Argument of type 'E2' is not assignable to parameter of type 'E1'. -+typeArgumentInferenceWithObjectLiteral.ts(35,43): error TS2345: Argument of type 'E2.X' is not assignable to parameter of type 'E1.X'. - - - ==== typeArgumentInferenceWithObjectLiteral.ts (1 errors) ==== -@@= skipped -37, +37 lines =@@ - - var v3 = f1({ w: x => x, r: () => E1.X }, E2.X); // Error - ~~~~ --!!! error TS2345: Argument of type 'E2' is not assignable to parameter of type 'E1'. -+!!! error TS2345: Argument of type 'E2.X' is not assignable to parameter of type 'E1.X'. - diff --git a/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.errors.txt b/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.errors.txt index 0ab8ed044f..1219bb562c 100644 --- a/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.errors.txt @@ -21,7 +21,7 @@ unionSubtypeIfEveryConstituentTypeIsSubtype.ts(84,5): error TS2411: Property 'fo unionSubtypeIfEveryConstituentTypeIsSubtype.ts(85,5): error TS2411: Property 'foo2' of type 'number' is not assignable to 'string' index type '(x: any) => number'. unionSubtypeIfEveryConstituentTypeIsSubtype.ts(91,5): error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type '(x: T) => T'. unionSubtypeIfEveryConstituentTypeIsSubtype.ts(92,5): error TS2411: Property 'foo2' of type 'number' is not assignable to 'string' index type '(x: T) => T'. -unionSubtypeIfEveryConstituentTypeIsSubtype.ts(99,5): error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'E2.A'. +unionSubtypeIfEveryConstituentTypeIsSubtype.ts(99,5): error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'E2'. unionSubtypeIfEveryConstituentTypeIsSubtype.ts(110,5): error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'typeof f'. unionSubtypeIfEveryConstituentTypeIsSubtype.ts(111,5): error TS2411: Property 'foo2' of type 'number' is not assignable to 'string' index type 'typeof f'. unionSubtypeIfEveryConstituentTypeIsSubtype.ts(121,5): error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'typeof c'. @@ -177,7 +177,7 @@ unionSubtypeIfEveryConstituentTypeIsSubtype.ts(129,5): error TS2411: Property 'f [x: string]: E2; foo: string | number; ~~~ -!!! error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'E2.A'. +!!! error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'E2'. foo2: e | number; } diff --git a/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.errors.txt.diff deleted file mode 100644 index 639450752b..0000000000 --- a/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.unionSubtypeIfEveryConstituentTypeIsSubtype.errors.txt -+++ new.unionSubtypeIfEveryConstituentTypeIsSubtype.errors.txt -@@= skipped -20, +20 lines =@@ - unionSubtypeIfEveryConstituentTypeIsSubtype.ts(85,5): error TS2411: Property 'foo2' of type 'number' is not assignable to 'string' index type '(x: any) => number'. - unionSubtypeIfEveryConstituentTypeIsSubtype.ts(91,5): error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type '(x: T) => T'. - unionSubtypeIfEveryConstituentTypeIsSubtype.ts(92,5): error TS2411: Property 'foo2' of type 'number' is not assignable to 'string' index type '(x: T) => T'. --unionSubtypeIfEveryConstituentTypeIsSubtype.ts(99,5): error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'E2'. -+unionSubtypeIfEveryConstituentTypeIsSubtype.ts(99,5): error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'E2.A'. - unionSubtypeIfEveryConstituentTypeIsSubtype.ts(110,5): error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'typeof f'. - unionSubtypeIfEveryConstituentTypeIsSubtype.ts(111,5): error TS2411: Property 'foo2' of type 'number' is not assignable to 'string' index type 'typeof f'. - unionSubtypeIfEveryConstituentTypeIsSubtype.ts(121,5): error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'typeof c'. -@@= skipped -156, +156 lines =@@ - [x: string]: E2; - foo: string | number; - ~~~ --!!! error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'E2'. -+!!! error TS2411: Property 'foo' of type 'string | number' is not assignable to 'string' index type 'E2.A'. - foo2: e | number; - } - From 3af9692f189ec2e506b26d1420bb5ec88c66ecbe Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 18:10:28 -0700 Subject: [PATCH 10/31] Fix constructor accessibility check --- internal/checker/checker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 2d409f2e73..daa16c96cd 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -8024,7 +8024,7 @@ func (c *Checker) isConstructorAccessible(node *ast.Node, signature *Signature) declaration := signature.declaration modifiers := getSelectedEffectiveModifierFlags(declaration, ast.ModifierFlagsNonPublicAccessibilityModifier) // (1) Public constructors and (2) constructor functions are always accessible. - if modifiers == 0 || ast.IsConstructorDeclaration(declaration) { + if modifiers == 0 || !ast.IsConstructorDeclaration(declaration) { return true } declaringClassDeclaration := getClassLikeDeclarationOfSymbol(declaration.Parent.Symbol()) From 7d629321e3f6a619b074986e7d3743a36ebef65e Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 18:10:40 -0700 Subject: [PATCH 11/31] Accept new baselines --- .../compiler/noCrashOnMixin.errors.txt | 29 ++++++++++ .../compiler/noCrashOnMixin.errors.txt.diff | 34 ------------ .../classConstructorAccessibility.errors.txt | 49 +++++++++++++++++ ...ssConstructorAccessibility.errors.txt.diff | 54 ------------------- .../classConstructorAccessibility2.errors.txt | 14 ++++- ...sConstructorAccessibility2.errors.txt.diff | 36 ------------- .../classConstructorAccessibility5.errors.txt | 17 ++++++ ...sConstructorAccessibility5.errors.txt.diff | 22 -------- .../typesWithPrivateConstructor.errors.txt | 22 +++----- ...ypesWithPrivateConstructor.errors.txt.diff | 39 -------------- .../typesWithPrivateConstructor.symbols | 4 -- .../typesWithPrivateConstructor.symbols.diff | 20 ------- .../typesWithProtectedConstructor.errors.txt | 22 +++----- ...esWithProtectedConstructor.errors.txt.diff | 39 -------------- .../typesWithProtectedConstructor.symbols | 4 -- ...typesWithProtectedConstructor.symbols.diff | 20 ------- 16 files changed, 122 insertions(+), 303 deletions(-) create mode 100644 testdata/baselines/reference/submodule/compiler/noCrashOnMixin.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/noCrashOnMixin.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.symbols.diff diff --git a/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.errors.txt b/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.errors.txt new file mode 100644 index 0000000000..cf9bb9cd07 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.errors.txt @@ -0,0 +1,29 @@ +noCrashOnMixin.ts(21,9): error TS2674: Constructor of class 'Abstract' is protected and only accessible within the class declaration. + + +==== noCrashOnMixin.ts (1 errors) ==== + class Abstract { + protected constructor() { + } + } + + class Concrete extends Abstract { + } + + type Constructor = new (...args: any[]) => T; + + function Mixin(Base: TBase) { + return class extends Base { + }; + } + + class Empty { + } + + class CrashTrigger extends Mixin(Empty) { + public trigger() { + new Concrete(); + ~~~~~~~~~~~~~~ +!!! error TS2674: Constructor of class 'Abstract' is protected and only accessible within the class declaration. + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.errors.txt.diff deleted file mode 100644 index 2baf034c2a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.errors.txt.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- old.noCrashOnMixin.errors.txt -+++ new.noCrashOnMixin.errors.txt -@@= skipped -0, +-1 lines =@@ --noCrashOnMixin.ts(21,9): error TS2674: Constructor of class 'Abstract' is protected and only accessible within the class declaration. -- -- --==== noCrashOnMixin.ts (1 errors) ==== -- class Abstract { -- protected constructor() { -- } -- } -- -- class Concrete extends Abstract { -- } -- -- type Constructor = new (...args: any[]) => T; -- -- function Mixin(Base: TBase) { -- return class extends Base { -- }; -- } -- -- class Empty { -- } -- -- class CrashTrigger extends Mixin(Empty) { -- public trigger() { -- new Concrete(); -- ~~~~~~~~~~~~~~ --!!! error TS2674: Constructor of class 'Abstract' is protected and only accessible within the class declaration. -- } -- } -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.errors.txt b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.errors.txt new file mode 100644 index 0000000000..8ff647bda3 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.errors.txt @@ -0,0 +1,49 @@ +classConstructorAccessibility.ts(14,9): error TS2673: Constructor of class 'D' is private and only accessible within the class declaration. +classConstructorAccessibility.ts(15,9): error TS2674: Constructor of class 'E' is protected and only accessible within the class declaration. +classConstructorAccessibility.ts(31,13): error TS2673: Constructor of class 'D' is private and only accessible within the class declaration. +classConstructorAccessibility.ts(32,13): error TS2674: Constructor of class 'E' is protected and only accessible within the class declaration. + + +==== classConstructorAccessibility.ts (4 errors) ==== + class C { + public constructor(public x: number) { } + } + + class D { + private constructor(public x: number) { } + } + + class E { + protected constructor(public x: number) { } + } + + var c = new C(1); + var d = new D(1); // error + ~~~~~~~~ +!!! error TS2673: Constructor of class 'D' is private and only accessible within the class declaration. + var e = new E(1); // error + ~~~~~~~~ +!!! error TS2674: Constructor of class 'E' is protected and only accessible within the class declaration. + + module Generic { + class C { + public constructor(public x: T) { } + } + + class D { + private constructor(public x: T) { } + } + + class E { + protected constructor(public x: T) { } + } + + var c = new C(1); + var d = new D(1); // error + ~~~~~~~~ +!!! error TS2673: Constructor of class 'D' is private and only accessible within the class declaration. + var e = new E(1); // error + ~~~~~~~~ +!!! error TS2674: Constructor of class 'E' is protected and only accessible within the class declaration. + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.errors.txt.diff deleted file mode 100644 index 61e7dbdb38..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.errors.txt.diff +++ /dev/null @@ -1,54 +0,0 @@ ---- old.classConstructorAccessibility.errors.txt -+++ new.classConstructorAccessibility.errors.txt -@@= skipped -0, +-1 lines =@@ --classConstructorAccessibility.ts(14,9): error TS2673: Constructor of class 'D' is private and only accessible within the class declaration. --classConstructorAccessibility.ts(15,9): error TS2674: Constructor of class 'E' is protected and only accessible within the class declaration. --classConstructorAccessibility.ts(31,13): error TS2673: Constructor of class 'D' is private and only accessible within the class declaration. --classConstructorAccessibility.ts(32,13): error TS2674: Constructor of class 'E' is protected and only accessible within the class declaration. -- -- --==== classConstructorAccessibility.ts (4 errors) ==== -- class C { -- public constructor(public x: number) { } -- } -- -- class D { -- private constructor(public x: number) { } -- } -- -- class E { -- protected constructor(public x: number) { } -- } -- -- var c = new C(1); -- var d = new D(1); // error -- ~~~~~~~~ --!!! error TS2673: Constructor of class 'D' is private and only accessible within the class declaration. -- var e = new E(1); // error -- ~~~~~~~~ --!!! error TS2674: Constructor of class 'E' is protected and only accessible within the class declaration. -- -- module Generic { -- class C { -- public constructor(public x: T) { } -- } -- -- class D { -- private constructor(public x: T) { } -- } -- -- class E { -- protected constructor(public x: T) { } -- } -- -- var c = new C(1); -- var d = new D(1); // error -- ~~~~~~~~ --!!! error TS2673: Constructor of class 'D' is private and only accessible within the class declaration. -- var e = new E(1); // error -- ~~~~~~~~ --!!! error TS2674: Constructor of class 'E' is protected and only accessible within the class declaration. -- } -- -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.errors.txt b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.errors.txt index fd536ae708..f680bb7775 100644 --- a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.errors.txt @@ -1,7 +1,11 @@ classConstructorAccessibility2.ts(31,24): error TS2675: Cannot extend a class 'BaseC'. Class constructor is marked as private. +classConstructorAccessibility2.ts(34,28): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. +classConstructorAccessibility2.ts(35,35): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. +classConstructorAccessibility2.ts(39,10): error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration. +classConstructorAccessibility2.ts(40,10): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. -==== classConstructorAccessibility2.ts (1 errors) ==== +==== classConstructorAccessibility2.ts (5 errors) ==== class BaseA { public constructor(public x: number) { } createInstance() { new BaseA(1); } @@ -38,12 +42,20 @@ classConstructorAccessibility2.ts(31,24): error TS2675: Cannot extend a class 'B constructor(public x: number) { super(x); } createInstance() { new DerivedC(9); } createBaseInstance() { new BaseC(10); } // error + ~~~~~~~~~~~~~ +!!! error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. static staticBaseInstance() { new BaseC(11); } // error + ~~~~~~~~~~~~~ +!!! error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. } var ba = new BaseA(1); var bb = new BaseB(1); // error + ~~~~~~~~~~~~ +!!! error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration. var bc = new BaseC(1); // error + ~~~~~~~~~~~~ +!!! error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. var da = new DerivedA(1); var db = new DerivedB(1); diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.errors.txt.diff deleted file mode 100644 index 0e38feaff4..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.errors.txt.diff +++ /dev/null @@ -1,36 +0,0 @@ ---- old.classConstructorAccessibility2.errors.txt -+++ new.classConstructorAccessibility2.errors.txt -@@= skipped -0, +0 lines =@@ - classConstructorAccessibility2.ts(31,24): error TS2675: Cannot extend a class 'BaseC'. Class constructor is marked as private. --classConstructorAccessibility2.ts(34,28): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. --classConstructorAccessibility2.ts(35,35): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. --classConstructorAccessibility2.ts(39,10): error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration. --classConstructorAccessibility2.ts(40,10): error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. - - --==== classConstructorAccessibility2.ts (5 errors) ==== -+==== classConstructorAccessibility2.ts (1 errors) ==== - class BaseA { - public constructor(public x: number) { } - createInstance() { new BaseA(1); } -@@= skipped -41, +37 lines =@@ - constructor(public x: number) { super(x); } - createInstance() { new DerivedC(9); } - createBaseInstance() { new BaseC(10); } // error -- ~~~~~~~~~~~~~ --!!! error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. - static staticBaseInstance() { new BaseC(11); } // error -- ~~~~~~~~~~~~~ --!!! error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. - } - - var ba = new BaseA(1); - var bb = new BaseB(1); // error -- ~~~~~~~~~~~~ --!!! error TS2674: Constructor of class 'BaseB' is protected and only accessible within the class declaration. - var bc = new BaseC(1); // error -- ~~~~~~~~~~~~ --!!! error TS2673: Constructor of class 'BaseC' is private and only accessible within the class declaration. - - var da = new DerivedA(1); - var db = new DerivedB(1); diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.errors.txt b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.errors.txt new file mode 100644 index 0000000000..e10e3d7a56 --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.errors.txt @@ -0,0 +1,17 @@ +classConstructorAccessibility5.ts(9,21): error TS2674: Constructor of class 'Base' is protected and only accessible within the class declaration. + + +==== classConstructorAccessibility5.ts (1 errors) ==== + class Base { + protected constructor() { } + } + class Derived extends Base { + static make() { new Base() } // ok + } + + class Unrelated { + static fake() { new Base() } // error + ~~~~~~~~~~ +!!! error TS2674: Constructor of class 'Base' is protected and only accessible within the class declaration. + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.errors.txt.diff deleted file mode 100644 index ed9b26441a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.classConstructorAccessibility5.errors.txt -+++ new.classConstructorAccessibility5.errors.txt -@@= skipped -0, +-1 lines =@@ --classConstructorAccessibility5.ts(9,21): error TS2674: Constructor of class 'Base' is protected and only accessible within the class declaration. -- -- --==== classConstructorAccessibility5.ts (1 errors) ==== -- class Base { -- protected constructor() { } -- } -- class Derived extends Base { -- static make() { new Base() } // ok -- } -- -- class Unrelated { -- static fake() { new Base() } // error -- ~~~~~~~~~~ --!!! error TS2674: Constructor of class 'Base' is protected and only accessible within the class declaration. -- } -- -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.errors.txt b/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.errors.txt index f0feab93c6..88b431ce34 100644 --- a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.errors.txt @@ -1,20 +1,16 @@ -typesWithPrivateConstructor.ts(6,5): error TS2322: Type 'Function' is not assignable to type '() => void'. - Type 'Function' provides no match for the signature '(): void'. -typesWithPrivateConstructor.ts(13,10): error TS2554: Expected 1 arguments, but got 0. -typesWithPrivateConstructor.ts(14,5): error TS2322: Type 'Function' is not assignable to type '(x: number) => void'. - Type 'Function' provides no match for the signature '(x: number): void'. +typesWithPrivateConstructor.ts(5,9): error TS2673: Constructor of class 'C' is private and only accessible within the class declaration. +typesWithPrivateConstructor.ts(13,10): error TS2673: Constructor of class 'C2' is private and only accessible within the class declaration. -==== typesWithPrivateConstructor.ts (3 errors) ==== +==== typesWithPrivateConstructor.ts (2 errors) ==== class C { private constructor() { } } var c = new C(); // error C is private + ~~~~~~~ +!!! error TS2673: Constructor of class 'C' is private and only accessible within the class declaration. var r: () => void = c.constructor; - ~ -!!! error TS2322: Type 'Function' is not assignable to type '() => void'. -!!! error TS2322: Type 'Function' provides no match for the signature '(): void'. class C2 { private constructor(x: number); @@ -23,9 +19,5 @@ typesWithPrivateConstructor.ts(14,5): error TS2322: Type 'Function' is not assig var c2 = new C2(); // error C2 is private ~~~~~~~~ -!!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 typesWithPrivateConstructor.ts:9:25: An argument for 'x' was not provided. - var r2: (x: number) => void = c2.constructor; - ~~ -!!! error TS2322: Type 'Function' is not assignable to type '(x: number) => void'. -!!! error TS2322: Type 'Function' provides no match for the signature '(x: number): void'. \ No newline at end of file +!!! error TS2673: Constructor of class 'C2' is private and only accessible within the class declaration. + var r2: (x: number) => void = c2.constructor; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.errors.txt.diff deleted file mode 100644 index 989d0198ee..0000000000 --- a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.errors.txt.diff +++ /dev/null @@ -1,39 +0,0 @@ ---- old.typesWithPrivateConstructor.errors.txt -+++ new.typesWithPrivateConstructor.errors.txt -@@= skipped -0, +0 lines =@@ --typesWithPrivateConstructor.ts(5,9): error TS2673: Constructor of class 'C' is private and only accessible within the class declaration. --typesWithPrivateConstructor.ts(13,10): error TS2673: Constructor of class 'C2' is private and only accessible within the class declaration. -+typesWithPrivateConstructor.ts(6,5): error TS2322: Type 'Function' is not assignable to type '() => void'. -+ Type 'Function' provides no match for the signature '(): void'. -+typesWithPrivateConstructor.ts(13,10): error TS2554: Expected 1 arguments, but got 0. -+typesWithPrivateConstructor.ts(14,5): error TS2322: Type 'Function' is not assignable to type '(x: number) => void'. -+ Type 'Function' provides no match for the signature '(x: number): void'. - - --==== typesWithPrivateConstructor.ts (2 errors) ==== -+==== typesWithPrivateConstructor.ts (3 errors) ==== - class C { - private constructor() { } - } - - var c = new C(); // error C is private -- ~~~~~~~ --!!! error TS2673: Constructor of class 'C' is private and only accessible within the class declaration. - var r: () => void = c.constructor; -+ ~ -+!!! error TS2322: Type 'Function' is not assignable to type '() => void'. -+!!! error TS2322: Type 'Function' provides no match for the signature '(): void'. - - class C2 { - private constructor(x: number); -@@= skipped -18, +22 lines =@@ - - var c2 = new C2(); // error C2 is private - ~~~~~~~~ --!!! error TS2673: Constructor of class 'C2' is private and only accessible within the class declaration. -+!!! error TS2554: Expected 1 arguments, but got 0. -+!!! related TS6210 typesWithPrivateConstructor.ts:9:25: An argument for 'x' was not provided. - var r2: (x: number) => void = c2.constructor; -+ ~~ -+!!! error TS2322: Type 'Function' is not assignable to type '(x: number) => void'. -+!!! error TS2322: Type 'Function' provides no match for the signature '(x: number): void'. diff --git a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.symbols b/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.symbols index c31661a3b3..843a7fea9f 100644 --- a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.symbols +++ b/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.symbols @@ -13,9 +13,7 @@ var c = new C(); // error C is private var r: () => void = c.constructor; >r : Symbol(r, Decl(typesWithPrivateConstructor.ts, 5, 3)) ->c.constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) >c : Symbol(c, Decl(typesWithPrivateConstructor.ts, 4, 3)) ->constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) class C2 { >C2 : Symbol(C2, Decl(typesWithPrivateConstructor.ts, 5, 34)) @@ -34,7 +32,5 @@ var c2 = new C2(); // error C2 is private var r2: (x: number) => void = c2.constructor; >r2 : Symbol(r2, Decl(typesWithPrivateConstructor.ts, 13, 3)) >x : Symbol(x, Decl(typesWithPrivateConstructor.ts, 13, 9)) ->c2.constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) >c2 : Symbol(c2, Decl(typesWithPrivateConstructor.ts, 12, 3)) ->constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.symbols.diff b/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.symbols.diff deleted file mode 100644 index daa780c6a6..0000000000 --- a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.symbols.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.typesWithPrivateConstructor.symbols -+++ new.typesWithPrivateConstructor.symbols -@@= skipped -12, +12 lines =@@ - - var r: () => void = c.constructor; - >r : Symbol(r, Decl(typesWithPrivateConstructor.ts, 5, 3)) -+>c.constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) - >c : Symbol(c, Decl(typesWithPrivateConstructor.ts, 4, 3)) -+>constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) - - class C2 { - >C2 : Symbol(C2, Decl(typesWithPrivateConstructor.ts, 5, 34)) -@@= skipped -19, +21 lines =@@ - var r2: (x: number) => void = c2.constructor; - >r2 : Symbol(r2, Decl(typesWithPrivateConstructor.ts, 13, 3)) - >x : Symbol(x, Decl(typesWithPrivateConstructor.ts, 13, 9)) -+>c2.constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) - >c2 : Symbol(c2, Decl(typesWithPrivateConstructor.ts, 12, 3)) -+>constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) - diff --git a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.errors.txt b/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.errors.txt index e4dc90608a..77a5a313eb 100644 --- a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.errors.txt @@ -1,20 +1,16 @@ -typesWithProtectedConstructor.ts(6,5): error TS2322: Type 'Function' is not assignable to type '() => void'. - Type 'Function' provides no match for the signature '(): void'. -typesWithProtectedConstructor.ts(13,10): error TS2554: Expected 1 arguments, but got 0. -typesWithProtectedConstructor.ts(14,5): error TS2322: Type 'Function' is not assignable to type '(x: number) => void'. - Type 'Function' provides no match for the signature '(x: number): void'. +typesWithProtectedConstructor.ts(5,9): error TS2674: Constructor of class 'C' is protected and only accessible within the class declaration. +typesWithProtectedConstructor.ts(13,10): error TS2674: Constructor of class 'C2' is protected and only accessible within the class declaration. -==== typesWithProtectedConstructor.ts (3 errors) ==== +==== typesWithProtectedConstructor.ts (2 errors) ==== class C { protected constructor() { } } var c = new C(); // error C is protected + ~~~~~~~ +!!! error TS2674: Constructor of class 'C' is protected and only accessible within the class declaration. var r: () => void = c.constructor; - ~ -!!! error TS2322: Type 'Function' is not assignable to type '() => void'. -!!! error TS2322: Type 'Function' provides no match for the signature '(): void'. class C2 { protected constructor(x: number); @@ -23,9 +19,5 @@ typesWithProtectedConstructor.ts(14,5): error TS2322: Type 'Function' is not ass var c2 = new C2(); // error C2 is protected ~~~~~~~~ -!!! error TS2554: Expected 1 arguments, but got 0. -!!! related TS6210 typesWithProtectedConstructor.ts:9:27: An argument for 'x' was not provided. - var r2: (x: number) => void = c2.constructor; - ~~ -!!! error TS2322: Type 'Function' is not assignable to type '(x: number) => void'. -!!! error TS2322: Type 'Function' provides no match for the signature '(x: number): void'. \ No newline at end of file +!!! error TS2674: Constructor of class 'C2' is protected and only accessible within the class declaration. + var r2: (x: number) => void = c2.constructor; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.errors.txt.diff deleted file mode 100644 index 796d4ab581..0000000000 --- a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.errors.txt.diff +++ /dev/null @@ -1,39 +0,0 @@ ---- old.typesWithProtectedConstructor.errors.txt -+++ new.typesWithProtectedConstructor.errors.txt -@@= skipped -0, +0 lines =@@ --typesWithProtectedConstructor.ts(5,9): error TS2674: Constructor of class 'C' is protected and only accessible within the class declaration. --typesWithProtectedConstructor.ts(13,10): error TS2674: Constructor of class 'C2' is protected and only accessible within the class declaration. -+typesWithProtectedConstructor.ts(6,5): error TS2322: Type 'Function' is not assignable to type '() => void'. -+ Type 'Function' provides no match for the signature '(): void'. -+typesWithProtectedConstructor.ts(13,10): error TS2554: Expected 1 arguments, but got 0. -+typesWithProtectedConstructor.ts(14,5): error TS2322: Type 'Function' is not assignable to type '(x: number) => void'. -+ Type 'Function' provides no match for the signature '(x: number): void'. - - --==== typesWithProtectedConstructor.ts (2 errors) ==== -+==== typesWithProtectedConstructor.ts (3 errors) ==== - class C { - protected constructor() { } - } - - var c = new C(); // error C is protected -- ~~~~~~~ --!!! error TS2674: Constructor of class 'C' is protected and only accessible within the class declaration. - var r: () => void = c.constructor; -+ ~ -+!!! error TS2322: Type 'Function' is not assignable to type '() => void'. -+!!! error TS2322: Type 'Function' provides no match for the signature '(): void'. - - class C2 { - protected constructor(x: number); -@@= skipped -18, +22 lines =@@ - - var c2 = new C2(); // error C2 is protected - ~~~~~~~~ --!!! error TS2674: Constructor of class 'C2' is protected and only accessible within the class declaration. -+!!! error TS2554: Expected 1 arguments, but got 0. -+!!! related TS6210 typesWithProtectedConstructor.ts:9:27: An argument for 'x' was not provided. - var r2: (x: number) => void = c2.constructor; -+ ~~ -+!!! error TS2322: Type 'Function' is not assignable to type '(x: number) => void'. -+!!! error TS2322: Type 'Function' provides no match for the signature '(x: number): void'. diff --git a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.symbols b/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.symbols index 6676429455..3686bb613c 100644 --- a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.symbols +++ b/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.symbols @@ -13,9 +13,7 @@ var c = new C(); // error C is protected var r: () => void = c.constructor; >r : Symbol(r, Decl(typesWithProtectedConstructor.ts, 5, 3)) ->c.constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) >c : Symbol(c, Decl(typesWithProtectedConstructor.ts, 4, 3)) ->constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) class C2 { >C2 : Symbol(C2, Decl(typesWithProtectedConstructor.ts, 5, 34)) @@ -34,7 +32,5 @@ var c2 = new C2(); // error C2 is protected var r2: (x: number) => void = c2.constructor; >r2 : Symbol(r2, Decl(typesWithProtectedConstructor.ts, 13, 3)) >x : Symbol(x, Decl(typesWithProtectedConstructor.ts, 13, 9)) ->c2.constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) >c2 : Symbol(c2, Decl(typesWithProtectedConstructor.ts, 12, 3)) ->constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.symbols.diff b/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.symbols.diff deleted file mode 100644 index 63e9be3e02..0000000000 --- a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.symbols.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.typesWithProtectedConstructor.symbols -+++ new.typesWithProtectedConstructor.symbols -@@= skipped -12, +12 lines =@@ - - var r: () => void = c.constructor; - >r : Symbol(r, Decl(typesWithProtectedConstructor.ts, 5, 3)) -+>c.constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) - >c : Symbol(c, Decl(typesWithProtectedConstructor.ts, 4, 3)) -+>constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) - - class C2 { - >C2 : Symbol(C2, Decl(typesWithProtectedConstructor.ts, 5, 34)) -@@= skipped -19, +21 lines =@@ - var r2: (x: number) => void = c2.constructor; - >r2 : Symbol(r2, Decl(typesWithProtectedConstructor.ts, 13, 3)) - >x : Symbol(x, Decl(typesWithProtectedConstructor.ts, 13, 9)) -+>c2.constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) - >c2 : Symbol(c2, Decl(typesWithProtectedConstructor.ts, 12, 3)) -+>constructor : Symbol(constructor, Decl(lib.es5.d.ts, --, --)) - From b88efa3a5f5888e2d88bf58f7df1eb3fbe27dac0 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 18:38:35 -0700 Subject: [PATCH 12/31] Properly initialize Binder.inStrictMode --- internal/binder/binder.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/binder/binder.go b/internal/binder/binder.go index d2eeaedfb6..55e6fff575 100644 --- a/internal/binder/binder.go +++ b/internal/binder/binder.go @@ -117,6 +117,7 @@ func bindSourceFile(file *ast.SourceFile, options *core.CompilerOptions) { b.file = file b.options = options b.languageVersion = options.GetEmitScriptTarget() + b.inStrictMode = (options.AlwaysStrict.IsTrue() || options.Strict.IsTrue()) && !file.IsDeclarationFile || ast.IsExternalModule(file) b.unreachableFlow = b.newFlowNode(ast.FlowFlagsUnreachable) b.reportedUnreachableFlow = b.newFlowNode(ast.FlowFlagsUnreachable) b.bind(file.AsNode()) From 8ce047d4ec7fa4bf561b446e24751c42e2582cca Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 15 Mar 2025 18:39:03 -0700 Subject: [PATCH 13/31] Accept new baselines --- .../compiler/alwaysStrict.errors.txt | 9 ++++ .../compiler/alwaysStrict.errors.txt.diff | 14 ------ .../compiler/alwaysStrictES6.errors.txt | 9 ++++ .../compiler/alwaysStrictES6.errors.txt.diff | 14 ------ .../compiler/alwaysStrictModule.errors.txt | 11 +++++ .../alwaysStrictModule.errors.txt.diff | 16 ------- .../compiler/alwaysStrictModule2.errors.txt | 21 +++++++++ .../alwaysStrictModule2.errors.txt.diff | 26 ----------- ...alwaysStrictNoImplicitUseStrict.errors.txt | 11 +++++ ...sStrictNoImplicitUseStrict.errors.txt.diff | 21 +++------ ...nctionDeclarationInStrictModule.errors.txt | 15 ++++++ ...nDeclarationInStrictModule.errors.txt.diff | 20 -------- ...dFunctionDeclarationInStrictModule.symbols | 2 - ...tionDeclarationInStrictModule.symbols.diff | 8 ---- ...CompilationBindStrictModeErrors.errors.txt | 8 +++- ...lationBindStrictModeErrors.errors.txt.diff | 24 ++-------- ...xportNonInitializedVariablesAMD.errors.txt | 5 +- ...NonInitializedVariablesAMD.errors.txt.diff | 21 --------- ...NonInitializedVariablesCommonJS.errors.txt | 5 +- ...itializedVariablesCommonJS.errors.txt.diff | 21 --------- ...xportNonInitializedVariablesES6.errors.txt | 5 +- ...NonInitializedVariablesES6.errors.txt.diff | 21 --------- ...rtNonInitializedVariablesSystem.errors.txt | 5 +- ...InitializedVariablesSystem.errors.txt.diff | 21 --------- ...xportNonInitializedVariablesUMD.errors.txt | 5 +- ...NonInitializedVariablesUMD.errors.txt.diff | 21 --------- ...rtsWithContextualKeywordNames01.errors.txt | 22 +++++++++ ...thContextualKeywordNames01.errors.txt.diff | 27 ----------- .../plainJSBinderErrors.errors.txt | 15 ++++-- .../plainJSBinderErrors.errors.txt.diff | 46 +++---------------- .../plainJSGrammarErrors.errors.txt | 5 +- .../plainJSGrammarErrors.errors.txt.diff | 27 ++--------- .../scannerUnicodeEscapeInKeyword2.errors.txt | 10 +++- ...nerUnicodeEscapeInKeyword2.errors.txt.diff | 10 +++- .../typedefOnStatements.errors.txt | 5 +- .../typedefOnStatements.errors.txt.diff | 18 ++------ 36 files changed, 184 insertions(+), 360 deletions(-) create mode 100644 testdata/baselines/reference/submodule/compiler/alwaysStrict.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/alwaysStrict.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/alwaysStrictES6.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/alwaysStrictES6.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesAMD.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesCommonJS.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesES6.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesSystem.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesUMD.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportsAndImportsWithContextualKeywordNames01.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/exportsAndImportsWithContextualKeywordNames01.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrict.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrict.errors.txt new file mode 100644 index 0000000000..e4d2a12520 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrict.errors.txt @@ -0,0 +1,9 @@ +alwaysStrict.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== alwaysStrict.ts (1 errors) ==== + function f() { + var arguments = []; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrict.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/alwaysStrict.errors.txt.diff deleted file mode 100644 index 8073198e43..0000000000 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrict.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.alwaysStrict.errors.txt -+++ new.alwaysStrict.errors.txt -@@= skipped -0, +-1 lines =@@ --alwaysStrict.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. -- -- --==== alwaysStrict.ts (1 errors) ==== -- function f() { -- var arguments = []; -- ~~~~~~~~~ --!!! error TS1100: Invalid use of 'arguments' in strict mode. -- } -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictES6.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrictES6.errors.txt new file mode 100644 index 0000000000..03b1c64beb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictES6.errors.txt @@ -0,0 +1,9 @@ +alwaysStrictES6.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== alwaysStrictES6.ts (1 errors) ==== + function f() { + var arguments = []; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictES6.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/alwaysStrictES6.errors.txt.diff deleted file mode 100644 index 40515b979d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictES6.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.alwaysStrictES6.errors.txt -+++ new.alwaysStrictES6.errors.txt -@@= skipped -0, +-1 lines =@@ --alwaysStrictES6.ts(2,9): error TS1100: Invalid use of 'arguments' in strict mode. -- -- --==== alwaysStrictES6.ts (1 errors) ==== -- function f() { -- var arguments = []; -- ~~~~~~~~~ --!!! error TS1100: Invalid use of 'arguments' in strict mode. -- } -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt new file mode 100644 index 0000000000..d3fa738698 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt @@ -0,0 +1,11 @@ +alwaysStrictModule.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== alwaysStrictModule.ts (1 errors) ==== + module M { + export function f() { + var arguments = []; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt.diff deleted file mode 100644 index 23721cf413..0000000000 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.alwaysStrictModule.errors.txt -+++ new.alwaysStrictModule.errors.txt -@@= skipped -0, +-1 lines =@@ --alwaysStrictModule.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. -- -- --==== alwaysStrictModule.ts (1 errors) ==== -- module M { -- export function f() { -- var arguments = []; -- ~~~~~~~~~ --!!! error TS1100: Invalid use of 'arguments' in strict mode. -- } -- } -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt new file mode 100644 index 0000000000..54481a89df --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt @@ -0,0 +1,21 @@ +a.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. +b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== a.ts (1 errors) ==== + module M { + export function f() { + var arguments = []; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + } + +==== b.ts (1 errors) ==== + module M { + export function f2() { + var arguments = []; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt.diff deleted file mode 100644 index 0fde406983..0000000000 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- old.alwaysStrictModule2.errors.txt -+++ new.alwaysStrictModule2.errors.txt -@@= skipped -0, +-1 lines =@@ --a.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. --b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. -- -- --==== a.ts (1 errors) ==== -- module M { -- export function f() { -- var arguments = []; -- ~~~~~~~~~ --!!! error TS1100: Invalid use of 'arguments' in strict mode. -- } -- } -- --==== b.ts (1 errors) ==== -- module M { -- export function f2() { -- var arguments = []; -- ~~~~~~~~~ --!!! error TS1100: Invalid use of 'arguments' in strict mode. -- } -- } -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt new file mode 100644 index 0000000000..eb2cd86e4e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt @@ -0,0 +1,11 @@ +alwaysStrictNoImplicitUseStrict.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. + + +==== alwaysStrictNoImplicitUseStrict.ts (1 errors) ==== + module M { + export function f() { + var arguments = []; + ~~~~~~~~~ +!!! error TS1100: Invalid use of 'arguments' in strict mode. + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt.diff index a02d61286b..9e8670bbcd 100644 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictNoImplicitUseStrict.errors.txt.diff @@ -1,18 +1,11 @@ --- old.alwaysStrictNoImplicitUseStrict.errors.txt +++ new.alwaysStrictNoImplicitUseStrict.errors.txt -@@= skipped -0, +-1 lines =@@ +@@= skipped -0, +0 lines =@@ -error TS5102: Option 'noImplicitUseStrict' has been removed. Please remove it from your configuration. --alwaysStrictNoImplicitUseStrict.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. -- -- + alwaysStrictNoImplicitUseStrict.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. + + -!!! error TS5102: Option 'noImplicitUseStrict' has been removed. Please remove it from your configuration. --==== alwaysStrictNoImplicitUseStrict.ts (1 errors) ==== -- module M { -- export function f() { -- var arguments = []; -- ~~~~~~~~~ --!!! error TS1100: Invalid use of 'arguments' in strict mode. -- } -- } -@@= skipped --1, +1 lines =@@ -+ + ==== alwaysStrictNoImplicitUseStrict.ts (1 errors) ==== + module M { + export function f() { diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.errors.txt b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.errors.txt new file mode 100644 index 0000000000..175fd5671a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.errors.txt @@ -0,0 +1,15 @@ +blockScopedFunctionDeclarationInStrictModule.ts(2,14): error TS1252: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode. +blockScopedFunctionDeclarationInStrictModule.ts(6,10): error TS2304: Cannot find name 'foo'. + + +==== blockScopedFunctionDeclarationInStrictModule.ts (2 errors) ==== + if (true) { + function foo() { } + ~~~ +!!! error TS1252: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode. + foo(); // ok + } + + export = foo; // not ok + ~~~ +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.errors.txt.diff deleted file mode 100644 index 6906f45668..0000000000 --- a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.blockScopedFunctionDeclarationInStrictModule.errors.txt -+++ new.blockScopedFunctionDeclarationInStrictModule.errors.txt -@@= skipped -0, +-1 lines =@@ --blockScopedFunctionDeclarationInStrictModule.ts(2,14): error TS1252: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode. --blockScopedFunctionDeclarationInStrictModule.ts(6,10): error TS2304: Cannot find name 'foo'. -- -- --==== blockScopedFunctionDeclarationInStrictModule.ts (2 errors) ==== -- if (true) { -- function foo() { } -- ~~~ --!!! error TS1252: Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode. -- foo(); // ok -- } -- -- export = foo; // not ok -- ~~~ --!!! error TS2304: Cannot find name 'foo'. -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.symbols b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.symbols index 8b8487128d..b21eec9de5 100644 --- a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.symbols @@ -10,5 +10,3 @@ if (true) { } export = foo; // not ok ->foo : Symbol(foo, Decl(blockScopedFunctionDeclarationInStrictModule.ts, 0, 11)) - diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.symbols.diff b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.symbols.diff deleted file mode 100644 index d02637ba9e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.symbols.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- old.blockScopedFunctionDeclarationInStrictModule.symbols -+++ new.blockScopedFunctionDeclarationInStrictModule.symbols -@@= skipped -9, +9 lines =@@ - } - - export = foo; // not ok -+>foo : Symbol(foo, Decl(blockScopedFunctionDeclarationInStrictModule.ts, 0, 11)) -+ diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationBindStrictModeErrors.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationBindStrictModeErrors.errors.txt index 74913b8f35..66d1ce9a0e 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationBindStrictModeErrors.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationBindStrictModeErrors.errors.txt @@ -7,6 +7,8 @@ a.js(12,10): error TS1100: Invalid use of 'arguments' in strict mode. a.js(15,1): error TS1101: 'with' statements are not allowed in strict mode. a.js(15,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. b.js(6,13): error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode. +c.js(1,12): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. +c.js(2,5): error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. d.js(2,9): error TS1489: Decimals with leading zeros are not allowed. @@ -57,9 +59,13 @@ d.js(2,9): error TS1489: Decimals with leading zeros are not allowed. } } -==== c.js (0 errors) ==== +==== c.js (2 errors) ==== export var let = 10; // external modules are automatically in strict mode + ~~~ +!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. var eval = function () { + ~~~~ +!!! error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. }; ==== d.js (1 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationBindStrictModeErrors.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationBindStrictModeErrors.errors.txt.diff index 1534e04942..2efcc7c2fc 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationBindStrictModeErrors.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationBindStrictModeErrors.errors.txt.diff @@ -6,12 +6,9 @@ a.js(15,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -b.js(3,7): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'eval'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode. b.js(6,13): error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode. --c.js(1,12): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. --c.js(2,5): error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. - d.js(2,9): error TS1489: Decimals with leading zeros are not allowed. - - -@@= skipped -42, +39 lines =@@ + c.js(1,12): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. + c.js(2,5): error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. +@@= skipped -42, +41 lines =@@ b = 10; } @@ -25,18 +22,3 @@ } method() { var let = 10; // error -@@= skipped -14, +12 lines =@@ - } - } - --==== c.js (2 errors) ==== -+==== c.js (0 errors) ==== - export var let = 10; // external modules are automatically in strict mode -- ~~~ --!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. - var eval = function () { -- ~~~~ --!!! error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. - }; - - ==== d.js (1 errors) ==== diff --git a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesAMD.errors.txt b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesAMD.errors.txt index 9562e439c3..6b757c89a9 100644 --- a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesAMD.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesAMD.errors.txt @@ -1,14 +1,17 @@ exportNonInitializedVariablesAMD.ts(1,4): error TS1123: Variable declaration list cannot be empty. +exportNonInitializedVariablesAMD.ts(2,1): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. exportNonInitializedVariablesAMD.ts(2,1): error TS2304: Cannot find name 'let'. exportNonInitializedVariablesAMD.ts(3,6): error TS1123: Variable declaration list cannot be empty. -==== exportNonInitializedVariablesAMD.ts (3 errors) ==== +==== exportNonInitializedVariablesAMD.ts (4 errors) ==== var; !!! error TS1123: Variable declaration list cannot be empty. let; ~~~ +!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. + ~~~ !!! error TS2304: Cannot find name 'let'. const; diff --git a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesAMD.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesAMD.errors.txt.diff deleted file mode 100644 index b2762e4419..0000000000 --- a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesAMD.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.exportNonInitializedVariablesAMD.errors.txt -+++ new.exportNonInitializedVariablesAMD.errors.txt -@@= skipped -0, +0 lines =@@ - exportNonInitializedVariablesAMD.ts(1,4): error TS1123: Variable declaration list cannot be empty. --exportNonInitializedVariablesAMD.ts(2,1): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. - exportNonInitializedVariablesAMD.ts(2,1): error TS2304: Cannot find name 'let'. - exportNonInitializedVariablesAMD.ts(3,6): error TS1123: Variable declaration list cannot be empty. - - --==== exportNonInitializedVariablesAMD.ts (4 errors) ==== -+==== exportNonInitializedVariablesAMD.ts (3 errors) ==== - var; - - !!! error TS1123: Variable declaration list cannot be empty. - let; - ~~~ --!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. -- ~~~ - !!! error TS2304: Cannot find name 'let'. - const; - diff --git a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesCommonJS.errors.txt b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesCommonJS.errors.txt index e684c8e38f..bdaf0bed58 100644 --- a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesCommonJS.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesCommonJS.errors.txt @@ -1,14 +1,17 @@ exportNonInitializedVariablesCommonJS.ts(1,4): error TS1123: Variable declaration list cannot be empty. +exportNonInitializedVariablesCommonJS.ts(2,1): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. exportNonInitializedVariablesCommonJS.ts(2,1): error TS2304: Cannot find name 'let'. exportNonInitializedVariablesCommonJS.ts(3,6): error TS1123: Variable declaration list cannot be empty. -==== exportNonInitializedVariablesCommonJS.ts (3 errors) ==== +==== exportNonInitializedVariablesCommonJS.ts (4 errors) ==== var; !!! error TS1123: Variable declaration list cannot be empty. let; ~~~ +!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. + ~~~ !!! error TS2304: Cannot find name 'let'. const; diff --git a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesCommonJS.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesCommonJS.errors.txt.diff deleted file mode 100644 index 88186a6dba..0000000000 --- a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesCommonJS.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.exportNonInitializedVariablesCommonJS.errors.txt -+++ new.exportNonInitializedVariablesCommonJS.errors.txt -@@= skipped -0, +0 lines =@@ - exportNonInitializedVariablesCommonJS.ts(1,4): error TS1123: Variable declaration list cannot be empty. --exportNonInitializedVariablesCommonJS.ts(2,1): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. - exportNonInitializedVariablesCommonJS.ts(2,1): error TS2304: Cannot find name 'let'. - exportNonInitializedVariablesCommonJS.ts(3,6): error TS1123: Variable declaration list cannot be empty. - - --==== exportNonInitializedVariablesCommonJS.ts (4 errors) ==== -+==== exportNonInitializedVariablesCommonJS.ts (3 errors) ==== - var; - - !!! error TS1123: Variable declaration list cannot be empty. - let; - ~~~ --!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. -- ~~~ - !!! error TS2304: Cannot find name 'let'. - const; - diff --git a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesES6.errors.txt b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesES6.errors.txt index 9db912a110..69dbc8538b 100644 --- a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesES6.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesES6.errors.txt @@ -1,14 +1,17 @@ exportNonInitializedVariablesES6.ts(1,4): error TS1123: Variable declaration list cannot be empty. +exportNonInitializedVariablesES6.ts(2,1): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. exportNonInitializedVariablesES6.ts(2,1): error TS2304: Cannot find name 'let'. exportNonInitializedVariablesES6.ts(3,6): error TS1123: Variable declaration list cannot be empty. -==== exportNonInitializedVariablesES6.ts (3 errors) ==== +==== exportNonInitializedVariablesES6.ts (4 errors) ==== var; !!! error TS1123: Variable declaration list cannot be empty. let; ~~~ +!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. + ~~~ !!! error TS2304: Cannot find name 'let'. const; diff --git a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesES6.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesES6.errors.txt.diff deleted file mode 100644 index eb57a970a1..0000000000 --- a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesES6.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.exportNonInitializedVariablesES6.errors.txt -+++ new.exportNonInitializedVariablesES6.errors.txt -@@= skipped -0, +0 lines =@@ - exportNonInitializedVariablesES6.ts(1,4): error TS1123: Variable declaration list cannot be empty. --exportNonInitializedVariablesES6.ts(2,1): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. - exportNonInitializedVariablesES6.ts(2,1): error TS2304: Cannot find name 'let'. - exportNonInitializedVariablesES6.ts(3,6): error TS1123: Variable declaration list cannot be empty. - - --==== exportNonInitializedVariablesES6.ts (4 errors) ==== -+==== exportNonInitializedVariablesES6.ts (3 errors) ==== - var; - - !!! error TS1123: Variable declaration list cannot be empty. - let; - ~~~ --!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. -- ~~~ - !!! error TS2304: Cannot find name 'let'. - const; - diff --git a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesSystem.errors.txt b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesSystem.errors.txt index f194db3e34..87936e80db 100644 --- a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesSystem.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesSystem.errors.txt @@ -1,14 +1,17 @@ exportNonInitializedVariablesSystem.ts(1,4): error TS1123: Variable declaration list cannot be empty. +exportNonInitializedVariablesSystem.ts(2,1): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. exportNonInitializedVariablesSystem.ts(2,1): error TS2304: Cannot find name 'let'. exportNonInitializedVariablesSystem.ts(3,6): error TS1123: Variable declaration list cannot be empty. -==== exportNonInitializedVariablesSystem.ts (3 errors) ==== +==== exportNonInitializedVariablesSystem.ts (4 errors) ==== var; !!! error TS1123: Variable declaration list cannot be empty. let; ~~~ +!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. + ~~~ !!! error TS2304: Cannot find name 'let'. const; diff --git a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesSystem.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesSystem.errors.txt.diff deleted file mode 100644 index b86798c854..0000000000 --- a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesSystem.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.exportNonInitializedVariablesSystem.errors.txt -+++ new.exportNonInitializedVariablesSystem.errors.txt -@@= skipped -0, +0 lines =@@ - exportNonInitializedVariablesSystem.ts(1,4): error TS1123: Variable declaration list cannot be empty. --exportNonInitializedVariablesSystem.ts(2,1): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. - exportNonInitializedVariablesSystem.ts(2,1): error TS2304: Cannot find name 'let'. - exportNonInitializedVariablesSystem.ts(3,6): error TS1123: Variable declaration list cannot be empty. - - --==== exportNonInitializedVariablesSystem.ts (4 errors) ==== -+==== exportNonInitializedVariablesSystem.ts (3 errors) ==== - var; - - !!! error TS1123: Variable declaration list cannot be empty. - let; - ~~~ --!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. -- ~~~ - !!! error TS2304: Cannot find name 'let'. - const; - diff --git a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesUMD.errors.txt b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesUMD.errors.txt index 5a952fe8df..d3139867a1 100644 --- a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesUMD.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesUMD.errors.txt @@ -1,14 +1,17 @@ exportNonInitializedVariablesUMD.ts(1,4): error TS1123: Variable declaration list cannot be empty. +exportNonInitializedVariablesUMD.ts(2,1): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. exportNonInitializedVariablesUMD.ts(2,1): error TS2304: Cannot find name 'let'. exportNonInitializedVariablesUMD.ts(3,6): error TS1123: Variable declaration list cannot be empty. -==== exportNonInitializedVariablesUMD.ts (3 errors) ==== +==== exportNonInitializedVariablesUMD.ts (4 errors) ==== var; !!! error TS1123: Variable declaration list cannot be empty. let; ~~~ +!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. + ~~~ !!! error TS2304: Cannot find name 'let'. const; diff --git a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesUMD.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesUMD.errors.txt.diff deleted file mode 100644 index 40ac6871f4..0000000000 --- a/testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesUMD.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.exportNonInitializedVariablesUMD.errors.txt -+++ new.exportNonInitializedVariablesUMD.errors.txt -@@= skipped -0, +0 lines =@@ - exportNonInitializedVariablesUMD.ts(1,4): error TS1123: Variable declaration list cannot be empty. --exportNonInitializedVariablesUMD.ts(2,1): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. - exportNonInitializedVariablesUMD.ts(2,1): error TS2304: Cannot find name 'let'. - exportNonInitializedVariablesUMD.ts(3,6): error TS1123: Variable declaration list cannot be empty. - - --==== exportNonInitializedVariablesUMD.ts (4 errors) ==== -+==== exportNonInitializedVariablesUMD.ts (3 errors) ==== - var; - - !!! error TS1123: Variable declaration list cannot be empty. - let; - ~~~ --!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. -- ~~~ - !!! error TS2304: Cannot find name 'let'. - const; - diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImportsWithContextualKeywordNames01.errors.txt b/testdata/baselines/reference/submodule/conformance/exportsAndImportsWithContextualKeywordNames01.errors.txt new file mode 100644 index 0000000000..7cbe0691fb --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/exportsAndImportsWithContextualKeywordNames01.errors.txt @@ -0,0 +1,22 @@ +t3.ts(1,17): error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. + + +==== t1.ts (0 errors) ==== + let set = { + set foo(x: number) { + } + } + let get = 10; + + export { set, get }; + +==== t2.ts (0 errors) ==== + import * as set from "./t1"; + +==== t3.ts (1 errors) ==== + import { set as yield } from "./t1"; + ~~~~~ +!!! error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. + +==== t4.ts (0 errors) ==== + import { get } from "./t1"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImportsWithContextualKeywordNames01.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/exportsAndImportsWithContextualKeywordNames01.errors.txt.diff deleted file mode 100644 index 5f88fcd95e..0000000000 --- a/testdata/baselines/reference/submodule/conformance/exportsAndImportsWithContextualKeywordNames01.errors.txt.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.exportsAndImportsWithContextualKeywordNames01.errors.txt -+++ new.exportsAndImportsWithContextualKeywordNames01.errors.txt -@@= skipped -0, +-1 lines =@@ --t3.ts(1,17): error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. -- -- --==== t1.ts (0 errors) ==== -- let set = { -- set foo(x: number) { -- } -- } -- let get = 10; -- -- export { set, get }; -- --==== t2.ts (0 errors) ==== -- import * as set from "./t1"; -- --==== t3.ts (1 errors) ==== -- import { set as yield } from "./t1"; -- ~~~~~ --!!! error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. -- --==== t4.ts (0 errors) ==== -- import { get } from "./t1"; -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt b/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt index 97188c86bb..fbc8c76a72 100644 --- a/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt @@ -1,8 +1,9 @@ plainJSBinderErrors.js(1,1): error TS2528: A module cannot have multiple default exports. plainJSBinderErrors.js(2,1): error TS2528: A module cannot have multiple default exports. plainJSBinderErrors.js(3,7): error TS1262: Identifier expected. 'await' is a reserved word at the top-level of a module. +plainJSBinderErrors.js(4,7): error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. plainJSBinderErrors.js(6,11): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -plainJSBinderErrors.js(9,11): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +plainJSBinderErrors.js(9,11): error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. plainJSBinderErrors.js(12,5): error TS18012: '#constructor' is a reserved word. plainJSBinderErrors.js(15,20): error TS1102: 'delete' cannot be called on an identifier in strict mode. plainJSBinderErrors.js(15,20): error TS2703: The operand of a 'delete' operator must be a property reference. @@ -16,9 +17,11 @@ plainJSBinderErrors.js(27,9): error TS1101: 'with' statements are not allowed in plainJSBinderErrors.js(27,9): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. plainJSBinderErrors.js(33,13): error TS1344: 'A label is not allowed here. plainJSBinderErrors.js(34,13): error TS1107: Jump target cannot cross function boundary. +plainJSBinderErrors.js(39,7): error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. +plainJSBinderErrors.js(40,7): error TS1215: Invalid use of 'arguments'. Modules are automatically in strict mode. -==== plainJSBinderErrors.js (18 errors) ==== +==== plainJSBinderErrors.js (21 errors) ==== export default 12 ~~~~~~~~~~~~~~~~~ !!! error TS2528: A module cannot have multiple default exports. @@ -31,6 +34,8 @@ plainJSBinderErrors.js(34,13): error TS1107: Jump target cannot cross function b ~~~~~ !!! error TS1262: Identifier expected. 'await' is a reserved word at the top-level of a module. const yield = 2 + ~~~~~ +!!! error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. async function f() { const await = 3 ~~~~~ @@ -39,7 +44,7 @@ plainJSBinderErrors.js(34,13): error TS1107: Jump target cannot cross function b function* g() { const yield = 4 ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +!!! error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. } class C { #constructor = 5 @@ -96,5 +101,9 @@ plainJSBinderErrors.js(34,13): error TS1107: Jump target cannot cross function b } } const eval = 9 + ~~~~ +!!! error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. const arguments = 10 + ~~~~~~~~~ +!!! error TS1215: Invalid use of 'arguments'. Modules are automatically in strict mode. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt.diff index 2c4b6e4221..8f0a57b868 100644 --- a/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/plainJSBinderErrors.errors.txt.diff @@ -1,13 +1,7 @@ --- old.plainJSBinderErrors.errors.txt +++ new.plainJSBinderErrors.errors.txt -@@= skipped -0, +0 lines =@@ - plainJSBinderErrors.js(1,1): error TS2528: A module cannot have multiple default exports. - plainJSBinderErrors.js(2,1): error TS2528: A module cannot have multiple default exports. - plainJSBinderErrors.js(3,7): error TS1262: Identifier expected. 'await' is a reserved word at the top-level of a module. --plainJSBinderErrors.js(4,7): error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. - plainJSBinderErrors.js(6,11): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. --plainJSBinderErrors.js(9,11): error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. -+plainJSBinderErrors.js(9,11): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +@@= skipped -5, +5 lines =@@ + plainJSBinderErrors.js(9,11): error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. plainJSBinderErrors.js(12,5): error TS18012: '#constructor' is a reserved word. plainJSBinderErrors.js(15,20): error TS1102: 'delete' cannot be called on an identifier in strict mode. +plainJSBinderErrors.js(15,20): error TS2703: The operand of a 'delete' operator must be a property reference. @@ -21,34 +15,16 @@ +plainJSBinderErrors.js(27,9): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. plainJSBinderErrors.js(33,13): error TS1344: 'A label is not allowed here. plainJSBinderErrors.js(34,13): error TS1107: Jump target cannot cross function boundary. --plainJSBinderErrors.js(39,7): error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. --plainJSBinderErrors.js(40,7): error TS1215: Invalid use of 'arguments'. Modules are automatically in strict mode. + plainJSBinderErrors.js(39,7): error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. + plainJSBinderErrors.js(40,7): error TS1215: Invalid use of 'arguments'. Modules are automatically in strict mode. -==== plainJSBinderErrors.js (17 errors) ==== -+==== plainJSBinderErrors.js (18 errors) ==== ++==== plainJSBinderErrors.js (21 errors) ==== export default 12 ~~~~~~~~~~~~~~~~~ !!! error TS2528: A module cannot have multiple default exports. -@@= skipped -29, +30 lines =@@ - ~~~~~ - !!! error TS1262: Identifier expected. 'await' is a reserved word at the top-level of a module. - const yield = 2 -- ~~~~~ --!!! error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. - async function f() { - const await = 3 - ~~~~~ -@@= skipped -10, +8 lines =@@ - function* g() { - const yield = 4 - ~~~~~ --!!! error TS1214: Identifier expected. 'yield' is a reserved word in strict mode. Modules are automatically in strict mode. -+!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - } - class C { - #constructor = 5 -@@= skipped -11, +11 lines =@@ +@@= skipped -45, +49 lines =@@ delete f ~ !!! error TS1102: 'delete' cannot be called on an identifier in strict mode. @@ -78,13 +54,3 @@ return toFixed() } } -@@= skipped -16, +18 lines =@@ - } - } - const eval = 9 -- ~~~~ --!!! error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode. - const arguments = 10 -- ~~~~~~~~~ --!!! error TS1215: Invalid use of 'arguments'. Modules are automatically in strict mode. - diff --git a/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt b/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt index d959b42927..e38bea5db4 100644 --- a/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt @@ -73,6 +73,7 @@ plainJSGrammarErrors.js(116,24): error TS1009: Trailing comma not allowed. plainJSGrammarErrors.js(117,29): error TS1097: 'extends' list cannot be empty. plainJSGrammarErrors.js(120,7): error TS1182: A destructuring declaration must have an initializer. plainJSGrammarErrors.js(121,7): error TS1155: 'const' declarations must be initialized. +plainJSGrammarErrors.js(122,5): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. plainJSGrammarErrors.js(122,5): error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. plainJSGrammarErrors.js(124,5): error TS1156: 'let' declarations can only be declared inside a block. plainJSGrammarErrors.js(126,5): error TS1156: 'const' declarations can only be declared inside a block. @@ -102,7 +103,7 @@ plainJSGrammarErrors.js(205,36): error TS1325: Argument of dynamic import cannot plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be used within a function body. -==== plainJSGrammarErrors.js (101 errors) ==== +==== plainJSGrammarErrors.js (102 errors) ==== class C { // #private mistakes q = #unbound @@ -375,6 +376,8 @@ plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be u !!! error TS1155: 'const' declarations must be initialized. let let = 15; ~~~ +!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. + ~~~ !!! error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. if (true) let onlyBlockLet = 17; diff --git a/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt.diff index e53ae23f3a..5d851323d5 100644 --- a/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/plainJSGrammarErrors.errors.txt.diff @@ -71,15 +71,7 @@ plainJSGrammarErrors.js(110,15): error TS1255: A definite assignment assertion '!' is not permitted in this context. plainJSGrammarErrors.js(111,19): error TS1255: A definite assignment assertion '!' is not permitted in this context. plainJSGrammarErrors.js(114,16): error TS1312: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern. -@@= skipped -16, +18 lines =@@ - plainJSGrammarErrors.js(117,29): error TS1097: 'extends' list cannot be empty. - plainJSGrammarErrors.js(120,7): error TS1182: A destructuring declaration must have an initializer. - plainJSGrammarErrors.js(121,7): error TS1155: 'const' declarations must be initialized. --plainJSGrammarErrors.js(122,5): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. - plainJSGrammarErrors.js(122,5): error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. - plainJSGrammarErrors.js(124,5): error TS1156: 'let' declarations can only be declared inside a block. - plainJSGrammarErrors.js(126,5): error TS1156: 'const' declarations can only be declared inside a block. -@@= skipped -24, +23 lines =@@ +@@= skipped -40, +42 lines =@@ plainJSGrammarErrors.js(202,22): error TS17012: 'targe' is not a valid meta-property for keyword 'new'. Did you mean 'target'? plainJSGrammarErrors.js(203,30): message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments plainJSGrammarErrors.js(204,30): message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments @@ -89,11 +81,7 @@ +plainJSGrammarErrors.js(207,1): error TS1108: A 'return' statement can only be used within a function body. --==== plainJSGrammarErrors.js (102 errors) ==== -+==== plainJSGrammarErrors.js (101 errors) ==== - class C { - // #private mistakes - q = #unbound + ==== plainJSGrammarErrors.js (102 errors) ==== @@= skipped -14, +17 lines =@@ ~~ !!! error TS1451: Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression @@ -213,16 +201,7 @@ ~ !!! error TS1255: A definite assignment assertion '!' is not permitted in this context. definiteMethod!() { return 13 }, -@@= skipped -35, +31 lines =@@ - !!! error TS1155: 'const' declarations must be initialized. - let let = 15; - ~~~ --!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode. -- ~~~ - !!! error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. - if (true) - let onlyBlockLet = 17; -@@= skipped -129, +127 lines =@@ +@@= skipped -164, +160 lines =@@ const trinaryDynamicImport = import('1', '2', '3') ~~~~~~~~~~~~~~~~~~~~~ !!! message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments diff --git a/testdata/baselines/reference/submodule/conformance/scannerUnicodeEscapeInKeyword2.errors.txt b/testdata/baselines/reference/submodule/conformance/scannerUnicodeEscapeInKeyword2.errors.txt index 5dbbe6c9ff..9e58cf9bb7 100644 --- a/testdata/baselines/reference/submodule/conformance/scannerUnicodeEscapeInKeyword2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/scannerUnicodeEscapeInKeyword2.errors.txt @@ -1,8 +1,10 @@ file1.ts(1,5): error TS1262: Identifier expected. '\u0061wait' is a reserved word at the top-level of a module. +file1.ts(6,5): error TS1214: Identifier expected. '\u0079ield' is a reserved word in strict mode. Modules are automatically in strict mode. file2.ts(3,5): error TS1262: Identifier expected. '\u{0061}wait' is a reserved word at the top-level of a module. +file2.ts(8,5): error TS1214: Identifier expected. '\u{0079}ield' is a reserved word in strict mode. Modules are automatically in strict mode. -==== file1.ts (1 errors) ==== +==== file1.ts (2 errors) ==== var \u0061wait = 12; // ok ~~~~~~~~~~ !!! error TS1262: Identifier expected. '\u0061wait' is a reserved word at the top-level of a module. @@ -11,6 +13,8 @@ file2.ts(3,5): error TS1262: Identifier expected. '\u{0061}wait' is a reserved w } var \u0079ield = 12; // ok + ~~~~~~~~~~ +!!! error TS1214: Identifier expected. '\u0079ield' is a reserved word in strict mode. Modules are automatically in strict mode. function *gen() { \u0079ield 12; //not ok } @@ -20,7 +24,7 @@ file2.ts(3,5): error TS1262: Identifier expected. '\u{0061}wait' is a reserved w typ\u0065 notok = 0; // not ok export {}; -==== file2.ts (1 errors) ==== +==== file2.ts (2 errors) ==== \u{0076}ar x = "hello"; // not ok var \u{0061}wait = 12; // ok @@ -31,6 +35,8 @@ file2.ts(3,5): error TS1262: Identifier expected. '\u{0061}wait' is a reserved w } var \u{0079}ield = 12; // ok + ~~~~~~~~~~~~ +!!! error TS1214: Identifier expected. '\u{0079}ield' is a reserved word in strict mode. Modules are automatically in strict mode. function *gen() { \u{0079}ield 12; //not ok } diff --git a/testdata/baselines/reference/submodule/conformance/scannerUnicodeEscapeInKeyword2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/scannerUnicodeEscapeInKeyword2.errors.txt.diff index d7419c4341..9d1002506b 100644 --- a/testdata/baselines/reference/submodule/conformance/scannerUnicodeEscapeInKeyword2.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/scannerUnicodeEscapeInKeyword2.errors.txt.diff @@ -9,11 +9,13 @@ -file2.ts(10,5): error TS1260: Keywords cannot contain escape characters. -file2.ts(15,1): error TS1260: Keywords cannot contain escape characters. +file1.ts(1,5): error TS1262: Identifier expected. '\u0061wait' is a reserved word at the top-level of a module. ++file1.ts(6,5): error TS1214: Identifier expected. '\u0079ield' is a reserved word in strict mode. Modules are automatically in strict mode. +file2.ts(3,5): error TS1262: Identifier expected. '\u{0061}wait' is a reserved word at the top-level of a module. ++file2.ts(8,5): error TS1214: Identifier expected. '\u{0079}ield' is a reserved word in strict mode. Modules are automatically in strict mode. -==== file1.ts (3 errors) ==== -+==== file1.ts (1 errors) ==== ++==== file1.ts (2 errors) ==== var \u0061wait = 12; // ok + ~~~~~~~~~~ +!!! error TS1262: Identifier expected. '\u0061wait' is a reserved word at the top-level of a module. @@ -24,6 +26,8 @@ } var \u0079ield = 12; // ok ++ ~~~~~~~~~~ ++!!! error TS1214: Identifier expected. '\u0079ield' is a reserved word in strict mode. Modules are automatically in strict mode. function *gen() { \u0079ield 12; //not ok - ~~~~~~~~~~ @@ -38,7 +42,7 @@ export {}; -==== file2.ts (4 errors) ==== -+==== file2.ts (1 errors) ==== ++==== file2.ts (2 errors) ==== \u{0076}ar x = "hello"; // not ok - ~~~~~~~~~~ -!!! error TS1260: Keywords cannot contain escape characters. @@ -53,6 +57,8 @@ } var \u{0079}ield = 12; // ok ++ ~~~~~~~~~~~~ ++!!! error TS1214: Identifier expected. '\u{0079}ield' is a reserved word in strict mode. Modules are automatically in strict mode. function *gen() { \u{0079}ield 12; //not ok - ~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/typedefOnStatements.errors.txt b/testdata/baselines/reference/submodule/conformance/typedefOnStatements.errors.txt index 696bd4aaa3..d0fafef40c 100644 --- a/testdata/baselines/reference/submodule/conformance/typedefOnStatements.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/typedefOnStatements.errors.txt @@ -1,5 +1,6 @@ typedefOnStatements.js(26,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. typedefOnStatements.js(31,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. +typedefOnStatements.js(33,1): error TS1101: 'with' statements are not allowed in strict mode. typedefOnStatements.js(33,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. typedefOnStatements.js(71,17): error TS7006: Parameter 'a' implicitly has an 'any' type. typedefOnStatements.js(71,19): error TS7006: Parameter 'b' implicitly has an 'any' type. @@ -20,7 +21,7 @@ typedefOnStatements.js(71,47): error TS7006: Parameter 'p' implicitly has an 'an typedefOnStatements.js(71,49): error TS7006: Parameter 'q' implicitly has an 'any' type. -==== typedefOnStatements.js (20 errors) ==== +==== typedefOnStatements.js (21 errors) ==== /** @typedef {{a: string}} A */ ; /** @typedef {{ b: string }} B */ @@ -58,6 +59,8 @@ typedefOnStatements.js(71,49): error TS7006: Parameter 'q' implicitly has an 'an !!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. /** @typedef {{ m: string }} M */ with (name) { + ~~~~ +!!! error TS1101: 'with' statements are not allowed in strict mode. ~~~~~~~~~~~ !!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. } diff --git a/testdata/baselines/reference/submodule/conformance/typedefOnStatements.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typedefOnStatements.errors.txt.diff index 0c269f295f..3895c73bfa 100644 --- a/testdata/baselines/reference/submodule/conformance/typedefOnStatements.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/typedefOnStatements.errors.txt.diff @@ -1,9 +1,8 @@ --- old.typedefOnStatements.errors.txt +++ new.typedefOnStatements.errors.txt -@@= skipped -0, +0 lines =@@ - typedefOnStatements.js(26,1): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. +@@= skipped -1, +1 lines =@@ typedefOnStatements.js(31,1): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. --typedefOnStatements.js(33,1): error TS1101: 'with' statements are not allowed in strict mode. + typedefOnStatements.js(33,1): error TS1101: 'with' statements are not allowed in strict mode. typedefOnStatements.js(33,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +typedefOnStatements.js(71,17): error TS7006: Parameter 'a' implicitly has an 'any' type. +typedefOnStatements.js(71,19): error TS7006: Parameter 'b' implicitly has an 'any' type. @@ -25,20 +24,11 @@ -==== typedefOnStatements.js (4 errors) ==== -+==== typedefOnStatements.js (20 errors) ==== ++==== typedefOnStatements.js (21 errors) ==== /** @typedef {{a: string}} A */ ; /** @typedef {{ b: string }} B */ -@@= skipped -41, +57 lines =@@ - !!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. - /** @typedef {{ m: string }} M */ - with (name) { -- ~~~~ --!!! error TS1101: 'with' statements are not allowed in strict mode. - ~~~~~~~~~~~ - !!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - } -@@= skipped -42, +40 lines =@@ +@@= skipped -82, +99 lines =@@ * @param {Q} q */ function proof (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) { From 3025be247ddfb524ce90f0ab953a05d1ac8d070f Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 08:47:45 -0700 Subject: [PATCH 14/31] Fix typo in checkPropertyAccessExpressionOrQualifiedName --- internal/checker/checker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index daa16c96cd..500bef3866 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -10448,7 +10448,7 @@ func (c *Checker) checkPropertyAccessChain(node *ast.Node, checkMode CheckMode) } func (c *Checker) checkPropertyAccessExpressionOrQualifiedName(node *ast.Node, left *ast.Node, leftType *Type, right *ast.Node, checkMode CheckMode, writeOnly bool) *Type { - parentSymbol := c.typeNodeLinks.Get(node).resolvedSymbol + parentSymbol := c.typeNodeLinks.Get(left).resolvedSymbol assignmentKind := getAssignmentTargetKind(node) widenedType := leftType if assignmentKind != AssignmentKindNone || c.isMethodAccessForCall(node) { From 2508f30b178982b1d7f0f9c6dc0b40ea061862cc Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 08:48:35 -0700 Subject: [PATCH 15/31] Accept new baselines --- ...rGetAccessor(noimplicitany=false).errors.txt | 5 +---- ...ccessor(noimplicitany=false).errors.txt.diff | 17 ----------------- ...arGetAccessor(noimplicitany=true).errors.txt | 5 +---- ...Accessor(noimplicitany=true).errors.txt.diff | 17 ----------------- 4 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=false).errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=true).errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=false).errors.txt b/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=false).errors.txt index 5ae2910d4c..8d09dc35c7 100644 --- a/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=false).errors.txt +++ b/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=false).errors.txt @@ -1,13 +1,10 @@ circularGetAccessor.ts(2,9): error TS2502: 'foo' is referenced directly or indirectly in its own type annotation. -circularGetAccessor.ts(2,23): error TS2304: Cannot find name 'this'. -==== circularGetAccessor.ts (2 errors) ==== +==== circularGetAccessor.ts (1 errors) ==== declare class C { get foo(): typeof this.foo; ~~~ !!! error TS2502: 'foo' is referenced directly or indirectly in its own type annotation. - ~~~~ -!!! error TS2304: Cannot find name 'this'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=false).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=false).errors.txt.diff deleted file mode 100644 index 38fee93e9f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=false).errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.circularGetAccessor(noimplicitany=false).errors.txt -+++ new.circularGetAccessor(noimplicitany=false).errors.txt -@@= skipped -0, +0 lines =@@ - circularGetAccessor.ts(2,9): error TS2502: 'foo' is referenced directly or indirectly in its own type annotation. -+circularGetAccessor.ts(2,23): error TS2304: Cannot find name 'this'. - - --==== circularGetAccessor.ts (1 errors) ==== -+==== circularGetAccessor.ts (2 errors) ==== - declare class C { - get foo(): typeof this.foo; - ~~~ - !!! error TS2502: 'foo' is referenced directly or indirectly in its own type annotation. -+ ~~~~ -+!!! error TS2304: Cannot find name 'this'. - } - diff --git a/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=true).errors.txt b/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=true).errors.txt index 5ae2910d4c..8d09dc35c7 100644 --- a/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=true).errors.txt +++ b/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=true).errors.txt @@ -1,13 +1,10 @@ circularGetAccessor.ts(2,9): error TS2502: 'foo' is referenced directly or indirectly in its own type annotation. -circularGetAccessor.ts(2,23): error TS2304: Cannot find name 'this'. -==== circularGetAccessor.ts (2 errors) ==== +==== circularGetAccessor.ts (1 errors) ==== declare class C { get foo(): typeof this.foo; ~~~ !!! error TS2502: 'foo' is referenced directly or indirectly in its own type annotation. - ~~~~ -!!! error TS2304: Cannot find name 'this'. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=true).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=true).errors.txt.diff deleted file mode 100644 index 2864e41bd3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/circularGetAccessor(noimplicitany=true).errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.circularGetAccessor(noimplicitany=true).errors.txt -+++ new.circularGetAccessor(noimplicitany=true).errors.txt -@@= skipped -0, +0 lines =@@ - circularGetAccessor.ts(2,9): error TS2502: 'foo' is referenced directly or indirectly in its own type annotation. -+circularGetAccessor.ts(2,23): error TS2304: Cannot find name 'this'. - - --==== circularGetAccessor.ts (1 errors) ==== -+==== circularGetAccessor.ts (2 errors) ==== - declare class C { - get foo(): typeof this.foo; - ~~~ - !!! error TS2502: 'foo' is referenced directly or indirectly in its own type annotation. -+ ~~~~ -+!!! error TS2304: Cannot find name 'this'. - } - From 61b57a9c5a1f99561fb1a3538b9ecebc5e6071d0 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 09:00:08 -0700 Subject: [PATCH 16/31] Remove errant quotes --- internal/checker/checker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 500bef3866..7136957694 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -4269,7 +4269,7 @@ basePropertyCheck: for errorNode, memberInfo := range notImplementedInfo { switch { case len(memberInfo.missedProperties) == 1: - missedProperty := "'" + memberInfo.missedProperties[0] + "'" + missedProperty := memberInfo.missedProperties[0] if ast.IsClassExpression(errorNode) { c.error(errorNode, diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, missedProperty, memberInfo.baseTypeName) } else { From f683251f96d558e73381f6e38f3c1c0926ac5b26 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 09:00:32 -0700 Subject: [PATCH 17/31] Accept new baselines --- .../compiler/builtinIterator.errors.txt | 4 +-- .../compiler/builtinIterator.errors.txt.diff | 18 +--------- ...xpressionExtendingAbstractClass.errors.txt | 4 +-- ...sionExtendingAbstractClass.errors.txt.diff | 6 ++-- .../classAbstractDeclarations.d.errors.txt | 12 +++---- ...lassAbstractDeclarations.d.errors.txt.diff | 35 ------------------- .../classAbstractExtends.errors.txt | 4 +-- .../classAbstractExtends.errors.txt.diff | 17 --------- .../classAbstractGeneric.errors.txt | 8 ++--- .../classAbstractGeneric.errors.txt.diff | 28 --------------- .../classAbstractInheritance1.errors.txt | 12 +++---- .../classAbstractInheritance1.errors.txt.diff | 32 ----------------- .../classAbstractInstantiations2.errors.txt | 4 +-- ...assAbstractInstantiations2.errors.txt.diff | 20 ----------- ...assAbstractOverrideWithAbstract.errors.txt | 4 +-- ...stractOverrideWithAbstract.errors.txt.diff | 17 --------- ...ssAbstractUsingAbstractMethods2.errors.txt | 8 ++--- ...tractUsingAbstractMethods2.errors.txt.diff | 29 --------------- .../mixinAbstractClasses.2.errors.txt | 4 +-- .../mixinAbstractClasses.2.errors.txt.diff | 18 ---------- 20 files changed, 35 insertions(+), 249 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractDeclarations.d.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractExtends.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractGeneric.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractInheritance1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractInstantiations2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractOverrideWithAbstract.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractUsingAbstractMethods2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/mixinAbstractClasses.2.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt b/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt index 72a7cf90fc..4606f63224 100644 --- a/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt @@ -1,5 +1,5 @@ builtinIterator.ts(38,1): error TS2511: Cannot create an instance of an abstract class. -builtinIterator.ts(40,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'next' from class 'Iterator'. +builtinIterator.ts(40,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member next from class 'Iterator'. builtinIterator.ts(44,3): error TS2416: Property 'next' in type 'BadIterator1' is not assignable to the same property in base type 'Iterator'. Type '() => { readonly done: false; readonly value: 0; } | { readonly done: true; readonly value: "a string"; }' is not assignable to type '(value?: unknown) => IteratorResult'. Type '{ readonly done: false; readonly value: 0; } | { readonly done: true; readonly value: "a string"; }' is not assignable to type 'IteratorResult'. @@ -84,7 +84,7 @@ builtinIterator.ts(73,35): error TS2322: Type 'Generator {} ~ -!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'next' from class 'Iterator'. +!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member next from class 'Iterator'. // it's unfortunate that these are an error class BadIterator1 extends Iterator { diff --git a/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt.diff index 3075dabdd0..17d5d5aa17 100644 --- a/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt.diff @@ -1,12 +1,5 @@ --- old.builtinIterator.errors.txt +++ new.builtinIterator.errors.txt -@@= skipped -0, +0 lines =@@ - builtinIterator.ts(38,1): error TS2511: Cannot create an instance of an abstract class. --builtinIterator.ts(40,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member next from class 'Iterator'. -+builtinIterator.ts(40,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'next' from class 'Iterator'. - builtinIterator.ts(44,3): error TS2416: Property 'next' in type 'BadIterator1' is not assignable to the same property in base type 'Iterator'. - Type '() => { readonly done: false; readonly value: 0; } | { readonly done: true; readonly value: "a string"; }' is not assignable to type '(value?: unknown) => IteratorResult'. - Type '{ readonly done: false; readonly value: 0; } | { readonly done: true; readonly value: "a string"; }' is not assignable to type 'IteratorResult'. @@= skipped -19, +19 lines =@@ Type '{ done: boolean; value: number; }' is not assignable to type 'IteratorYieldResult'. Types of property 'done' are incompatible. @@ -31,16 +24,7 @@ Types of parameters '__0' and '__0' are incompatible. Type '[] | [undefined]' is not assignable to type '[] | [boolean]'. Type '[undefined]' is not assignable to type '[] | [boolean]'. -@@= skipped -64, +64 lines =@@ - - class C extends Iterator {} - ~ --!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member next from class 'Iterator'. -+!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'next' from class 'Iterator'. - - // it's unfortunate that these are an error - class BadIterator1 extends Iterator { -@@= skipped -55, +55 lines =@@ +@@= skipped -119, +119 lines =@@ declare const g1: Generator; const iter1 = Iterator.from(g1); ~~ diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.errors.txt b/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.errors.txt index 7800ad9524..632883a9f3 100644 --- a/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.errors.txt @@ -1,4 +1,4 @@ -classExpressionExtendingAbstractClass.ts(5,5): error TS2653: Non-abstract class expression does not implement inherited abstract member ''foo'' from class 'A'. +classExpressionExtendingAbstractClass.ts(5,5): error TS2653: Non-abstract class expression does not implement inherited abstract member 'foo' from class 'A'. ==== classExpressionExtendingAbstractClass.ts (1 errors) ==== @@ -8,7 +8,7 @@ classExpressionExtendingAbstractClass.ts(5,5): error TS2653: Non-abstract class var C = class extends A { // no error reported! ~ -!!! error TS2653: Non-abstract class expression does not implement inherited abstract member ''foo'' from class 'A'. +!!! error TS2653: Non-abstract class expression does not implement inherited abstract member 'foo' from class 'A'. }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.errors.txt.diff index 7cc11888b7..bb7e63a5eb 100644 --- a/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.errors.txt.diff @@ -2,7 +2,7 @@ +++ new.classExpressionExtendingAbstractClass.errors.txt @@= skipped -0, +0 lines =@@ -classExpressionExtendingAbstractClass.ts(5,9): error TS2653: Non-abstract class expression does not implement inherited abstract member 'foo' from class 'A'. -+classExpressionExtendingAbstractClass.ts(5,5): error TS2653: Non-abstract class expression does not implement inherited abstract member ''foo'' from class 'A'. ++classExpressionExtendingAbstractClass.ts(5,5): error TS2653: Non-abstract class expression does not implement inherited abstract member 'foo' from class 'A'. ==== classExpressionExtendingAbstractClass.ts (1 errors) ==== @@ -11,9 +11,7 @@ var C = class extends A { // no error reported! - ~~~~~ --!!! error TS2653: Non-abstract class expression does not implement inherited abstract member 'foo' from class 'A'. + ~ -+!!! error TS2653: Non-abstract class expression does not implement inherited abstract member ''foo'' from class 'A'. + !!! error TS2653: Non-abstract class expression does not implement inherited abstract member 'foo' from class 'A'. }; - diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractDeclarations.d.errors.txt b/testdata/baselines/reference/submodule/conformance/classAbstractDeclarations.d.errors.txt index 4dc4d6dda6..581958eb02 100644 --- a/testdata/baselines/reference/submodule/conformance/classAbstractDeclarations.d.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/classAbstractDeclarations.d.errors.txt @@ -1,8 +1,8 @@ classAbstractDeclarations.d.ts(2,5): error TS1242: 'abstract' modifier can only appear on a class, method, or property declaration. classAbstractDeclarations.d.ts(2,28): error TS1183: An implementation cannot be declared in ambient contexts. -classAbstractDeclarations.d.ts(11,15): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'AA'. -classAbstractDeclarations.d.ts(13,15): error TS2515: Non-abstract class 'DD' does not implement inherited abstract member 'foo' from class 'BB'. -classAbstractDeclarations.d.ts(17,15): error TS2515: Non-abstract class 'FF' does not implement inherited abstract member 'foo' from class 'CC'. +classAbstractDeclarations.d.ts(11,15): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'AA'. +classAbstractDeclarations.d.ts(13,15): error TS2515: Non-abstract class 'DD' does not implement inherited abstract member foo from class 'BB'. +classAbstractDeclarations.d.ts(17,15): error TS2515: Non-abstract class 'FF' does not implement inherited abstract member foo from class 'CC'. ==== classAbstractDeclarations.d.ts (5 errors) ==== @@ -22,17 +22,17 @@ classAbstractDeclarations.d.ts(17,15): error TS2515: Non-abstract class 'FF' doe declare class CC extends AA {} ~~ -!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'AA'. +!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'AA'. declare class DD extends BB {} ~~ -!!! error TS2515: Non-abstract class 'DD' does not implement inherited abstract member 'foo' from class 'BB'. +!!! error TS2515: Non-abstract class 'DD' does not implement inherited abstract member foo from class 'BB'. declare abstract class EE extends BB {} declare class FF extends CC {} ~~ -!!! error TS2515: Non-abstract class 'FF' does not implement inherited abstract member 'foo' from class 'CC'. +!!! error TS2515: Non-abstract class 'FF' does not implement inherited abstract member foo from class 'CC'. declare abstract class GG extends CC {} diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractDeclarations.d.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classAbstractDeclarations.d.errors.txt.diff deleted file mode 100644 index e2916e2bfd..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classAbstractDeclarations.d.errors.txt.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- old.classAbstractDeclarations.d.errors.txt -+++ new.classAbstractDeclarations.d.errors.txt -@@= skipped -0, +0 lines =@@ - classAbstractDeclarations.d.ts(2,5): error TS1242: 'abstract' modifier can only appear on a class, method, or property declaration. - classAbstractDeclarations.d.ts(2,28): error TS1183: An implementation cannot be declared in ambient contexts. --classAbstractDeclarations.d.ts(11,15): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'AA'. --classAbstractDeclarations.d.ts(13,15): error TS2515: Non-abstract class 'DD' does not implement inherited abstract member foo from class 'BB'. --classAbstractDeclarations.d.ts(17,15): error TS2515: Non-abstract class 'FF' does not implement inherited abstract member foo from class 'CC'. -+classAbstractDeclarations.d.ts(11,15): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'AA'. -+classAbstractDeclarations.d.ts(13,15): error TS2515: Non-abstract class 'DD' does not implement inherited abstract member 'foo' from class 'BB'. -+classAbstractDeclarations.d.ts(17,15): error TS2515: Non-abstract class 'FF' does not implement inherited abstract member 'foo' from class 'CC'. - - - ==== classAbstractDeclarations.d.ts (5 errors) ==== -@@= skipped -21, +21 lines =@@ - - declare class CC extends AA {} - ~~ --!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'AA'. -+!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'AA'. - - declare class DD extends BB {} - ~~ --!!! error TS2515: Non-abstract class 'DD' does not implement inherited abstract member foo from class 'BB'. -+!!! error TS2515: Non-abstract class 'DD' does not implement inherited abstract member 'foo' from class 'BB'. - - declare abstract class EE extends BB {} - - declare class FF extends CC {} - ~~ --!!! error TS2515: Non-abstract class 'FF' does not implement inherited abstract member foo from class 'CC'. -+!!! error TS2515: Non-abstract class 'FF' does not implement inherited abstract member 'foo' from class 'CC'. - - declare abstract class GG extends CC {} - diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractExtends.errors.txt b/testdata/baselines/reference/submodule/conformance/classAbstractExtends.errors.txt index 3884db4f7c..c740843f17 100644 --- a/testdata/baselines/reference/submodule/conformance/classAbstractExtends.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/classAbstractExtends.errors.txt @@ -1,4 +1,4 @@ -classAbstractExtends.ts(9,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'bar' from class 'B'. +classAbstractExtends.ts(9,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member bar from class 'B'. ==== classAbstractExtends.ts (1 errors) ==== @@ -12,7 +12,7 @@ classAbstractExtends.ts(9,7): error TS2515: Non-abstract class 'C' does not impl class C extends B { } ~ -!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'bar' from class 'B'. +!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member bar from class 'B'. abstract class D extends B {} diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractExtends.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classAbstractExtends.errors.txt.diff deleted file mode 100644 index 78ab2a3ff7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classAbstractExtends.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.classAbstractExtends.errors.txt -+++ new.classAbstractExtends.errors.txt -@@= skipped -0, +0 lines =@@ --classAbstractExtends.ts(9,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member bar from class 'B'. -+classAbstractExtends.ts(9,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'bar' from class 'B'. - - - ==== classAbstractExtends.ts (1 errors) ==== -@@= skipped -11, +11 lines =@@ - - class C extends B { } - ~ --!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member bar from class 'B'. -+!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'bar' from class 'B'. - - abstract class D extends B {} - diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractGeneric.errors.txt b/testdata/baselines/reference/submodule/conformance/classAbstractGeneric.errors.txt index dd3619a835..0824c9d4c5 100644 --- a/testdata/baselines/reference/submodule/conformance/classAbstractGeneric.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/classAbstractGeneric.errors.txt @@ -1,7 +1,7 @@ classAbstractGeneric.ts(10,7): error TS2654: Non-abstract class 'C' is missing implementations for the following members of 'A': 'foo', 'bar'. classAbstractGeneric.ts(12,7): error TS2654: Non-abstract class 'D' is missing implementations for the following members of 'A': 'foo', 'bar'. -classAbstractGeneric.ts(14,7): error TS2515: Non-abstract class 'E' does not implement inherited abstract member 'bar' from class 'A'. -classAbstractGeneric.ts(18,7): error TS2515: Non-abstract class 'F' does not implement inherited abstract member 'foo' from class 'A'. +classAbstractGeneric.ts(14,7): error TS2515: Non-abstract class 'E' does not implement inherited abstract member bar from class 'A'. +classAbstractGeneric.ts(18,7): error TS2515: Non-abstract class 'F' does not implement inherited abstract member foo from class 'A'. ==== classAbstractGeneric.ts (4 errors) ==== @@ -24,13 +24,13 @@ classAbstractGeneric.ts(18,7): error TS2515: Non-abstract class 'F' does not class E extends A { // error -- doesn't implement bar ~ -!!! error TS2515: Non-abstract class 'E' does not implement inherited abstract member 'bar' from class 'A'. +!!! error TS2515: Non-abstract class 'E' does not implement inherited abstract member bar from class 'A'. foo() { return this.t; } } class F extends A { // error -- doesn't implement foo ~ -!!! error TS2515: Non-abstract class 'F' does not implement inherited abstract member 'foo' from class 'A'. +!!! error TS2515: Non-abstract class 'F' does not implement inherited abstract member foo from class 'A'. bar(t : T) {} } diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractGeneric.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classAbstractGeneric.errors.txt.diff deleted file mode 100644 index c92cf3d1e7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classAbstractGeneric.errors.txt.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.classAbstractGeneric.errors.txt -+++ new.classAbstractGeneric.errors.txt -@@= skipped -0, +0 lines =@@ - classAbstractGeneric.ts(10,7): error TS2654: Non-abstract class 'C' is missing implementations for the following members of 'A': 'foo', 'bar'. - classAbstractGeneric.ts(12,7): error TS2654: Non-abstract class 'D' is missing implementations for the following members of 'A': 'foo', 'bar'. --classAbstractGeneric.ts(14,7): error TS2515: Non-abstract class 'E' does not implement inherited abstract member bar from class 'A'. --classAbstractGeneric.ts(18,7): error TS2515: Non-abstract class 'F' does not implement inherited abstract member foo from class 'A'. -+classAbstractGeneric.ts(14,7): error TS2515: Non-abstract class 'E' does not implement inherited abstract member 'bar' from class 'A'. -+classAbstractGeneric.ts(18,7): error TS2515: Non-abstract class 'F' does not implement inherited abstract member 'foo' from class 'A'. - - - ==== classAbstractGeneric.ts (4 errors) ==== -@@= skipped -23, +23 lines =@@ - - class E extends A { // error -- doesn't implement bar - ~ --!!! error TS2515: Non-abstract class 'E' does not implement inherited abstract member bar from class 'A'. -+!!! error TS2515: Non-abstract class 'E' does not implement inherited abstract member 'bar' from class 'A'. - foo() { return this.t; } - } - - class F extends A { // error -- doesn't implement foo - ~ --!!! error TS2515: Non-abstract class 'F' does not implement inherited abstract member foo from class 'A'. -+!!! error TS2515: Non-abstract class 'F' does not implement inherited abstract member 'foo' from class 'A'. - bar(t : T) {} - } - diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractInheritance1.errors.txt b/testdata/baselines/reference/submodule/conformance/classAbstractInheritance1.errors.txt index ab410b2bc9..14055613fe 100644 --- a/testdata/baselines/reference/submodule/conformance/classAbstractInheritance1.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/classAbstractInheritance1.errors.txt @@ -1,6 +1,6 @@ -classAbstractInheritance1.ts(13,7): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'AA'. -classAbstractInheritance1.ts(15,7): error TS2515: Non-abstract class 'DD' does not implement inherited abstract member 'foo' from class 'BB'. -classAbstractInheritance1.ts(19,7): error TS2515: Non-abstract class 'FF' does not implement inherited abstract member 'foo' from class 'CC'. +classAbstractInheritance1.ts(13,7): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'AA'. +classAbstractInheritance1.ts(15,7): error TS2515: Non-abstract class 'DD' does not implement inherited abstract member foo from class 'BB'. +classAbstractInheritance1.ts(19,7): error TS2515: Non-abstract class 'FF' does not implement inherited abstract member foo from class 'CC'. ==== classAbstractInheritance1.ts (3 errors) ==== @@ -18,16 +18,16 @@ classAbstractInheritance1.ts(19,7): error TS2515: Non-abstract class 'FF' does n class CC extends AA {} ~~ -!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'AA'. +!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'AA'. class DD extends BB {} ~~ -!!! error TS2515: Non-abstract class 'DD' does not implement inherited abstract member 'foo' from class 'BB'. +!!! error TS2515: Non-abstract class 'DD' does not implement inherited abstract member foo from class 'BB'. abstract class EE extends BB {} class FF extends CC {} ~~ -!!! error TS2515: Non-abstract class 'FF' does not implement inherited abstract member 'foo' from class 'CC'. +!!! error TS2515: Non-abstract class 'FF' does not implement inherited abstract member foo from class 'CC'. abstract class GG extends CC {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractInheritance1.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classAbstractInheritance1.errors.txt.diff deleted file mode 100644 index 796c21e107..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classAbstractInheritance1.errors.txt.diff +++ /dev/null @@ -1,32 +0,0 @@ ---- old.classAbstractInheritance1.errors.txt -+++ new.classAbstractInheritance1.errors.txt -@@= skipped -0, +0 lines =@@ --classAbstractInheritance1.ts(13,7): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'AA'. --classAbstractInheritance1.ts(15,7): error TS2515: Non-abstract class 'DD' does not implement inherited abstract member foo from class 'BB'. --classAbstractInheritance1.ts(19,7): error TS2515: Non-abstract class 'FF' does not implement inherited abstract member foo from class 'CC'. -+classAbstractInheritance1.ts(13,7): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'AA'. -+classAbstractInheritance1.ts(15,7): error TS2515: Non-abstract class 'DD' does not implement inherited abstract member 'foo' from class 'BB'. -+classAbstractInheritance1.ts(19,7): error TS2515: Non-abstract class 'FF' does not implement inherited abstract member 'foo' from class 'CC'. - - - ==== classAbstractInheritance1.ts (3 errors) ==== -@@= skipped -17, +17 lines =@@ - - class CC extends AA {} - ~~ --!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'AA'. -+!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'AA'. - - class DD extends BB {} - ~~ --!!! error TS2515: Non-abstract class 'DD' does not implement inherited abstract member foo from class 'BB'. -+!!! error TS2515: Non-abstract class 'DD' does not implement inherited abstract member 'foo' from class 'BB'. - - abstract class EE extends BB {} - - class FF extends CC {} - ~~ --!!! error TS2515: Non-abstract class 'FF' does not implement inherited abstract member foo from class 'CC'. -+!!! error TS2515: Non-abstract class 'FF' does not implement inherited abstract member 'foo' from class 'CC'. - - abstract class GG extends CC {} diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractInstantiations2.errors.txt b/testdata/baselines/reference/submodule/conformance/classAbstractInstantiations2.errors.txt index 8991168d50..e07d75144f 100644 --- a/testdata/baselines/reference/submodule/conformance/classAbstractInstantiations2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/classAbstractInstantiations2.errors.txt @@ -4,7 +4,7 @@ classAbstractInstantiations2.ts(13,5): error TS2322: Type 'typeof B' is not assi classAbstractInstantiations2.ts(17,5): error TS2511: Cannot create an instance of an abstract class. classAbstractInstantiations2.ts(21,1): error TS2511: Cannot create an instance of an abstract class. classAbstractInstantiations2.ts(23,15): error TS2449: Class 'C' used before its declaration. -classAbstractInstantiations2.ts(26,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'bar' from class 'B'. +classAbstractInstantiations2.ts(26,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member bar from class 'B'. classAbstractInstantiations2.ts(46,5): error TS2391: Function implementation is missing or not immediately following the declaration. classAbstractInstantiations2.ts(46,5): error TS2512: Overload signatures must all be abstract or non-abstract. classAbstractInstantiations2.ts(50,5): error TS1244: Abstract methods can only appear within an abstract class. @@ -50,7 +50,7 @@ classAbstractInstantiations2.ts(50,5): error TS1244: Abstract methods can only a class C extends B { } // error -- not declared abstract ~ -!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'bar' from class 'B'. +!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member bar from class 'B'. abstract class D extends B { } // okay diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractInstantiations2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classAbstractInstantiations2.errors.txt.diff deleted file mode 100644 index ea400f2327..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classAbstractInstantiations2.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.classAbstractInstantiations2.errors.txt -+++ new.classAbstractInstantiations2.errors.txt -@@= skipped -3, +3 lines =@@ - classAbstractInstantiations2.ts(17,5): error TS2511: Cannot create an instance of an abstract class. - classAbstractInstantiations2.ts(21,1): error TS2511: Cannot create an instance of an abstract class. - classAbstractInstantiations2.ts(23,15): error TS2449: Class 'C' used before its declaration. --classAbstractInstantiations2.ts(26,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member bar from class 'B'. -+classAbstractInstantiations2.ts(26,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'bar' from class 'B'. - classAbstractInstantiations2.ts(46,5): error TS2391: Function implementation is missing or not immediately following the declaration. - classAbstractInstantiations2.ts(46,5): error TS2512: Overload signatures must all be abstract or non-abstract. - classAbstractInstantiations2.ts(50,5): error TS1244: Abstract methods can only appear within an abstract class. -@@= skipped -46, +46 lines =@@ - - class C extends B { } // error -- not declared abstract - ~ --!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member bar from class 'B'. -+!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member 'bar' from class 'B'. - - abstract class D extends B { } // okay - diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractOverrideWithAbstract.errors.txt b/testdata/baselines/reference/submodule/conformance/classAbstractOverrideWithAbstract.errors.txt index 3250db5a41..3293a5fbd1 100644 --- a/testdata/baselines/reference/submodule/conformance/classAbstractOverrideWithAbstract.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/classAbstractOverrideWithAbstract.errors.txt @@ -1,4 +1,4 @@ -classAbstractOverrideWithAbstract.ts(19,7): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'BB'. +classAbstractOverrideWithAbstract.ts(19,7): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'BB'. ==== classAbstractOverrideWithAbstract.ts (1 errors) ==== @@ -22,7 +22,7 @@ classAbstractOverrideWithAbstract.ts(19,7): error TS2515: Non-abstract class 'CC class CC extends BB {} // error ~~ -!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'BB'. +!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'BB'. class DD extends BB { foo() {} diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractOverrideWithAbstract.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classAbstractOverrideWithAbstract.errors.txt.diff deleted file mode 100644 index 2e75e7ce8a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classAbstractOverrideWithAbstract.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.classAbstractOverrideWithAbstract.errors.txt -+++ new.classAbstractOverrideWithAbstract.errors.txt -@@= skipped -0, +0 lines =@@ --classAbstractOverrideWithAbstract.ts(19,7): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'BB'. -+classAbstractOverrideWithAbstract.ts(19,7): error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'BB'. - - - ==== classAbstractOverrideWithAbstract.ts (1 errors) ==== -@@= skipped -21, +21 lines =@@ - - class CC extends BB {} // error - ~~ --!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member foo from class 'BB'. -+!!! error TS2515: Non-abstract class 'CC' does not implement inherited abstract member 'foo' from class 'BB'. - - class DD extends BB { - foo() {} diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractUsingAbstractMethods2.errors.txt b/testdata/baselines/reference/submodule/conformance/classAbstractUsingAbstractMethods2.errors.txt index b7961acb3a..34d37e1386 100644 --- a/testdata/baselines/reference/submodule/conformance/classAbstractUsingAbstractMethods2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/classAbstractUsingAbstractMethods2.errors.txt @@ -1,6 +1,6 @@ classAbstractUsingAbstractMethods2.ts(2,5): error TS1244: Abstract methods can only appear within an abstract class. -classAbstractUsingAbstractMethods2.ts(5,7): error TS2515: Non-abstract class 'B' does not implement inherited abstract member 'foo' from class 'A'. -classAbstractUsingAbstractMethods2.ts(21,7): error TS2515: Non-abstract class 'BB' does not implement inherited abstract member 'foo' from class 'AA'. +classAbstractUsingAbstractMethods2.ts(5,7): error TS2515: Non-abstract class 'B' does not implement inherited abstract member foo from class 'A'. +classAbstractUsingAbstractMethods2.ts(21,7): error TS2515: Non-abstract class 'BB' does not implement inherited abstract member foo from class 'AA'. ==== classAbstractUsingAbstractMethods2.ts (3 errors) ==== @@ -12,7 +12,7 @@ classAbstractUsingAbstractMethods2.ts(21,7): error TS2515: Non-abstract class 'B class B extends A {} ~ -!!! error TS2515: Non-abstract class 'B' does not implement inherited abstract member 'foo' from class 'A'. +!!! error TS2515: Non-abstract class 'B' does not implement inherited abstract member foo from class 'A'. abstract class C extends A {} @@ -30,7 +30,7 @@ classAbstractUsingAbstractMethods2.ts(21,7): error TS2515: Non-abstract class 'B class BB extends AA {} ~~ -!!! error TS2515: Non-abstract class 'BB' does not implement inherited abstract member 'foo' from class 'AA'. +!!! error TS2515: Non-abstract class 'BB' does not implement inherited abstract member foo from class 'AA'. abstract class CC extends AA {} diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractUsingAbstractMethods2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/classAbstractUsingAbstractMethods2.errors.txt.diff deleted file mode 100644 index 88d2c3b44c..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classAbstractUsingAbstractMethods2.errors.txt.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- old.classAbstractUsingAbstractMethods2.errors.txt -+++ new.classAbstractUsingAbstractMethods2.errors.txt -@@= skipped -0, +0 lines =@@ - classAbstractUsingAbstractMethods2.ts(2,5): error TS1244: Abstract methods can only appear within an abstract class. --classAbstractUsingAbstractMethods2.ts(5,7): error TS2515: Non-abstract class 'B' does not implement inherited abstract member foo from class 'A'. --classAbstractUsingAbstractMethods2.ts(21,7): error TS2515: Non-abstract class 'BB' does not implement inherited abstract member foo from class 'AA'. -+classAbstractUsingAbstractMethods2.ts(5,7): error TS2515: Non-abstract class 'B' does not implement inherited abstract member 'foo' from class 'A'. -+classAbstractUsingAbstractMethods2.ts(21,7): error TS2515: Non-abstract class 'BB' does not implement inherited abstract member 'foo' from class 'AA'. - - - ==== classAbstractUsingAbstractMethods2.ts (3 errors) ==== -@@= skipped -11, +11 lines =@@ - - class B extends A {} - ~ --!!! error TS2515: Non-abstract class 'B' does not implement inherited abstract member foo from class 'A'. -+!!! error TS2515: Non-abstract class 'B' does not implement inherited abstract member 'foo' from class 'A'. - - abstract class C extends A {} - -@@= skipped -18, +18 lines =@@ - - class BB extends AA {} - ~~ --!!! error TS2515: Non-abstract class 'BB' does not implement inherited abstract member foo from class 'AA'. -+!!! error TS2515: Non-abstract class 'BB' does not implement inherited abstract member 'foo' from class 'AA'. - - abstract class CC extends AA {} - diff --git a/testdata/baselines/reference/submodule/conformance/mixinAbstractClasses.2.errors.txt b/testdata/baselines/reference/submodule/conformance/mixinAbstractClasses.2.errors.txt index 55236f28f5..0d7b085ede 100644 --- a/testdata/baselines/reference/submodule/conformance/mixinAbstractClasses.2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/mixinAbstractClasses.2.errors.txt @@ -1,5 +1,5 @@ mixinAbstractClasses.2.ts(7,11): error TS2797: A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'. -mixinAbstractClasses.2.ts(21,7): error TS2515: Non-abstract class 'DerivedFromAbstract' does not implement inherited abstract member 'abstractBaseMethod' from class 'AbstractBase & Mixin'. +mixinAbstractClasses.2.ts(21,7): error TS2515: Non-abstract class 'DerivedFromAbstract' does not implement inherited abstract member abstractBaseMethod from class 'AbstractBase & Mixin'. mixinAbstractClasses.2.ts(25,1): error TS2511: Cannot create an instance of an abstract class. @@ -28,7 +28,7 @@ mixinAbstractClasses.2.ts(25,1): error TS2511: Cannot create an instance of an a // error expected: Non-abstract class 'DerivedFromAbstract' does not implement inherited abstract member 'abstractBaseMethod' from class 'AbstractBase & Mixin'. class DerivedFromAbstract extends MixedBase { ~~~~~~~~~~~~~~~~~~~ -!!! error TS2515: Non-abstract class 'DerivedFromAbstract' does not implement inherited abstract member 'abstractBaseMethod' from class 'AbstractBase & Mixin'. +!!! error TS2515: Non-abstract class 'DerivedFromAbstract' does not implement inherited abstract member abstractBaseMethod from class 'AbstractBase & Mixin'. } // error expected: Cannot create an instance of an abstract class. diff --git a/testdata/baselines/reference/submodule/conformance/mixinAbstractClasses.2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/mixinAbstractClasses.2.errors.txt.diff deleted file mode 100644 index 469a079142..0000000000 --- a/testdata/baselines/reference/submodule/conformance/mixinAbstractClasses.2.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.mixinAbstractClasses.2.errors.txt -+++ new.mixinAbstractClasses.2.errors.txt -@@= skipped -0, +0 lines =@@ - mixinAbstractClasses.2.ts(7,11): error TS2797: A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'. --mixinAbstractClasses.2.ts(21,7): error TS2515: Non-abstract class 'DerivedFromAbstract' does not implement inherited abstract member abstractBaseMethod from class 'AbstractBase & Mixin'. -+mixinAbstractClasses.2.ts(21,7): error TS2515: Non-abstract class 'DerivedFromAbstract' does not implement inherited abstract member 'abstractBaseMethod' from class 'AbstractBase & Mixin'. - mixinAbstractClasses.2.ts(25,1): error TS2511: Cannot create an instance of an abstract class. - - -@@= skipped -27, +27 lines =@@ - // error expected: Non-abstract class 'DerivedFromAbstract' does not implement inherited abstract member 'abstractBaseMethod' from class 'AbstractBase & Mixin'. - class DerivedFromAbstract extends MixedBase { - ~~~~~~~~~~~~~~~~~~~ --!!! error TS2515: Non-abstract class 'DerivedFromAbstract' does not implement inherited abstract member abstractBaseMethod from class 'AbstractBase & Mixin'. -+!!! error TS2515: Non-abstract class 'DerivedFromAbstract' does not implement inherited abstract member 'abstractBaseMethod' from class 'AbstractBase & Mixin'. - } - - // error expected: Cannot create an instance of an abstract class. From fd94aade049c5bcb48b871954ef97c7d59e3fcd7 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 10:15:21 -0700 Subject: [PATCH 18/31] Print qualified name with typeof when requested --- internal/checker/printer.go | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/internal/checker/printer.go b/internal/checker/printer.go index 3011944c43..8f85af211a 100644 --- a/internal/checker/printer.go +++ b/internal/checker/printer.go @@ -122,9 +122,9 @@ func (p *Printer) printName(symbol *ast.Symbol) { p.print(p.c.symbolToString(symbol)) } -func (p *Printer) printTypeName(symbol *ast.Symbol) { +func (p *Printer) printQualifiedName(symbol *ast.Symbol) { if p.flags&TypeFormatFlagsUseFullyQualifiedType != 0 && symbol.Parent != nil { - p.printTypeName(symbol.Parent) + p.printQualifiedName(symbol.Parent) p.print(".") } if symbol.Flags&ast.SymbolFlagsModule != 0 && strings.HasPrefix(symbol.Name, "\"") { @@ -148,7 +148,7 @@ func (p *Printer) printTypeEx(t *Type, precedence ast.TypePrecedence) { func (p *Printer) printType(t *Type) { if t.alias != nil && (p.flags&TypeFormatFlagsInTypeAlias == 0 || p.depth > 0) { - p.printTypeName(t.alias.symbol) + p.printQualifiedName(t.alias.symbol) p.printTypeArguments(t.alias.typeArguments) } else { p.printTypeNoAlias(t) @@ -267,14 +267,14 @@ func (p *Printer) printStringMappingType(t *Type) { func (p *Printer) printEnumLiteral(t *Type) { if parent := p.c.getParentOfSymbol(t.symbol); parent != nil { - p.printTypeName(parent) + p.printQualifiedName(parent) if p.c.getDeclaredTypeOfSymbol(parent) != t { p.print(".") p.printName(t.symbol) } return } - p.printTypeName(t.symbol) + p.printQualifiedName(t.symbol) } func (p *Printer) printObjectType(t *Type) { @@ -282,7 +282,7 @@ func (p *Printer) printObjectType(t *Type) { case t.objectFlags&ObjectFlagsReference != 0: p.printParameterizedType(t) case t.objectFlags&ObjectFlagsClassOrInterface != 0: - p.printTypeName(t.symbol) + p.printQualifiedName(t.symbol) case p.c.isGenericMappedType(t) || t.objectFlags&ObjectFlagsMapped != 0 && t.AsMappedType().containsError: p.printMappedType(t) default: @@ -302,7 +302,7 @@ func (p *Printer) printParameterizedType(t *Type) { } func (p *Printer) printTypeReference(t *Type) { - p.printTypeName(t.symbol) + p.printQualifiedName(t.symbol) p.printTypeArguments(p.c.getTypeArguments(t)[:p.c.getTypeReferenceArity(t)]) } @@ -376,13 +376,7 @@ func (p *Printer) printAnonymousType(t *Type) { if t.symbol.Flags&(ast.SymbolFlagsClass|ast.SymbolFlagsEnum|ast.SymbolFlagsValueModule) != 0 { if t == p.c.getTypeOfSymbol(t.symbol) { p.print("typeof ") - if t.symbol.Flags&ast.SymbolFlagsValueModule != 0 && t.symbol.Name[0] == '"' { - p.print("import(") - p.print(t.symbol.Name) - p.print(")") - } else { - p.printName(t.symbol) - } + p.printQualifiedName(t.symbol) return } } @@ -531,7 +525,7 @@ func (p *Printer) printUnionType(t *Type) { case t.flags&TypeFlagsBoolean != 0: p.print("boolean") case t.flags&TypeFlagsEnumLiteral != 0: - p.printTypeName(t.symbol) + p.printQualifiedName(t.symbol) default: u := t.AsUnionType() if u.origin != nil { From 5c81e826b2a96bc7f58e238f7def30bd81b57e6f Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 10:15:45 -0700 Subject: [PATCH 19/31] Accept new baselines --- .../compiler/clodulesDerivedClasses.errors.txt | 4 ++-- .../compiler/clodulesDerivedClasses.errors.txt.diff | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt index 6a2b363d2c..e74e0856ee 100644 --- a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt @@ -1,6 +1,6 @@ clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' incorrectly extends base class static side '{ Utils: typeof Utils; prototype: Shape; }'. Types of property 'Utils' are incompatible. - Property 'convert' is missing in type 'typeof Utils' but required in type 'typeof Utils'. + Property 'convert' is missing in type 'typeof Path.Utils' but required in type 'typeof Shape.Utils'. ==== clodulesDerivedClasses.ts (1 errors) ==== @@ -16,7 +16,7 @@ clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' in ~~~~ !!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side '{ Utils: typeof Utils; prototype: Shape; }'. !!! error TS2417: Types of property 'Utils' are incompatible. -!!! error TS2417: Property 'convert' is missing in type 'typeof Utils' but required in type 'typeof Utils'. +!!! error TS2417: Property 'convert' is missing in type 'typeof Path.Utils' but required in type 'typeof Shape.Utils'. !!! related TS2728 clodulesDerivedClasses.ts:6:21: 'convert' is declared here. name: string; diff --git a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt.diff index 32050be43e..ebb3c67436 100644 --- a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt.diff @@ -4,11 +4,8 @@ -clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'. +clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' incorrectly extends base class static side '{ Utils: typeof Utils; prototype: Shape; }'. Types of property 'Utils' are incompatible. -- Property 'convert' is missing in type 'typeof Path.Utils' but required in type 'typeof Shape.Utils'. -+ Property 'convert' is missing in type 'typeof Utils' but required in type 'typeof Utils'. + Property 'convert' is missing in type 'typeof Path.Utils' but required in type 'typeof Shape.Utils'. - - ==== clodulesDerivedClasses.ts (1 errors) ==== @@= skipped -13, +13 lines =@@ class Path extends Shape { @@ -16,8 +13,5 @@ -!!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape'. +!!! error TS2417: Class static side 'typeof Path' incorrectly extends base class static side '{ Utils: typeof Utils; prototype: Shape; }'. !!! error TS2417: Types of property 'Utils' are incompatible. --!!! error TS2417: Property 'convert' is missing in type 'typeof Path.Utils' but required in type 'typeof Shape.Utils'. -+!!! error TS2417: Property 'convert' is missing in type 'typeof Utils' but required in type 'typeof Utils'. + !!! error TS2417: Property 'convert' is missing in type 'typeof Path.Utils' but required in type 'typeof Shape.Utils'. !!! related TS2728 clodulesDerivedClasses.ts:6:21: 'convert' is declared here. - name: string; - From bcbbf564fae93925b5c956ebb22cefb8c44c9593 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 10:54:02 -0700 Subject: [PATCH 20/31] Port misspelled keyword suggestion logic --- internal/parser/parser.go | 26 ++++++++++++++++++++------ internal/scanner/scanner.go | 10 ++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/internal/parser/parser.go b/internal/parser/parser.go index 977305a150..f6655e8f23 100644 --- a/internal/parser/parser.go +++ b/internal/parser/parser.go @@ -77,6 +77,8 @@ type Parser struct { jsdocTagCommentsSpace []string } +var viableKeywordSuggestions = scanner.GetViableKeywordSuggestions() + var parserPool = sync.Pool{ New: func() any { return &Parser{} @@ -1874,12 +1876,15 @@ func (p *Parser) parseErrorForMissingSemicolonAfter(node *ast.Node) { p.parseErrorForInvalidName(diagnostics.Type_alias_name_cannot_be_0, diagnostics.Type_alias_must_be_given_a_name, ast.KindEqualsToken) return } - // !!! The user alternatively might have misspelled or forgotten to add a space after a common keyword. - // const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions, identity) ?? getSpaceSuggestion(expressionText); - // if (suggestion) { - // parseErrorAt(pos, node.end, Diagnostics.Unknown_keyword_or_identifier_Did_you_mean_0, suggestion); - // return; - // } + // The user alternatively might have misspelled or forgotten to add a space after a common keyword. + suggestion := core.GetSpellingSuggestion(expressionText, viableKeywordSuggestions, func(s string) string { return s }) + if suggestion == "" { + suggestion = getSpaceSuggestion(expressionText) + } + if suggestion != "" { + p.parseErrorAt(pos, node.End(), diagnostics.Unknown_keyword_or_identifier_Did_you_mean_0, suggestion) + return + } // Unknown tokens are handled with their own errors in the scanner if p.token == ast.KindUnknown { return @@ -1888,6 +1893,15 @@ func (p *Parser) parseErrorForMissingSemicolonAfter(node *ast.Node) { p.parseErrorAt(pos, node.End(), diagnostics.Unexpected_keyword_or_identifier) } +func getSpaceSuggestion(expressionText string) string { + for _, keyword := range viableKeywordSuggestions { + if len(expressionText) > len(keyword)+2 && strings.HasPrefix(expressionText, keyword) { + return keyword + " " + expressionText[len(keyword):] + } + } + return "" +} + func (p *Parser) parseErrorForInvalidName(nameDiagnostic *diagnostics.Message, blankDiagnostic *diagnostics.Message, tokenIfBlankName ast.Kind) { if p.token == tokenIfBlankName { p.parseErrorAtCurrentToken(blankDiagnostic) diff --git a/internal/scanner/scanner.go b/internal/scanner/scanner.go index 908a34104d..e3de9c0751 100644 --- a/internal/scanner/scanner.go +++ b/internal/scanner/scanner.go @@ -1962,6 +1962,16 @@ func TokenToString(token ast.Kind) string { return tokenToText[token] } +func GetViableKeywordSuggestions() []string { + result := make([]string, 0, len(textToKeyword)) + for text := range textToKeyword { + if len(text) > 2 { + result = append(result, text) + } + } + return result +} + func couldStartTrivia(text string, pos int) bool { // Keep in sync with skipTrivia switch ch := text[pos]; ch { From 789c09ac841e85e4ddb78af55921ffe8da01acd1 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 10:54:28 -0700 Subject: [PATCH 21/31] Accept new baselines --- .../commonMissingSemicolons.errors.txt | 76 +++--- .../commonMissingSemicolons.errors.txt.diff | 240 ------------------ .../parserUnterminatedGeneric2.errors.txt | 4 +- ...parserUnterminatedGeneric2.errors.txt.diff | 17 -- 4 files changed, 40 insertions(+), 297 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/commonMissingSemicolons.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserUnterminatedGeneric2.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/commonMissingSemicolons.errors.txt b/testdata/baselines/reference/submodule/compiler/commonMissingSemicolons.errors.txt index 6e9fb5e963..e1b6c3b1cb 100644 --- a/testdata/baselines/reference/submodule/compiler/commonMissingSemicolons.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/commonMissingSemicolons.errors.txt @@ -1,66 +1,66 @@ -commonMissingSemicolons.ts(2,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(2,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? commonMissingSemicolons.ts(2,1): error TS2304: Cannot find name 'asynd'. -commonMissingSemicolons.ts(3,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(3,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? commonMissingSemicolons.ts(3,1): error TS2304: Cannot find name 'sasync'. commonMissingSemicolons.ts(8,23): error TS2304: Cannot find name 'asyncd'. commonMissingSemicolons.ts(8,33): error TS1005: ';' expected. -commonMissingSemicolons.ts(11,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(11,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? commonMissingSemicolons.ts(11,1): error TS2304: Cannot find name 'clasd'. commonMissingSemicolons.ts(11,7): error TS1434: Unexpected keyword or identifier. commonMissingSemicolons.ts(11,7): error TS2552: Cannot find name 'MyClass2'. Did you mean 'MyClass1'? -commonMissingSemicolons.ts(12,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(12,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? commonMissingSemicolons.ts(12,1): error TS2304: Cannot find name 'classs'. commonMissingSemicolons.ts(12,8): error TS1434: Unexpected keyword or identifier. commonMissingSemicolons.ts(12,8): error TS2552: Cannot find name 'MyClass3'. Did you mean 'MyClass1'? -commonMissingSemicolons.ts(15,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(15,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? commonMissingSemicolons.ts(15,1): error TS2304: Cannot find name 'consd'. commonMissingSemicolons.ts(15,7): error TS2552: Cannot find name 'myConst2'. Did you mean 'myConst1'? -commonMissingSemicolons.ts(16,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(16,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? commonMissingSemicolons.ts(16,1): error TS2304: Cannot find name 'constd'. commonMissingSemicolons.ts(16,8): error TS2304: Cannot find name 'myConst3'. -commonMissingSemicolons.ts(19,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(19,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? commonMissingSemicolons.ts(19,1): error TS2304: Cannot find name 'declared'. commonMissingSemicolons.ts(20,1): error TS2304: Cannot find name 'declare'. -commonMissingSemicolons.ts(20,9): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(20,9): error TS1435: Unknown keyword or identifier. Did you mean 'const'? commonMissingSemicolons.ts(20,9): error TS2304: Cannot find name 'constd'. -commonMissingSemicolons.ts(21,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(21,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? commonMissingSemicolons.ts(21,1): error TS2304: Cannot find name 'declared'. -commonMissingSemicolons.ts(21,10): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(21,10): error TS1435: Unknown keyword or identifier. Did you mean 'const'? commonMissingSemicolons.ts(21,10): error TS2304: Cannot find name 'constd'. -commonMissingSemicolons.ts(22,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(22,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? commonMissingSemicolons.ts(22,1): error TS2304: Cannot find name 'declareconst'. commonMissingSemicolons.ts(22,14): error TS2304: Cannot find name 'myDeclareConst5'. -commonMissingSemicolons.ts(25,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(25,1): error TS1435: Unknown keyword or identifier. Did you mean 'function'? commonMissingSemicolons.ts(25,1): error TS2304: Cannot find name 'functiond'. commonMissingSemicolons.ts(25,11): error TS2304: Cannot find name 'myFunction2'. commonMissingSemicolons.ts(25,25): error TS1005: ';' expected. commonMissingSemicolons.ts(26,10): error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. commonMissingSemicolons.ts(26,18): error TS1003: Identifier expected. commonMissingSemicolons.ts(27,1): error TS2304: Cannot find name 'functionMyFunction'. -commonMissingSemicolons.ts(30,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(30,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? commonMissingSemicolons.ts(30,1): error TS2304: Cannot find name 'interfaced'. -commonMissingSemicolons.ts(30,12): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(30,12): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? commonMissingSemicolons.ts(30,12): error TS2304: Cannot find name 'myInterface2'. commonMissingSemicolons.ts(32,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. commonMissingSemicolons.ts(32,11): error TS1438: Interface must be given a name. commonMissingSemicolons.ts(33,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. commonMissingSemicolons.ts(33,11): error TS2427: Interface name cannot be 'void'. -commonMissingSemicolons.ts(34,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(34,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? commonMissingSemicolons.ts(34,1): error TS2304: Cannot find name 'interfaceMyInterface'. -commonMissingSemicolons.ts(38,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(38,1): error TS1435: Unknown keyword or identifier. Did you mean 'let'? commonMissingSemicolons.ts(38,1): error TS2304: Cannot find name 'letd'. commonMissingSemicolons.ts(38,6): error TS2304: Cannot find name 'let2'. commonMissingSemicolons.ts(39,1): error TS2304: Cannot find name 'letMyLet'. commonMissingSemicolons.ts(41,10): error TS1005: '=' expected. -commonMissingSemicolons.ts(45,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(45,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? commonMissingSemicolons.ts(45,1): error TS2304: Cannot find name 'typed'. commonMissingSemicolons.ts(45,7): error TS2304: Cannot find name 'type4'. -commonMissingSemicolons.ts(46,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(46,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? commonMissingSemicolons.ts(46,1): error TS2304: Cannot find name 'typed'. commonMissingSemicolons.ts(46,7): error TS2304: Cannot find name 'type5'. commonMissingSemicolons.ts(46,15): error TS2693: 'type' only refers to a type, but is being used as a value here. commonMissingSemicolons.ts(47,1): error TS2304: Cannot find name 'typeMyType'. -commonMissingSemicolons.ts(50,1): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(50,1): error TS1435: Unknown keyword or identifier. Did you mean 'var'? commonMissingSemicolons.ts(50,1): error TS2304: Cannot find name 'vard'. commonMissingSemicolons.ts(50,6): error TS2304: Cannot find name 'myVar2'. commonMissingSemicolons.ts(51,1): error TS2304: Cannot find name 'varMyVar'. @@ -80,12 +80,12 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte async function myAsyncFunction1() {} asynd function myAsyncFunction2() {} ~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? ~~~~~ !!! error TS2304: Cannot find name 'asynd'. sasync function myAsyncFunction3() {} ~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? ~~~~~~ !!! error TS2304: Cannot find name 'sasync'. @@ -101,7 +101,7 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte class MyClass1 {} clasd MyClass2 {} ~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? ~~~~~ !!! error TS2304: Cannot find name 'clasd'. ~~~~~~~~ @@ -111,7 +111,7 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte !!! related TS2728 commonMissingSemicolons.ts:10:7: 'MyClass1' is declared here. classs MyClass3 {} ~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? ~~~~~~ !!! error TS2304: Cannot find name 'classs'. ~~~~~~~~ @@ -123,7 +123,7 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte const myConst1 = 1; consd myConst2 = 1; ~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? ~~~~~ !!! error TS2304: Cannot find name 'consd'. ~~~~~~~~ @@ -131,7 +131,7 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte !!! related TS2728 commonMissingSemicolons.ts:14:7: 'myConst1' is declared here. constd myConst3 = 1; ~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? ~~~~~~ !!! error TS2304: Cannot find name 'constd'. ~~~~~~~~ @@ -140,28 +140,28 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte declare const myDeclareConst1: 1; declared const myDeclareConst2: 1; ~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? ~~~~~~~~ !!! error TS2304: Cannot find name 'declared'. declare constd myDeclareConst3: 1; ~~~~~~~ !!! error TS2304: Cannot find name 'declare'. ~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? ~~~~~~ !!! error TS2304: Cannot find name 'constd'. declared constd myDeclareConst4: 1; ~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? ~~~~~~~~ !!! error TS2304: Cannot find name 'declared'. ~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? ~~~~~~ !!! error TS2304: Cannot find name 'constd'. declareconst myDeclareConst5; ~~~~~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? ~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'declareconst'. ~~~~~~~~~~~~~~~ @@ -170,7 +170,7 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte function myFunction1() { } functiond myFunction2() { } ~~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'function'? ~~~~~~~~~ !!! error TS2304: Cannot find name 'functiond'. ~~~~~~~~~~~ @@ -189,11 +189,11 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte interface myInterface1 { } interfaced myInterface2 { } ~~~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? ~~~~~~~~~~ !!! error TS2304: Cannot find name 'interfaced'. ~~~~~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? ~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'myInterface2'. interface interface { } @@ -209,7 +209,7 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte !!! error TS2427: Interface name cannot be 'void'. interfaceMyInterface { } ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? ~~~~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'interfaceMyInterface'. @@ -217,7 +217,7 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte let let1 = 1; letd let2 = 1; ~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'let'? ~~~~ !!! error TS2304: Cannot find name 'letd'. ~~~~ @@ -234,14 +234,14 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte type type3 = {}; typed type4 = {} ~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? ~~~~~ !!! error TS2304: Cannot find name 'typed'. ~~~~~ !!! error TS2304: Cannot find name 'type4'. typed type5 = type; ~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? ~~~~~ !!! error TS2304: Cannot find name 'typed'. ~~~~~ @@ -255,7 +255,7 @@ commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expecte var myVar1 = 1; vard myVar2 = 1; ~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'var'? ~~~~ !!! error TS2304: Cannot find name 'vard'. ~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/commonMissingSemicolons.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/commonMissingSemicolons.errors.txt.diff deleted file mode 100644 index d05eb6efcf..0000000000 --- a/testdata/baselines/reference/submodule/compiler/commonMissingSemicolons.errors.txt.diff +++ /dev/null @@ -1,240 +0,0 @@ ---- old.commonMissingSemicolons.errors.txt -+++ new.commonMissingSemicolons.errors.txt -@@= skipped -0, +0 lines =@@ --commonMissingSemicolons.ts(2,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? -+commonMissingSemicolons.ts(2,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(2,1): error TS2304: Cannot find name 'asynd'. --commonMissingSemicolons.ts(3,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? -+commonMissingSemicolons.ts(3,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(3,1): error TS2304: Cannot find name 'sasync'. - commonMissingSemicolons.ts(8,23): error TS2304: Cannot find name 'asyncd'. - commonMissingSemicolons.ts(8,33): error TS1005: ';' expected. --commonMissingSemicolons.ts(11,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? -+commonMissingSemicolons.ts(11,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(11,1): error TS2304: Cannot find name 'clasd'. - commonMissingSemicolons.ts(11,7): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(11,7): error TS2552: Cannot find name 'MyClass2'. Did you mean 'MyClass1'? --commonMissingSemicolons.ts(12,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? -+commonMissingSemicolons.ts(12,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(12,1): error TS2304: Cannot find name 'classs'. - commonMissingSemicolons.ts(12,8): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(12,8): error TS2552: Cannot find name 'MyClass3'. Did you mean 'MyClass1'? --commonMissingSemicolons.ts(15,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -+commonMissingSemicolons.ts(15,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(15,1): error TS2304: Cannot find name 'consd'. - commonMissingSemicolons.ts(15,7): error TS2552: Cannot find name 'myConst2'. Did you mean 'myConst1'? --commonMissingSemicolons.ts(16,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -+commonMissingSemicolons.ts(16,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(16,1): error TS2304: Cannot find name 'constd'. - commonMissingSemicolons.ts(16,8): error TS2304: Cannot find name 'myConst3'. --commonMissingSemicolons.ts(19,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? -+commonMissingSemicolons.ts(19,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(19,1): error TS2304: Cannot find name 'declared'. - commonMissingSemicolons.ts(20,1): error TS2304: Cannot find name 'declare'. --commonMissingSemicolons.ts(20,9): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -+commonMissingSemicolons.ts(20,9): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(20,9): error TS2304: Cannot find name 'constd'. --commonMissingSemicolons.ts(21,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? -+commonMissingSemicolons.ts(21,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(21,1): error TS2304: Cannot find name 'declared'. --commonMissingSemicolons.ts(21,10): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -+commonMissingSemicolons.ts(21,10): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(21,10): error TS2304: Cannot find name 'constd'. --commonMissingSemicolons.ts(22,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? -+commonMissingSemicolons.ts(22,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(22,1): error TS2304: Cannot find name 'declareconst'. - commonMissingSemicolons.ts(22,14): error TS2304: Cannot find name 'myDeclareConst5'. --commonMissingSemicolons.ts(25,1): error TS1435: Unknown keyword or identifier. Did you mean 'function'? -+commonMissingSemicolons.ts(25,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(25,1): error TS2304: Cannot find name 'functiond'. - commonMissingSemicolons.ts(25,11): error TS2304: Cannot find name 'myFunction2'. - commonMissingSemicolons.ts(25,25): error TS1005: ';' expected. - commonMissingSemicolons.ts(26,10): error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. - commonMissingSemicolons.ts(26,18): error TS1003: Identifier expected. - commonMissingSemicolons.ts(27,1): error TS2304: Cannot find name 'functionMyFunction'. --commonMissingSemicolons.ts(30,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? -+commonMissingSemicolons.ts(30,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(30,1): error TS2304: Cannot find name 'interfaced'. --commonMissingSemicolons.ts(30,12): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? -+commonMissingSemicolons.ts(30,12): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(30,12): error TS2304: Cannot find name 'myInterface2'. - commonMissingSemicolons.ts(32,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. - commonMissingSemicolons.ts(32,11): error TS1438: Interface must be given a name. - commonMissingSemicolons.ts(33,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. - commonMissingSemicolons.ts(33,11): error TS2427: Interface name cannot be 'void'. --commonMissingSemicolons.ts(34,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? -+commonMissingSemicolons.ts(34,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(34,1): error TS2304: Cannot find name 'interfaceMyInterface'. --commonMissingSemicolons.ts(38,1): error TS1435: Unknown keyword or identifier. Did you mean 'let'? -+commonMissingSemicolons.ts(38,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(38,1): error TS2304: Cannot find name 'letd'. - commonMissingSemicolons.ts(38,6): error TS2304: Cannot find name 'let2'. - commonMissingSemicolons.ts(39,1): error TS2304: Cannot find name 'letMyLet'. - commonMissingSemicolons.ts(41,10): error TS1005: '=' expected. --commonMissingSemicolons.ts(45,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? -+commonMissingSemicolons.ts(45,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(45,1): error TS2304: Cannot find name 'typed'. - commonMissingSemicolons.ts(45,7): error TS2304: Cannot find name 'type4'. --commonMissingSemicolons.ts(46,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? -+commonMissingSemicolons.ts(46,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(46,1): error TS2304: Cannot find name 'typed'. - commonMissingSemicolons.ts(46,7): error TS2304: Cannot find name 'type5'. - commonMissingSemicolons.ts(46,15): error TS2693: 'type' only refers to a type, but is being used as a value here. - commonMissingSemicolons.ts(47,1): error TS2304: Cannot find name 'typeMyType'. --commonMissingSemicolons.ts(50,1): error TS1435: Unknown keyword or identifier. Did you mean 'var'? -+commonMissingSemicolons.ts(50,1): error TS1434: Unexpected keyword or identifier. - commonMissingSemicolons.ts(50,1): error TS2304: Cannot find name 'vard'. - commonMissingSemicolons.ts(50,6): error TS2304: Cannot find name 'myVar2'. - commonMissingSemicolons.ts(51,1): error TS2304: Cannot find name 'varMyVar'. -@@= skipped -79, +79 lines =@@ - async function myAsyncFunction1() {} - asynd function myAsyncFunction2() {} - ~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~ - !!! error TS2304: Cannot find name 'asynd'. - sasync function myAsyncFunction3() {} - ~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~ - !!! error TS2304: Cannot find name 'sasync'. - -@@= skipped -21, +21 lines =@@ - class MyClass1 {} - clasd MyClass2 {} - ~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~ - !!! error TS2304: Cannot find name 'clasd'. - ~~~~~~~~ -@@= skipped -10, +10 lines =@@ - !!! related TS2728 commonMissingSemicolons.ts:10:7: 'MyClass1' is declared here. - classs MyClass3 {} - ~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~ - !!! error TS2304: Cannot find name 'classs'. - ~~~~~~~~ -@@= skipped -12, +12 lines =@@ - const myConst1 = 1; - consd myConst2 = 1; - ~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~ - !!! error TS2304: Cannot find name 'consd'. - ~~~~~~~~ -@@= skipped -8, +8 lines =@@ - !!! related TS2728 commonMissingSemicolons.ts:14:7: 'myConst1' is declared here. - constd myConst3 = 1; - ~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~ - !!! error TS2304: Cannot find name 'constd'. - ~~~~~~~~ -@@= skipped -9, +9 lines =@@ - declare const myDeclareConst1: 1; - declared const myDeclareConst2: 1; - ~~~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~ - !!! error TS2304: Cannot find name 'declared'. - declare constd myDeclareConst3: 1; - ~~~~~~~ - !!! error TS2304: Cannot find name 'declare'. - ~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~ - !!! error TS2304: Cannot find name 'constd'. - declared constd myDeclareConst4: 1; - ~~~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~ - !!! error TS2304: Cannot find name 'declared'. - ~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~ - !!! error TS2304: Cannot find name 'constd'. - declareconst myDeclareConst5; - ~~~~~~~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~~~~~ - !!! error TS2304: Cannot find name 'declareconst'. - ~~~~~~~~~~~~~~~ -@@= skipped -30, +30 lines =@@ - function myFunction1() { } - functiond myFunction2() { } - ~~~~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'function'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~~ - !!! error TS2304: Cannot find name 'functiond'. - ~~~~~~~~~~~ -@@= skipped -19, +19 lines =@@ - interface myInterface1 { } - interfaced myInterface2 { } - ~~~~~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~~~ - !!! error TS2304: Cannot find name 'interfaced'. - ~~~~~~~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~~~~~ - !!! error TS2304: Cannot find name 'myInterface2'. - interface interface { } -@@= skipped -20, +20 lines =@@ - !!! error TS2427: Interface name cannot be 'void'. - interfaceMyInterface { } - ~~~~~~~~~~~~~~~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~~~~~~~~~~~~~ - !!! error TS2304: Cannot find name 'interfaceMyInterface'. - -@@= skipped -8, +8 lines =@@ - let let1 = 1; - letd let2 = 1; - ~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'let'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~ - !!! error TS2304: Cannot find name 'letd'. - ~~~~ -@@= skipped -17, +17 lines =@@ - type type3 = {}; - typed type4 = {} - ~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~ - !!! error TS2304: Cannot find name 'typed'. - ~~~~~ - !!! error TS2304: Cannot find name 'type4'. - typed type5 = type; - ~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~ - !!! error TS2304: Cannot find name 'typed'. - ~~~~~ -@@= skipped -21, +21 lines =@@ - var myVar1 = 1; - vard myVar2 = 1; - ~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'var'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~ - !!! error TS2304: Cannot find name 'vard'. - ~~~~~~ diff --git a/testdata/baselines/reference/submodule/conformance/parserUnterminatedGeneric2.errors.txt b/testdata/baselines/reference/submodule/conformance/parserUnterminatedGeneric2.errors.txt index 404ae18370..55c36a4780 100644 --- a/testdata/baselines/reference/submodule/conformance/parserUnterminatedGeneric2.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserUnterminatedGeneric2.errors.txt @@ -1,4 +1,4 @@ -parserUnterminatedGeneric2.ts(2,5): error TS1434: Unexpected keyword or identifier. +parserUnterminatedGeneric2.ts(2,5): error TS1435: Unknown keyword or identifier. Did you mean 'interface ICompiledExpression'? parserUnterminatedGeneric2.ts(2,5): error TS2304: Cannot find name 'interfaceICompiledExpression'. parserUnterminatedGeneric2.ts(3,42): error TS1005: '=>' expected. parserUnterminatedGeneric2.ts(4,9): error TS2304: Cannot find name 'assign'. @@ -19,7 +19,7 @@ parserUnterminatedGeneric2.ts(8,54): error TS1005: '>' expected. declare module ng { interfaceICompiledExpression { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. +!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface ICompiledExpression'? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'interfaceICompiledExpression'. (context: any, locals?: any): any; diff --git a/testdata/baselines/reference/submodule/conformance/parserUnterminatedGeneric2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserUnterminatedGeneric2.errors.txt.diff deleted file mode 100644 index 830eb4eebf..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserUnterminatedGeneric2.errors.txt.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.parserUnterminatedGeneric2.errors.txt -+++ new.parserUnterminatedGeneric2.errors.txt -@@= skipped -0, +0 lines =@@ --parserUnterminatedGeneric2.ts(2,5): error TS1435: Unknown keyword or identifier. Did you mean 'interface ICompiledExpression'? -+parserUnterminatedGeneric2.ts(2,5): error TS1434: Unexpected keyword or identifier. - parserUnterminatedGeneric2.ts(2,5): error TS2304: Cannot find name 'interfaceICompiledExpression'. - parserUnterminatedGeneric2.ts(3,42): error TS1005: '=>' expected. - parserUnterminatedGeneric2.ts(4,9): error TS2304: Cannot find name 'assign'. -@@= skipped -18, +18 lines =@@ - declare module ng { - interfaceICompiledExpression { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface ICompiledExpression'? -+!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS2304: Cannot find name 'interfaceICompiledExpression'. - (context: any, locals?: any): any; From 85def79e3d19b54d69adb0b6e7f0a88a2f5c2fde Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 11:13:49 -0700 Subject: [PATCH 22/31] Fix property grammar check --- internal/checker/grammarchecks.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/checker/grammarchecks.go b/internal/checker/grammarchecks.go index 9c0de302c5..14d5d7202f 100644 --- a/internal/checker/grammarchecks.go +++ b/internal/checker/grammarchecks.go @@ -1907,24 +1907,22 @@ func (c *Checker) checkGrammarProperty(node *ast.Node /*Union[PropertyDeclaratio if ast.IsAutoAccessorPropertyDeclaration(node) && c.checkGrammarForInvalidQuestionMark(node.AsPropertyDeclaration().PostfixToken, diagnostics.An_accessor_property_cannot_be_declared_optional) { return true } - } else if node.Parent.Kind == ast.KindInterfaceDeclaration { + } else if ast.IsInterfaceDeclaration(node.Parent) { if c.checkGrammarForInvalidDynamicName(propertyName, diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type) { return true } - if !ast.IsPropertySignatureDeclaration(node) { // Interfaces cannot contain property declarations panic(fmt.Sprintf("Unexpected node kind %q", node.Kind)) } - if initializer := node.AsPropertySignatureDeclaration().Initializer; initializer != nil { return c.grammarErrorOnNode(initializer, diagnostics.An_interface_property_cannot_have_an_initializer) } - } else if ast.IsTypeAliasDeclaration(node.Parent) { + } else if ast.IsTypeLiteralNode(node.Parent) { if c.checkGrammarForInvalidDynamicName(node.Name(), diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type) { return true } - if ast.IsPropertySignatureDeclaration(node) { + if !ast.IsPropertySignatureDeclaration(node) { // Type literals cannot contain property declarations panic(fmt.Sprintf("Unexpected node kind %q", node.Kind)) } From 86baaa6eff69743bce1fc3811fa19135bc4f6993 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 11:14:20 -0700 Subject: [PATCH 23/31] Accept new baselines --- .../compiler/complicatedPrivacy.errors.txt | 5 +- .../complicatedPrivacy.errors.txt.diff | 23 ---------- ...onEmitComputedPropertyNameEnum2.errors.txt | 5 +- ...tComputedPropertyNameEnum2.errors.txt.diff | 15 ------ ...onEmitComputedPropertyNameEnum3.errors.txt | 5 +- ...tComputedPropertyNameEnum3.errors.txt.diff | 21 --------- ...izerInObjectTypeLiteralProperty.errors.txt | 17 +++++++ ...nObjectTypeLiteralProperty.errors.txt.diff | 22 --------- .../compiler/propertyAssignment.errors.txt | 5 +- .../propertyAssignment.errors.txt.diff | 22 --------- .../typeUsedAsTypeLiteralIndex.errors.txt | 14 +++++- ...typeUsedAsTypeLiteralIndex.errors.txt.diff | 46 ++++++------------- .../parserComputedPropertyName13.errors.txt | 5 +- ...rserComputedPropertyName13.errors.txt.diff | 14 ------ .../parserComputedPropertyName15.errors.txt | 5 +- ...rserComputedPropertyName15.errors.txt.diff | 14 ------ .../parserComputedPropertyName19.errors.txt | 5 +- ...rserComputedPropertyName19.errors.txt.diff | 14 ------ .../parserES5ComputedPropertyName8.errors.txt | 5 +- ...erES5ComputedPropertyName8.errors.txt.diff | 14 ------ .../parserES5SymbolProperty9.errors.txt | 5 +- .../parserES5SymbolProperty9.errors.txt.diff | 16 ------- .../conformance/symbolProperty61.errors.txt | 36 +++++++++++++++ .../symbolProperty61.errors.txt.diff | 41 +++++++++++++++++ 24 files changed, 158 insertions(+), 216 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt index 0131f5117a..4f493474e6 100644 --- a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt @@ -1,9 +1,10 @@ complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. +complicatedPrivacy.ts(35,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. -==== complicatedPrivacy.ts (3 errors) ==== +==== complicatedPrivacy.ts (4 errors) ==== module m1 { export module m2 { @@ -41,6 +42,8 @@ complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported me export function f4(arg1: { [number]: C1; // Used to be indexer, now it is a computed property + ~~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2693: 'number' only refers to a type, but is being used as a value here. }) { diff --git a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt.diff deleted file mode 100644 index 411d6997e1..0000000000 --- a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.complicatedPrivacy.errors.txt -+++ new.complicatedPrivacy.errors.txt -@@= skipped -0, +0 lines =@@ - complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. --complicatedPrivacy.ts(35,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. - complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. - - --==== complicatedPrivacy.ts (4 errors) ==== -+==== complicatedPrivacy.ts (3 errors) ==== - module m1 { - export module m2 { - -@@= skipped -41, +40 lines =@@ - export function f4(arg1: - { - [number]: C1; // Used to be indexer, now it is a computed property -- ~~~~~~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2693: 'number' only refers to a type, but is being used as a value here. - }) { diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt index e757df4afd..bef0d0f635 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt @@ -1,8 +1,11 @@ +type.ts(1,28): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. type.ts(1,29): error TS2304: Cannot find name 'Enum'. -==== type.ts (1 errors) ==== +==== type.ts (2 errors) ==== export type Type = { x?: { [Enum.A]: 0 } }; + ~~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~ !!! error TS2304: Cannot find name 'Enum'. diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt.diff deleted file mode 100644 index 7c14b3abc0..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum2.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.declarationEmitComputedPropertyNameEnum2.errors.txt -+++ new.declarationEmitComputedPropertyNameEnum2.errors.txt -@@= skipped -0, +0 lines =@@ --type.ts(1,28): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - type.ts(1,29): error TS2304: Cannot find name 'Enum'. - - --==== type.ts (2 errors) ==== -+==== type.ts (1 errors) ==== - export type Type = { x?: { [Enum.A]: 0 } }; -- ~~~~~~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~ - !!! error TS2304: Cannot find name 'Enum'. - diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt index 0762563c15..a960f11f4c 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt @@ -1,7 +1,8 @@ +type.ts(7,28): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. type.ts(7,28): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -==== type.ts (1 errors) ==== +==== type.ts (2 errors) ==== export namespace Foo { export enum Enum { A = "a", @@ -10,6 +11,8 @@ type.ts(7,28): error TS2464: A computed property name must be of type 'string', } export type Type = { x?: { [Foo.Enum]: 0 } }; ~~~~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ==== index.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt.diff deleted file mode 100644 index d11dfe9435..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedPropertyNameEnum3.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.declarationEmitComputedPropertyNameEnum3.errors.txt -+++ new.declarationEmitComputedPropertyNameEnum3.errors.txt -@@= skipped -0, +0 lines =@@ --type.ts(7,28): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - type.ts(7,28): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - --==== type.ts (2 errors) ==== -+==== type.ts (1 errors) ==== - export namespace Foo { - export enum Enum { - A = "a", -@@= skipped -10, +9 lines =@@ - } - export type Type = { x?: { [Foo.Enum]: 0 } }; - ~~~~~~~~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. -- ~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - ==== index.ts (0 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.errors.txt b/testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.errors.txt new file mode 100644 index 0000000000..3c0d14f60d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.errors.txt @@ -0,0 +1,17 @@ +errorOnInitializerInObjectTypeLiteralProperty.ts(2,19): error TS1247: A type literal property cannot have an initializer. +errorOnInitializerInObjectTypeLiteralProperty.ts(6,19): error TS1247: A type literal property cannot have an initializer. + + +==== errorOnInitializerInObjectTypeLiteralProperty.ts (2 errors) ==== + var Foo: { + bar: number = 5; + ~ +!!! error TS1247: A type literal property cannot have an initializer. + }; + + let Bar: { + bar: number = 5; + ~ +!!! error TS1247: A type literal property cannot have an initializer. + }; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.errors.txt.diff deleted file mode 100644 index 55fc30b724..0000000000 --- a/testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.errorOnInitializerInObjectTypeLiteralProperty.errors.txt -+++ new.errorOnInitializerInObjectTypeLiteralProperty.errors.txt -@@= skipped -0, +-1 lines =@@ --errorOnInitializerInObjectTypeLiteralProperty.ts(2,19): error TS1247: A type literal property cannot have an initializer. --errorOnInitializerInObjectTypeLiteralProperty.ts(6,19): error TS1247: A type literal property cannot have an initializer. -- -- --==== errorOnInitializerInObjectTypeLiteralProperty.ts (2 errors) ==== -- var Foo: { -- bar: number = 5; -- ~ --!!! error TS1247: A type literal property cannot have an initializer. -- }; -- -- let Bar: { -- bar: number = 5; -- ~ --!!! error TS1247: A type literal property cannot have an initializer. -- }; -- -@@= skipped --1, +1 lines =@@ -+ diff --git a/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt b/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt index fd64c78a5b..f7ec925652 100644 --- a/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt @@ -1,3 +1,4 @@ +propertyAssignment.ts(4,13): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. propertyAssignment.ts(4,14): error TS2304: Cannot find name 'index'. propertyAssignment.ts(12,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. Type '{ x: number; }' provides no match for the signature 'new (): any'. @@ -5,11 +6,13 @@ propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignab Type '{ x: number; }' provides no match for the signature '(): void'. -==== propertyAssignment.ts (3 errors) ==== +==== propertyAssignment.ts (4 errors) ==== var foo1: { new ():any; } var bar1: { x : number; } var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property + ~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~ !!! error TS2304: Cannot find name 'index'. var bar2: { x : number; } diff --git a/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt.diff deleted file mode 100644 index 15c4e35677..0000000000 --- a/testdata/baselines/reference/submodule/compiler/propertyAssignment.errors.txt.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.propertyAssignment.errors.txt -+++ new.propertyAssignment.errors.txt -@@= skipped -0, +0 lines =@@ --propertyAssignment.ts(4,13): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - propertyAssignment.ts(4,14): error TS2304: Cannot find name 'index'. - propertyAssignment.ts(12,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. - Type '{ x: number; }' provides no match for the signature 'new (): any'. -@@= skipped -5, +4 lines =@@ - Type '{ x: number; }' provides no match for the signature '(): void'. - - --==== propertyAssignment.ts (4 errors) ==== -+==== propertyAssignment.ts (3 errors) ==== - var foo1: { new ():any; } - var bar1: { x : number; } - - var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property -- ~~~~~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~ - !!! error TS2304: Cannot find name 'index'. - var bar2: { x : number; } diff --git a/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt b/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt index 808e24d7b0..3cd05b68c1 100644 --- a/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt @@ -1,13 +1,19 @@ +typeUsedAsTypeLiteralIndex.ts(3,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. typeUsedAsTypeLiteralIndex.ts(3,6): error TS2693: 'K' only refers to a type, but is being used as a value here. +typeUsedAsTypeLiteralIndex.ts(13,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. typeUsedAsTypeLiteralIndex.ts(13,6): error TS2693: 'K2' only refers to a type, but is being used as a value here. +typeUsedAsTypeLiteralIndex.ts(18,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. typeUsedAsTypeLiteralIndex.ts(18,6): error TS2693: 'K3' only refers to a type, but is being used as a value here. +typeUsedAsTypeLiteralIndex.ts(23,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, but is being used as a value here. -==== typeUsedAsTypeLiteralIndex.ts (4 errors) ==== +==== typeUsedAsTypeLiteralIndex.ts (8 errors) ==== type K = number | string; type T = { [K]: number; // Did you mean to use 'P in K'? + ~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2693: 'K' only refers to a type, but is being used as a value here. } @@ -20,6 +26,8 @@ typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, b type K2 = "x" | "y"; type T2 = { [K2]: number; // Did you mean to use 'K in K2'? + ~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~ !!! error TS2693: 'K2' only refers to a type, but is being used as a value here. } @@ -27,6 +35,8 @@ typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, b type K3 = number | string; type T3 = { [K3]: number; // Did you mean to use 'K in K3'? + ~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~ !!! error TS2693: 'K3' only refers to a type, but is being used as a value here. } @@ -34,6 +44,8 @@ typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, b type K4 = number | string; type T4 = { [K4]: number; + ~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~ !!! error TS2693: 'K4' only refers to a type, but is being used as a value here. k4: string; diff --git a/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt.diff index 716ab11533..a89b9dd7f3 100644 --- a/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/typeUsedAsTypeLiteralIndex.errors.txt.diff @@ -1,58 +1,42 @@ --- old.typeUsedAsTypeLiteralIndex.errors.txt +++ new.typeUsedAsTypeLiteralIndex.errors.txt @@= skipped -0, +0 lines =@@ --typeUsedAsTypeLiteralIndex.ts(3,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. + typeUsedAsTypeLiteralIndex.ts(3,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. -typeUsedAsTypeLiteralIndex.ts(3,6): error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? --typeUsedAsTypeLiteralIndex.ts(13,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. --typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? --typeUsedAsTypeLiteralIndex.ts(18,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. --typeUsedAsTypeLiteralIndex.ts(18,6): error TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? --typeUsedAsTypeLiteralIndex.ts(23,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +typeUsedAsTypeLiteralIndex.ts(3,6): error TS2693: 'K' only refers to a type, but is being used as a value here. + typeUsedAsTypeLiteralIndex.ts(13,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +-typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? +typeUsedAsTypeLiteralIndex.ts(13,6): error TS2693: 'K2' only refers to a type, but is being used as a value here. + typeUsedAsTypeLiteralIndex.ts(18,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +-typeUsedAsTypeLiteralIndex.ts(18,6): error TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? +typeUsedAsTypeLiteralIndex.ts(18,6): error TS2693: 'K3' only refers to a type, but is being used as a value here. + typeUsedAsTypeLiteralIndex.ts(23,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, but is being used as a value here. - --==== typeUsedAsTypeLiteralIndex.ts (8 errors) ==== -+==== typeUsedAsTypeLiteralIndex.ts (4 errors) ==== - type K = number | string; - type T = { - [K]: number; // Did you mean to use 'P in K'? -- ~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +@@= skipped -14, +14 lines =@@ + ~~~ + !!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ -!!! error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? +!!! error TS2693: 'K' only refers to a type, but is being used as a value here. } const K1 = Symbol(); -@@= skipped -25, +19 lines =@@ - type K2 = "x" | "y"; - type T2 = { - [K2]: number; // Did you mean to use 'K in K2'? -- ~~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +@@= skipped -14, +14 lines =@@ + ~~~~ + !!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~ -!!! error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? +!!! error TS2693: 'K2' only refers to a type, but is being used as a value here. } type K3 = number | string; - type T3 = { - [K3]: number; // Did you mean to use 'K in K3'? -- ~~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. +@@= skipped -9, +9 lines =@@ + ~~~~ + !!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~ -!!! error TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? +!!! error TS2693: 'K3' only refers to a type, but is being used as a value here. } type K4 = number | string; - type T4 = { - [K4]: number; -- ~~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~ - !!! error TS2693: 'K4' only refers to a type, but is being used as a value here. - k4: string; diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt index 53c44acb4a..69b30e2c35 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt @@ -1,7 +1,10 @@ +parserComputedPropertyName13.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName13.ts (1 errors) ==== +==== parserComputedPropertyName13.ts (2 errors) ==== var v: { [e]: number }; + ~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt.diff deleted file mode 100644 index f804ab000a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName13.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.parserComputedPropertyName13.errors.txt -+++ new.parserComputedPropertyName13.errors.txt -@@= skipped -0, +0 lines =@@ --parserComputedPropertyName13.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName13.ts (2 errors) ==== -+==== parserComputedPropertyName13.ts (1 errors) ==== - var v: { [e]: number }; -- ~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt index 227273a64d..29736f6b09 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt @@ -1,7 +1,10 @@ +parserComputedPropertyName15.ts(1,31): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName15.ts(1,32): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName15.ts (1 errors) ==== +==== parserComputedPropertyName15.ts (2 errors) ==== var v: { [e: number]: string; [e]: number }; + ~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt.diff deleted file mode 100644 index c0eae13fb7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName15.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.parserComputedPropertyName15.errors.txt -+++ new.parserComputedPropertyName15.errors.txt -@@= skipped -0, +0 lines =@@ --parserComputedPropertyName15.ts(1,31): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName15.ts(1,32): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName15.ts (2 errors) ==== -+==== parserComputedPropertyName15.ts (1 errors) ==== - var v: { [e: number]: string; [e]: number }; -- ~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt index 5210616149..5be905e3aa 100644 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt @@ -1,7 +1,10 @@ +parserComputedPropertyName19.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName19.ts (1 errors) ==== +==== parserComputedPropertyName19.ts (2 errors) ==== var v: { [e]? }; + ~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt.diff deleted file mode 100644 index 982d0eb1b0..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserComputedPropertyName19.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.parserComputedPropertyName19.errors.txt -+++ new.parserComputedPropertyName19.errors.txt -@@= skipped -0, +0 lines =@@ --parserComputedPropertyName19.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName19.ts (2 errors) ==== -+==== parserComputedPropertyName19.ts (1 errors) ==== - var v: { [e]? }; -- ~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt index 2295c143ba..4f2851d8e8 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt @@ -1,7 +1,10 @@ +parserES5ComputedPropertyName8.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. -==== parserES5ComputedPropertyName8.ts (1 errors) ==== +==== parserES5ComputedPropertyName8.ts (2 errors) ==== var v: { [e]: number }; + ~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt.diff deleted file mode 100644 index 7f8fbda834..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName8.errors.txt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- old.parserES5ComputedPropertyName8.errors.txt -+++ new.parserES5ComputedPropertyName8.errors.txt -@@= skipped -0, +0 lines =@@ --parserES5ComputedPropertyName8.ts(1,10): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName8.ts (2 errors) ==== -+==== parserES5ComputedPropertyName8.ts (1 errors) ==== - var v: { [e]: number }; -- ~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ - !!! error TS2304: Cannot find name 'e'. diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt index ee9a898bef..680c9da381 100644 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt @@ -1,9 +1,12 @@ +parserES5SymbolProperty9.ts(2,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== parserES5SymbolProperty9.ts (1 errors) ==== +==== parserES5SymbolProperty9.ts (2 errors) ==== var x: { [Symbol.toPrimitive]: string + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt.diff deleted file mode 100644 index ec756a099b..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.parserES5SymbolProperty9.errors.txt -+++ new.parserES5SymbolProperty9.errors.txt -@@= skipped -0, +0 lines =@@ --parserES5SymbolProperty9.ts(2,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== parserES5SymbolProperty9.ts (2 errors) ==== -+==== parserES5SymbolProperty9.ts (1 errors) ==== - var x: { - [Symbol.toPrimitive]: string -- ~~~~~~~~~~~~~~~~~~~~ --!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } diff --git a/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt b/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt new file mode 100644 index 0000000000..09770ae96c --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt @@ -0,0 +1,36 @@ +symbolProperty61.ts(22,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. + + +==== symbolProperty61.ts (1 errors) ==== + declare global { + interface SymbolConstructor { + readonly obs: symbol + } + } + + const observable: typeof Symbol.obs = Symbol.obs + + export class MyObservable { + constructor(private _val: T) {} + + subscribe(next: (val: T) => void) { + next(this._val) + } + + [observable]() { + return this + } + } + + type InteropObservable = { + [Symbol.obs]: () => { subscribe(next: (val: T) => void): void } + ~~~~~~~~~~~~ +!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. + } + + function from(obs: InteropObservable) { + return obs[Symbol.obs]() + } + + from(new MyObservable(42)) + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt.diff new file mode 100644 index 0000000000..41b0fdbd1e --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/symbolProperty61.errors.txt.diff @@ -0,0 +1,41 @@ +--- old.symbolProperty61.errors.txt ++++ new.symbolProperty61.errors.txt +@@= skipped -0, +-1 lines =@@ +- +@@= skipped --1, +1 lines =@@ ++symbolProperty61.ts(22,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ++ ++ ++==== symbolProperty61.ts (1 errors) ==== ++ declare global { ++ interface SymbolConstructor { ++ readonly obs: symbol ++ } ++ } ++ ++ const observable: typeof Symbol.obs = Symbol.obs ++ ++ export class MyObservable { ++ constructor(private _val: T) {} ++ ++ subscribe(next: (val: T) => void) { ++ next(this._val) ++ } ++ ++ [observable]() { ++ return this ++ } ++ } ++ ++ type InteropObservable = { ++ [Symbol.obs]: () => { subscribe(next: (val: T) => void): void } ++ ~~~~~~~~~~~~ ++!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. ++ } ++ ++ function from(obs: InteropObservable) { ++ return obs[Symbol.obs]() ++ } ++ ++ from(new MyObservable(42)) ++ From 81d15cc740f3d441cf89af1ba627cdf2f42c50b3 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 11:54:09 -0700 Subject: [PATCH 24/31] Fix fresh type of computed enum types --- internal/checker/checker.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 7136957694..69a91fab4c 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -21884,6 +21884,7 @@ func (c *Checker) createComputedEnumType(symbol *ast.Symbol) *Type { freshType := c.newLiteralType(TypeFlagsEnum, nil, regularType) freshType.symbol = symbol regularType.AsLiteralType().freshType = freshType + freshType.AsLiteralType().freshType = freshType return regularType } From 18e806372b63c45b51b055d1d3786df091de6e84 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 11:54:28 -0700 Subject: [PATCH 25/31] Accept new baselines --- .../computedEnumTypeWidening.errors.txt | 83 ----------------- .../computedEnumTypeWidening.errors.txt.diff | 88 ------------------- 2 files changed, 171 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.errors.txt delete mode 100644 testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.errors.txt b/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.errors.txt deleted file mode 100644 index e1496b2d25..0000000000 --- a/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.errors.txt +++ /dev/null @@ -1,83 +0,0 @@ -computedEnumTypeWidening.ts(76,1): error TS2322: Type 'MyDeclaredEnum.B' is not assignable to type 'MyDeclaredEnum.A'. - - -==== computedEnumTypeWidening.ts (1 errors) ==== - declare function computed(x: number): number; - - enum E { - A = computed(0), - B = computed(1), - C = computed(2), - D = computed(3), - } - - function f1() { - const c1 = E.B; // Fresh E.B - let v1 = c1; // E - const c2 = c1; // Fresh E.B - let v2 = c2; // E - const c3: E.B = E.B; // E.B - let v3 = c3; // E.B - const c4: E.B = c1; // E.B - let v4 = c4; // E.B - } - - function f2(cond: boolean) { - const c1 = cond ? E.A : E.B; // Fresh E.A | fresh E.B - const c2: E.A | E.B = c1; // E.A | E.B - const c3 = cond ? c1 : c2; // E.A | E.B - const c4 = cond ? c3 : E.C; // E.A | E.B | fresh E.C - const c5: E.A | E.B | E.C = c4; // E.A | E.B | E.C - let v1 = c1; // E - let v2 = c2; // E.A | E.B - let v3 = c3; // E.A | E.B - let v4 = c4; // E - let v5 = c5; // E.A | E.B | E.C - } - - function f3() { - const c1 = E.B; - let v1 = c1; // E - const c2: E.B = E.B; - let v2 = c2; // E.B - const c3 = E.B as E.B; - let v3 = c3; // E.B - const c4 = E.B; - let v4 = c4; // E.B - const c5 = E.B as const; - let v5 = c5; // E.B - } - - declare enum E2 { A, B, C, D } - - function f4() { - const c1 = E2.B; // Fresh E2.B - let v1 = E.B; // E2 - } - - const c1 = E.B; - const c2 = E.B as const; - let v1 = E.B; - let v2 = E.B as const; - - class C { - p1 = E.B; - p2 = E.B as const; - readonly p3 = E.B; - readonly p4 = E.B as const; - } - - // Repro from #52531 - - enum MyEnum { A, B, C } - - let val1 = MyEnum.A; - val1 = MyEnum.B; - - declare enum MyDeclaredEnum { A, B, C } - - let val2 = MyDeclaredEnum.A; - val2 = MyDeclaredEnum.B; - ~~~~ -!!! error TS2322: Type 'MyDeclaredEnum.B' is not assignable to type 'MyDeclaredEnum.A'. - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.errors.txt.diff deleted file mode 100644 index d1065d1ace..0000000000 --- a/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.errors.txt.diff +++ /dev/null @@ -1,88 +0,0 @@ ---- old.computedEnumTypeWidening.errors.txt -+++ new.computedEnumTypeWidening.errors.txt -@@= skipped -0, +-1 lines =@@ -- -@@= skipped --1, +1 lines =@@ -+computedEnumTypeWidening.ts(76,1): error TS2322: Type 'MyDeclaredEnum.B' is not assignable to type 'MyDeclaredEnum.A'. -+ -+ -+==== computedEnumTypeWidening.ts (1 errors) ==== -+ declare function computed(x: number): number; -+ -+ enum E { -+ A = computed(0), -+ B = computed(1), -+ C = computed(2), -+ D = computed(3), -+ } -+ -+ function f1() { -+ const c1 = E.B; // Fresh E.B -+ let v1 = c1; // E -+ const c2 = c1; // Fresh E.B -+ let v2 = c2; // E -+ const c3: E.B = E.B; // E.B -+ let v3 = c3; // E.B -+ const c4: E.B = c1; // E.B -+ let v4 = c4; // E.B -+ } -+ -+ function f2(cond: boolean) { -+ const c1 = cond ? E.A : E.B; // Fresh E.A | fresh E.B -+ const c2: E.A | E.B = c1; // E.A | E.B -+ const c3 = cond ? c1 : c2; // E.A | E.B -+ const c4 = cond ? c3 : E.C; // E.A | E.B | fresh E.C -+ const c5: E.A | E.B | E.C = c4; // E.A | E.B | E.C -+ let v1 = c1; // E -+ let v2 = c2; // E.A | E.B -+ let v3 = c3; // E.A | E.B -+ let v4 = c4; // E -+ let v5 = c5; // E.A | E.B | E.C -+ } -+ -+ function f3() { -+ const c1 = E.B; -+ let v1 = c1; // E -+ const c2: E.B = E.B; -+ let v2 = c2; // E.B -+ const c3 = E.B as E.B; -+ let v3 = c3; // E.B -+ const c4 = E.B; -+ let v4 = c4; // E.B -+ const c5 = E.B as const; -+ let v5 = c5; // E.B -+ } -+ -+ declare enum E2 { A, B, C, D } -+ -+ function f4() { -+ const c1 = E2.B; // Fresh E2.B -+ let v1 = E.B; // E2 -+ } -+ -+ const c1 = E.B; -+ const c2 = E.B as const; -+ let v1 = E.B; -+ let v2 = E.B as const; -+ -+ class C { -+ p1 = E.B; -+ p2 = E.B as const; -+ readonly p3 = E.B; -+ readonly p4 = E.B as const; -+ } -+ -+ // Repro from #52531 -+ -+ enum MyEnum { A, B, C } -+ -+ let val1 = MyEnum.A; -+ val1 = MyEnum.B; -+ -+ declare enum MyDeclaredEnum { A, B, C } -+ -+ let val2 = MyDeclaredEnum.A; -+ val2 = MyDeclaredEnum.B; -+ ~~~~ -+!!! error TS2322: Type 'MyDeclaredEnum.B' is not assignable to type 'MyDeclaredEnum.A'. -+ From e46218c6dcb85ca57a4d72c75af867655cc150a1 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 16:29:37 -0700 Subject: [PATCH 26/31] Check enum members + fix overshift warning --- internal/checker/checker.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 69a91fab4c..ad071bef48 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -2170,6 +2170,8 @@ func (c *Checker) checkSourceElementWorker(node *ast.Node) { c.checkTypeAliasDeclaration(node) case ast.KindEnumDeclaration: c.checkEnumDeclaration(node) + case ast.KindEnumMember: + c.checkEnumMember(node) case ast.KindModuleDeclaration: c.checkModuleDeclaration(node) case ast.KindImportDeclaration: @@ -4710,6 +4712,15 @@ func (c *Checker) checkEnumDeclaration(node *ast.Node) { } } +func (c *Checker) checkEnumMember(node *ast.Node) { + if ast.IsPrivateIdentifier(node.Name()) { + c.error(node, diagnostics.An_enum_member_cannot_be_named_with_a_private_identifier) + } + if node.Initializer() != nil { + c.checkExpression(node.Initializer()) + } +} + func (c *Checker) checkModuleDeclaration(node *ast.Node) { if body := node.Body(); body != nil { c.checkSourceElement(body) @@ -11520,7 +11531,10 @@ func (c *Checker) checkBinaryLikeExpression(left *ast.Node, operatorToken *ast.N ast.KindGreaterThanGreaterThanGreaterThanEqualsToken: rhsEval := c.evaluate(right, right) if numValue, ok := rhsEval.value.(jsnum.Number); ok && numValue.Abs() >= 32 { - c.errorOrSuggestion(ast.IsEnumMember(ast.WalkUpParenthesizedExpressions(right.Parent.Parent)), errorNode, diagnostics.This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2, scanner.GetTextOfNode(left), scanner.TokenToString(operator), (numValue / 32).Floor()) + // Adding 0 removes sign from -0 + shiftMod32 := math.Mod(float64(numValue), 32) + 0 + // Elevate from suggestion to error within an enum member + c.errorOrSuggestion(ast.IsEnumMember(ast.WalkUpParenthesizedExpressions(right.Parent.Parent)), errorNode, diagnostics.This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2, scanner.GetTextOfNode(left), scanner.TokenToString(operator), shiftMod32) } } } From f3af365b3bd32a1b35927e3c8a18cfbfb680893b Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 16:29:47 -0700 Subject: [PATCH 27/31] Accept new baselines --- .../compiler/constEnumErrors.errors.txt | 8 +- .../compiler/constEnumErrors.errors.txt.diff | 35 --- ...ModulesGlobalNamespacesAndEnums.errors.txt | 8 +- ...esGlobalNamespacesAndEnums.errors.txt.diff | 28 --- .../submodule/compiler/overshifts.errors.txt | 145 ++++++++++++ .../compiler/overshifts.errors.txt.diff | 213 ++++++------------ .../conformance/privateNameEnum.errors.txt | 10 + .../privateNameEnum.errors.txt.diff | 15 -- 8 files changed, 235 insertions(+), 227 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overshifts.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/privateNameEnum.errors.txt delete mode 100644 testdata/baselines/reference/submodule/conformance/privateNameEnum.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt b/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt index 664101fc91..9c5eb5e7fa 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt @@ -2,7 +2,9 @@ constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with na constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. +constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. +constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal. constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal. constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal. @@ -14,7 +16,7 @@ constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was eval constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -==== constEnumErrors.ts (14 errors) ==== +==== constEnumErrors.ts (16 errors) ==== const enum E { ~ !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. @@ -37,9 +39,13 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval Y = E1.Z, ~~~~ !!! error TS2474: const enum member initializers must be constant expressions. + ~ +!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. Y1 = E1["Z"] ~~~~~~~ !!! error TS2474: const enum member initializers must be constant expressions. + ~~~ +!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. } const enum E2 { diff --git a/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt.diff deleted file mode 100644 index e0f31bb18f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- old.constEnumErrors.errors.txt -+++ new.constEnumErrors.errors.txt -@@= skipped -1, +1 lines =@@ - constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. - constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. --constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. - constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. --constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. - constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal. - constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal. - constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal. -@@= skipped -14, +12 lines =@@ - constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - - --==== constEnumErrors.ts (16 errors) ==== -+==== constEnumErrors.ts (14 errors) ==== - const enum E { - ~ - !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. -@@= skipped -23, +23 lines =@@ - Y = E1.Z, - ~~~~ - !!! error TS2474: const enum member initializers must be constant expressions. -- ~ --!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - Y1 = E1["Z"] - ~~~~~~~ - !!! error TS2474: const enum member initializers must be constant expressions. -- ~~~ --!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - } - - const enum E2 { diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.errors.txt b/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.errors.txt index 79d609a496..d5e4778259 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.errors.txt @@ -1,4 +1,6 @@ enum2.ts(2,9): error TS18055: 'Enum.D' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled. +enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. +enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. @@ -25,13 +27,17 @@ script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global s declare enum Enum { X = 1_000_000 } const d = 'd'; -==== enum2.ts (1 errors) ==== +==== enum2.ts (3 errors) ==== enum Enum { D = d, ~ !!! error TS18055: 'Enum.D' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled. E = A, // error + ~ +!!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. Y = X, // error + ~ +!!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. Z = Enum.A } diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.errors.txt.diff deleted file mode 100644 index f5ec221d02..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.errors.txt.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.isolatedModulesGlobalNamespacesAndEnums.errors.txt -+++ new.isolatedModulesGlobalNamespacesAndEnums.errors.txt -@@= skipped -0, +0 lines =@@ - enum2.ts(2,9): error TS18055: 'Enum.D' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled. --enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. --enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. - script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. - - -@@= skipped -26, +24 lines =@@ - declare enum Enum { X = 1_000_000 } - const d = 'd'; - --==== enum2.ts (3 errors) ==== -+==== enum2.ts (1 errors) ==== - enum Enum { - D = d, - ~ - !!! error TS18055: 'Enum.D' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled. - E = A, // error -- ~ --!!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. - Y = X, // error -- ~ --!!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. - Z = Enum.A - } - diff --git a/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt b/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt new file mode 100644 index 0000000000..d7daa2f563 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt @@ -0,0 +1,145 @@ +overshifts.ts(58,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(59,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 27`. +overshifts.ts(60,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(62,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(63,9): error TS6807: This operation can be simplified. This shift is identical to `1 << -27`. +overshifts.ts(64,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(69,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(70,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. +overshifts.ts(71,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(73,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(74,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. +overshifts.ts(75,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(80,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(81,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. +overshifts.ts(82,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(84,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(85,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. +overshifts.ts(86,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + + +==== overshifts.ts (18 errors) ==== + 1 << 1; // ok + 1 << 32; // overshift + 1 << 123; + 1 << 1024; + 1 << -1; // OK-ish + 1 << -32; // backwards overshift + 1 << -123; + 1 << -1024; + + 0xFF_FF_FF_FF >> 1; // ok + 0xFF_FF_FF_FF >> 32; // overshift + 0xFF_FF_FF_FF >> 123; + 0xFF_FF_FF_FF >> 1024; + 0xFF_FF_FF_FF >> -1; // OK-ish + 0xFF_FF_FF_FF >> -32; // backwards overshift + 0xFF_FF_FF_FF >> -123; + 0xFF_FF_FF_FF >> -1024; + + 0xFF_FF_FF_FF >>> 1; // ok + 0xFF_FF_FF_FF >>> 32; // overshift + 0xFF_FF_FF_FF >>> 123; + 0xFF_FF_FF_FF >>> 1024; + 0xFF_FF_FF_FF >>> -1; // OK-ish + 0xFF_FF_FF_FF >>> -32; // backwards overshift + 0xFF_FF_FF_FF >>> -123; + 0xFF_FF_FF_FF >>> -1024; + + let x = 1; + x <<= 1; // ok + x <<= 32; // overshift + x <<= 123; + x <<= 1024; + x <<= -1; // OK-ish + x <<= -32; // backwards overshift + x <<= -123; + x <<= -1024; + + x >>= 1; // ok + x >>= 32; // overshift + x >>= 123; + x >>= 1024; + x >>= -1; // OK-ish + x >>= -32; // backwards overshift + x >>= -123; + x >>= -1024; + + x >>>= 1; // ok + x >>>= 32; // overshift + x >>>= 123; + x >>>= 1024; + x >>>= -1; // OK-ish + x >>>= -32; // backwards overshift + x >>>= -123; + x >>>= -1024; + + enum One { + A = 1 << 1, // ok + B = 1 << 32, // overshift + ~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + C = 1 << 123, + ~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 27`. + D = 1 << 1024, + ~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + E = 1 << -1, // OK-ish + F = 1 << -32, // backwards overshift + ~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + G = 1 << -123, + ~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << -27`. + H = 1 << -1024, + ~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + } + + enum Two { + A = 0xFF_FF_FF_FF >> 1, // ok + B = 0xFF_FF_FF_FF >> 32, // overshift + ~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + C = 0xFF_FF_FF_FF >> 123, + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. + D = 0xFF_FF_FF_FF >> 1024, + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + E = 0xFF_FF_FF_FF >> -1, // OK-ish + F = 0xFF_FF_FF_FF >> -32, // backwards overshift + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + G = 0xFF_FF_FF_FF >> -123, + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. + H = 0xFF_FF_FF_FF >> -1024, + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + } + + enum Three { + A = 0xFF_FF_FF_FF >>> 1, // ok + B = 0xFF_FF_FF_FF >>> 32, // overshift + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + C = 0xFF_FF_FF_FF >>> 123, + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. + D = 0xFF_FF_FF_FF >>> 1024, + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + E = 0xFF_FF_FF_FF >>> -1, // OK-ish + F = 0xFF_FF_FF_FF >>> -32, // backwards overshift + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + G = 0xFF_FF_FF_FF >>> -123, + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. + H = 0xFF_FF_FF_FF >>> -1024, + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt.diff index 3c458290e9..768069be87 100644 --- a/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/overshifts.errors.txt.diff @@ -1,6 +1,6 @@ --- old.overshifts.errors.txt +++ new.overshifts.errors.txt -@@= skipped -0, +-1 lines =@@ +@@= skipped -0, +0 lines =@@ -overshifts.ts(2,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. -overshifts.ts(3,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 27`. -overshifts.ts(4,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. @@ -37,222 +37,141 @@ -overshifts.ts(52,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. -overshifts.ts(53,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= -27`. -overshifts.ts(54,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. --overshifts.ts(58,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. --overshifts.ts(59,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 27`. --overshifts.ts(60,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. --overshifts.ts(62,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. --overshifts.ts(63,9): error TS6807: This operation can be simplified. This shift is identical to `1 << -27`. --overshifts.ts(64,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. --overshifts.ts(69,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. --overshifts.ts(70,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. --overshifts.ts(71,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. --overshifts.ts(73,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. --overshifts.ts(74,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. --overshifts.ts(75,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. --overshifts.ts(80,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. --overshifts.ts(81,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. --overshifts.ts(82,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. --overshifts.ts(84,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. --overshifts.ts(85,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. --overshifts.ts(86,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. -- -- + overshifts.ts(58,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + overshifts.ts(59,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 27`. + overshifts.ts(60,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +@@= skipped -53, +17 lines =@@ + overshifts.ts(86,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + + -==== overshifts.ts (54 errors) ==== -- 1 << 1; // ok -- 1 << 32; // overshift ++==== overshifts.ts (18 errors) ==== + 1 << 1; // ok + 1 << 32; // overshift - ~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. -- 1 << 123; + 1 << 123; - ~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 27`. -- 1 << 1024; + 1 << 1024; - ~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. -- 1 << -1; // OK-ish -- 1 << -32; // backwards overshift + 1 << -1; // OK-ish + 1 << -32; // backwards overshift - ~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. -- 1 << -123; + 1 << -123; - ~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << -27`. -- 1 << -1024; + 1 << -1024; - ~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. -- -- 0xFF_FF_FF_FF >> 1; // ok -- 0xFF_FF_FF_FF >> 32; // overshift + + 0xFF_FF_FF_FF >> 1; // ok + 0xFF_FF_FF_FF >> 32; // overshift - ~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. -- 0xFF_FF_FF_FF >> 123; + 0xFF_FF_FF_FF >> 123; - ~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. -- 0xFF_FF_FF_FF >> 1024; + 0xFF_FF_FF_FF >> 1024; - ~~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. -- 0xFF_FF_FF_FF >> -1; // OK-ish -- 0xFF_FF_FF_FF >> -32; // backwards overshift + 0xFF_FF_FF_FF >> -1; // OK-ish + 0xFF_FF_FF_FF >> -32; // backwards overshift - ~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. -- 0xFF_FF_FF_FF >> -123; + 0xFF_FF_FF_FF >> -123; - ~~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. -- 0xFF_FF_FF_FF >> -1024; + 0xFF_FF_FF_FF >> -1024; - ~~~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. -- -- 0xFF_FF_FF_FF >>> 1; // ok -- 0xFF_FF_FF_FF >>> 32; // overshift + + 0xFF_FF_FF_FF >>> 1; // ok + 0xFF_FF_FF_FF >>> 32; // overshift - ~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. -- 0xFF_FF_FF_FF >>> 123; + 0xFF_FF_FF_FF >>> 123; - ~~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. -- 0xFF_FF_FF_FF >>> 1024; + 0xFF_FF_FF_FF >>> 1024; - ~~~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. -- 0xFF_FF_FF_FF >>> -1; // OK-ish -- 0xFF_FF_FF_FF >>> -32; // backwards overshift + 0xFF_FF_FF_FF >>> -1; // OK-ish + 0xFF_FF_FF_FF >>> -32; // backwards overshift - ~~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. -- 0xFF_FF_FF_FF >>> -123; + 0xFF_FF_FF_FF >>> -123; - ~~~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. -- 0xFF_FF_FF_FF >>> -1024; + 0xFF_FF_FF_FF >>> -1024; - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. -- -- let x = 1; -- x <<= 1; // ok -- x <<= 32; // overshift + + let x = 1; + x <<= 1; // ok + x <<= 32; // overshift - ~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. -- x <<= 123; + x <<= 123; - ~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 27`. -- x <<= 1024; + x <<= 1024; - ~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. -- x <<= -1; // OK-ish -- x <<= -32; // backwards overshift + x <<= -1; // OK-ish + x <<= -32; // backwards overshift - ~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. -- x <<= -123; + x <<= -123; - ~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= -27`. -- x <<= -1024; + x <<= -1024; - ~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. -- -- x >>= 1; // ok -- x >>= 32; // overshift + + x >>= 1; // ok + x >>= 32; // overshift - ~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. -- x >>= 123; + x >>= 123; - ~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 27`. -- x >>= 1024; + x >>= 1024; - ~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. -- x >>= -1; // OK-ish -- x >>= -32; // backwards overshift + x >>= -1; // OK-ish + x >>= -32; // backwards overshift - ~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. -- x >>= -123; + x >>= -123; - ~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= -27`. -- x >>= -1024; + x >>= -1024; - ~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. -- -- x >>>= 1; // ok -- x >>>= 32; // overshift + + x >>>= 1; // ok + x >>>= 32; // overshift - ~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. -- x >>>= 123; + x >>>= 123; - ~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 27`. -- x >>>= 1024; + x >>>= 1024; - ~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. -- x >>>= -1; // OK-ish -- x >>>= -32; // backwards overshift + x >>>= -1; // OK-ish + x >>>= -32; // backwards overshift - ~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. -- x >>>= -123; + x >>>= -123; - ~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= -27`. -- x >>>= -1024; + x >>>= -1024; - ~~~~~~~~~~~~ -!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. -- -- enum One { -- A = 1 << 1, // ok -- B = 1 << 32, // overshift -- ~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. -- C = 1 << 123, -- ~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 27`. -- D = 1 << 1024, -- ~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. -- E = 1 << -1, // OK-ish -- F = 1 << -32, // backwards overshift -- ~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. -- G = 1 << -123, -- ~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `1 << -27`. -- H = 1 << -1024, -- ~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. -- } -- -- enum Two { -- A = 0xFF_FF_FF_FF >> 1, // ok -- B = 0xFF_FF_FF_FF >> 32, // overshift -- ~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. -- C = 0xFF_FF_FF_FF >> 123, -- ~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. -- D = 0xFF_FF_FF_FF >> 1024, -- ~~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. -- E = 0xFF_FF_FF_FF >> -1, // OK-ish -- F = 0xFF_FF_FF_FF >> -32, // backwards overshift -- ~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. -- G = 0xFF_FF_FF_FF >> -123, -- ~~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. -- H = 0xFF_FF_FF_FF >> -1024, -- ~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. -- } -- -- enum Three { -- A = 0xFF_FF_FF_FF >>> 1, // ok -- B = 0xFF_FF_FF_FF >>> 32, // overshift -- ~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. -- C = 0xFF_FF_FF_FF >>> 123, -- ~~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. -- D = 0xFF_FF_FF_FF >>> 1024, -- ~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. -- E = 0xFF_FF_FF_FF >>> -1, // OK-ish -- F = 0xFF_FF_FF_FF >>> -32, // backwards overshift -- ~~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. -- G = 0xFF_FF_FF_FF >>> -123, -- ~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. -- H = 0xFF_FF_FF_FF >>> -1024, -- ~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. -- } -- -@@= skipped --1, +1 lines =@@ -+ + + enum One { + A = 1 << 1, // ok diff --git a/testdata/baselines/reference/submodule/conformance/privateNameEnum.errors.txt b/testdata/baselines/reference/submodule/conformance/privateNameEnum.errors.txt new file mode 100644 index 0000000000..fd299e85db --- /dev/null +++ b/testdata/baselines/reference/submodule/conformance/privateNameEnum.errors.txt @@ -0,0 +1,10 @@ +privateNameEnum.ts(2,5): error TS18024: An enum member cannot be named with a private identifier. + + +==== privateNameEnum.ts (1 errors) ==== + enum E { + #x + ~~ +!!! error TS18024: An enum member cannot be named with a private identifier. + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/privateNameEnum.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/privateNameEnum.errors.txt.diff deleted file mode 100644 index 4e8f2468e9..0000000000 --- a/testdata/baselines/reference/submodule/conformance/privateNameEnum.errors.txt.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- old.privateNameEnum.errors.txt -+++ new.privateNameEnum.errors.txt -@@= skipped -0, +-1 lines =@@ --privateNameEnum.ts(2,5): error TS18024: An enum member cannot be named with a private identifier. -- -- --==== privateNameEnum.ts (1 errors) ==== -- enum E { -- #x -- ~~ --!!! error TS18024: An enum member cannot be named with a private identifier. -- } -- -@@= skipped --1, +1 lines =@@ -+ From dbcf8cd58334322ba27b0bc7f5683bbee5a8f773 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 17:39:01 -0700 Subject: [PATCH 28/31] Simple free list for Relater objects --- internal/checker/checker.go | 2 +- internal/checker/relater.go | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index ad071bef48..9247696925 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -740,7 +740,7 @@ type Checker struct { reverseMappedSourceStack []*Type reverseMappedTargetStack []*Type reverseExpandingFlags ExpandingFlags - relaters []Relater + freeRelater *Relater subtypeRelation *Relation strictSubtypeRelation *Relation assignableRelation *Relation diff --git a/internal/checker/relater.go b/internal/checker/relater.go index 0eaedd1c2e..25eb1bdf30 100644 --- a/internal/checker/relater.go +++ b/internal/checker/relater.go @@ -365,10 +365,12 @@ func (c *Checker) checkTypeRelatedToEx( headMessage *diagnostics.Message, diagnosticOutput *[]*ast.Diagnostic, ) bool { - relaterCount := len(c.relaters) - c.relaters = slices.Grow(c.relaters, 1)[:relaterCount+1] - r := &c.relaters[relaterCount] - r.c = c + r := c.freeRelater + if r == nil { + r = &Relater{c: c} + } else { + c.freeRelater = r.next + } r.relation = relation r.errorNode = errorNode r.relationCount = (16_000_000 - relation.size()) / 8 @@ -396,14 +398,16 @@ func (c *Checker) checkTypeRelatedToEx( } c.reportDiagnostic(createDiagnosticChainFromErrorChain(r.errorChain, r.errorNode, r.relatedInfo), diagnosticOutput) } - c.relaters = c.relaters[:relaterCount] r.maybeKeysSet.Clear() *r = Relater{ + c: c, maybeKeys: r.maybeKeys[:0], maybeKeysSet: r.maybeKeysSet, sourceStack: r.sourceStack[:0], targetStack: r.targetStack[:0], + next: c.freeRelater, } + c.freeRelater = r return result != TernaryFalse } @@ -2521,6 +2525,7 @@ type Relater struct { expandingFlags ExpandingFlags overflow bool relationCount int + next *Relater } func (r *Relater) isRelatedToSimple(source *Type, target *Type) Ternary { From f6c028a2d61d6201cd707e799096c6deace71ce4 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 17:39:27 -0700 Subject: [PATCH 29/31] Accept new baselines --- ...rtyOfGenericFilteringMappedType.errors.txt | 2 -- ...GenericFilteringMappedType.errors.txt.diff | 13 ---------- ...nvariantGenericErrorElaboration.errors.txt | 16 +++++++----- ...antGenericErrorElaboration.errors.txt.diff | 26 +++++++++---------- .../conformance/conditionalTypes1.errors.txt | 6 ----- .../conditionalTypes1.errors.txt.diff | 19 -------------- .../conformance/mappedTypes6.errors.txt | 8 ------ .../conformance/mappedTypes6.errors.txt.diff | 21 --------------- 8 files changed, 23 insertions(+), 88 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericFilteringMappedType.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/conditionalTypes1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypes6.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericFilteringMappedType.errors.txt b/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericFilteringMappedType.errors.txt index f4de4b6f0a..0c45d770b1 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericFilteringMappedType.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericFilteringMappedType.errors.txt @@ -1,10 +1,8 @@ -error TS2353: Object literal may only specify known properties, and 'foo' does not exist in type '{ bar: (value: string, prop: "bar") => void; }'. contextualPropertyOfGenericFilteringMappedType.ts(38,5): error TS2353: Object literal may only specify known properties, and 'foo' does not exist in type '{ bar: (value: string, prop: "bar") => void; }'. contextualPropertyOfGenericFilteringMappedType.ts(38,11): error TS7006: Parameter 'value' implicitly has an 'any' type. contextualPropertyOfGenericFilteringMappedType.ts(38,18): error TS7006: Parameter 'key' implicitly has an 'any' type. -!!! error TS2353: Object literal may only specify known properties, and 'foo' does not exist in type '{ bar: (value: string, prop: "bar") => void; }'. ==== contextualPropertyOfGenericFilteringMappedType.ts (3 errors) ==== declare function f1( data: T, diff --git a/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericFilteringMappedType.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericFilteringMappedType.errors.txt.diff deleted file mode 100644 index 321dc954f6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericFilteringMappedType.errors.txt.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.contextualPropertyOfGenericFilteringMappedType.errors.txt -+++ new.contextualPropertyOfGenericFilteringMappedType.errors.txt -@@= skipped -0, +0 lines =@@ -+error TS2353: Object literal may only specify known properties, and 'foo' does not exist in type '{ bar: (value: string, prop: "bar") => void; }'. - contextualPropertyOfGenericFilteringMappedType.ts(38,5): error TS2353: Object literal may only specify known properties, and 'foo' does not exist in type '{ bar: (value: string, prop: "bar") => void; }'. - contextualPropertyOfGenericFilteringMappedType.ts(38,11): error TS7006: Parameter 'value' implicitly has an 'any' type. - contextualPropertyOfGenericFilteringMappedType.ts(38,18): error TS7006: Parameter 'key' implicitly has an 'any' type. - - -+!!! error TS2353: Object literal may only specify known properties, and 'foo' does not exist in type '{ bar: (value: string, prop: "bar") => void; }'. - ==== contextualPropertyOfGenericFilteringMappedType.ts (3 errors) ==== - declare function f1( - data: T, diff --git a/testdata/baselines/reference/submodule/compiler/invariantGenericErrorElaboration.errors.txt b/testdata/baselines/reference/submodule/compiler/invariantGenericErrorElaboration.errors.txt index 38e6c4b6e0..dda3c9331e 100644 --- a/testdata/baselines/reference/submodule/compiler/invariantGenericErrorElaboration.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/invariantGenericErrorElaboration.errors.txt @@ -1,7 +1,9 @@ invariantGenericErrorElaboration.ts(3,7): error TS2322: Type 'Num' is not assignable to type 'Runtype'. - Types of property 'constraint' are incompatible. - Type 'Constraint' is not assignable to type 'Constraint>'. - Property 'tag' is missing in type 'Runtype' but required in type 'Num'. + The types of 'constraint.constraint' are incompatible between these types. + Type 'Constraint>' is not assignable to type 'Constraint>>'. + Type 'Constraint>' is not assignable to type 'Constraint'. + Types of property 'underlying' are incompatible. + Property 'tag' is missing in type 'Runtype' but required in type 'Num'. invariantGenericErrorElaboration.ts(4,19): error TS2322: Type 'Num' is not assignable to type 'Runtype'. The types of 'constraint.constraint' are incompatible between these types. Type 'Constraint>' is not assignable to type 'Constraint>>'. @@ -16,9 +18,11 @@ invariantGenericErrorElaboration.ts(4,19): error TS2322: Type 'Num' is not assig const wat: Runtype = Num; ~~~ !!! error TS2322: Type 'Num' is not assignable to type 'Runtype'. -!!! error TS2322: Types of property 'constraint' are incompatible. -!!! error TS2322: Type 'Constraint' is not assignable to type 'Constraint>'. -!!! error TS2322: Property 'tag' is missing in type 'Runtype' but required in type 'Num'. +!!! error TS2322: The types of 'constraint.constraint' are incompatible between these types. +!!! error TS2322: Type 'Constraint>' is not assignable to type 'Constraint>>'. +!!! error TS2322: Type 'Constraint>' is not assignable to type 'Constraint'. +!!! error TS2322: Types of property 'underlying' are incompatible. +!!! error TS2322: Property 'tag' is missing in type 'Runtype' but required in type 'Num'. const Foo = Obj({ foo: Num }) ~~~ !!! error TS2322: Type 'Num' is not assignable to type 'Runtype'. diff --git a/testdata/baselines/reference/submodule/compiler/invariantGenericErrorElaboration.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/invariantGenericErrorElaboration.errors.txt.diff index 50f863e84a..8bb85ec3ce 100644 --- a/testdata/baselines/reference/submodule/compiler/invariantGenericErrorElaboration.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/invariantGenericErrorElaboration.errors.txt.diff @@ -2,11 +2,12 @@ +++ new.invariantGenericErrorElaboration.errors.txt @@= skipped -0, +0 lines =@@ invariantGenericErrorElaboration.ts(3,7): error TS2322: Type 'Num' is not assignable to type 'Runtype'. -- The types of 'constraint.constraint' are incompatible between these types. -- Type 'Constraint>' is not assignable to type 'Constraint>>'. -+ Types of property 'constraint' are incompatible. -+ Type 'Constraint' is not assignable to type 'Constraint>'. - Property 'tag' is missing in type 'Runtype' but required in type 'Num'. + The types of 'constraint.constraint' are incompatible between these types. + Type 'Constraint>' is not assignable to type 'Constraint>>'. +- Property 'tag' is missing in type 'Runtype' but required in type 'Num'. ++ Type 'Constraint>' is not assignable to type 'Constraint'. ++ Types of property 'underlying' are incompatible. ++ Property 'tag' is missing in type 'Runtype' but required in type 'Num'. invariantGenericErrorElaboration.ts(4,19): error TS2322: Type 'Num' is not assignable to type 'Runtype'. The types of 'constraint.constraint' are incompatible between these types. Type 'Constraint>' is not assignable to type 'Constraint>>'. @@ -17,15 +18,14 @@ ==== invariantGenericErrorElaboration.ts (2 errors) ==== -@@= skipped -13, +15 lines =@@ - const wat: Runtype = Num; - ~~~ +@@= skipped -15, +19 lines =@@ !!! error TS2322: Type 'Num' is not assignable to type 'Runtype'. --!!! error TS2322: The types of 'constraint.constraint' are incompatible between these types. --!!! error TS2322: Type 'Constraint>' is not assignable to type 'Constraint>>'. -+!!! error TS2322: Types of property 'constraint' are incompatible. -+!!! error TS2322: Type 'Constraint' is not assignable to type 'Constraint>'. - !!! error TS2322: Property 'tag' is missing in type 'Runtype' but required in type 'Num'. + !!! error TS2322: The types of 'constraint.constraint' are incompatible between these types. + !!! error TS2322: Type 'Constraint>' is not assignable to type 'Constraint>>'. +-!!! error TS2322: Property 'tag' is missing in type 'Runtype' but required in type 'Num'. ++!!! error TS2322: Type 'Constraint>' is not assignable to type 'Constraint'. ++!!! error TS2322: Types of property 'underlying' are incompatible. ++!!! error TS2322: Property 'tag' is missing in type 'Runtype' but required in type 'Num'. const Foo = Obj({ foo: Num }) ~~~ !!! error TS2322: Type 'Num' is not assignable to type 'Runtype'. diff --git a/testdata/baselines/reference/submodule/conformance/conditionalTypes1.errors.txt b/testdata/baselines/reference/submodule/conformance/conditionalTypes1.errors.txt index 21dd23f4c7..aa2ae24033 100644 --- a/testdata/baselines/reference/submodule/conformance/conditionalTypes1.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/conditionalTypes1.errors.txt @@ -1,6 +1,3 @@ -error TS2322: Type 'T' is not assignable to type '{}'. - Type 'string | undefined' is not assignable to type '{}'. - Type 'undefined' is not assignable to type '{}'. conditionalTypes1.ts(12,5): error TS2322: Type 'T' is not assignable to type 'NonNullable'. Type 'T' is not assignable to type '{}'. conditionalTypes1.ts(17,5): error TS2322: Type 'T' is not assignable to type 'NonNullable'. @@ -82,9 +79,6 @@ conditionalTypes1.ts(288,43): error TS2322: Type 'T95' is not assignable to t Type 'boolean' is not assignable to type 'true'. -!!! error TS2322: Type 'T' is not assignable to type '{}'. -!!! error TS2322: Type 'string | undefined' is not assignable to type '{}'. -!!! error TS2322: Type 'undefined' is not assignable to type '{}'. ==== conditionalTypes1.ts (20 errors) ==== type T00 = Exclude<"a" | "b" | "c" | "d", "a" | "c" | "f">; // "b" | "d" type T01 = Extract<"a" | "b" | "c" | "d", "a" | "c" | "f">; // "a" | "c" diff --git a/testdata/baselines/reference/submodule/conformance/conditionalTypes1.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/conditionalTypes1.errors.txt.diff deleted file mode 100644 index 6133dfc03f..0000000000 --- a/testdata/baselines/reference/submodule/conformance/conditionalTypes1.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.conditionalTypes1.errors.txt -+++ new.conditionalTypes1.errors.txt -@@= skipped -0, +0 lines =@@ -+error TS2322: Type 'T' is not assignable to type '{}'. -+ Type 'string | undefined' is not assignable to type '{}'. -+ Type 'undefined' is not assignable to type '{}'. - conditionalTypes1.ts(12,5): error TS2322: Type 'T' is not assignable to type 'NonNullable'. - Type 'T' is not assignable to type '{}'. - conditionalTypes1.ts(17,5): error TS2322: Type 'T' is not assignable to type 'NonNullable'. -@@= skipped -78, +81 lines =@@ - Type 'boolean' is not assignable to type 'true'. - - -+!!! error TS2322: Type 'T' is not assignable to type '{}'. -+!!! error TS2322: Type 'string | undefined' is not assignable to type '{}'. -+!!! error TS2322: Type 'undefined' is not assignable to type '{}'. - ==== conditionalTypes1.ts (20 errors) ==== - type T00 = Exclude<"a" | "b" | "c" | "d", "a" | "c" | "f">; // "b" | "d" - type T01 = Extract<"a" | "b" | "c" | "d", "a" | "c" | "f">; // "a" | "c" diff --git a/testdata/baselines/reference/submodule/conformance/mappedTypes6.errors.txt b/testdata/baselines/reference/submodule/conformance/mappedTypes6.errors.txt index 75f7cd1c7f..5138f66afc 100644 --- a/testdata/baselines/reference/submodule/conformance/mappedTypes6.errors.txt +++ b/testdata/baselines/reference/submodule/conformance/mappedTypes6.errors.txt @@ -1,7 +1,3 @@ -error TS2322: Type 'T[P]' is not assignable to type '{}'. - Type 'T[keyof T]' is not assignable to type '{}'. - Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'. - Type 'T[string]' is not assignable to type '{}'. mappedTypes6.ts(23,5): error TS2322: Type 'T' is not assignable to type 'Required'. mappedTypes6.ts(24,5): error TS2322: Type 'Partial' is not assignable to type 'Required'. mappedTypes6.ts(27,5): error TS2322: Type 'Partial' is not assignable to type 'T'. @@ -44,10 +40,6 @@ mappedTypes6.ts(119,4): error TS2540: Cannot assign to 'a' because it is a read- mappedTypes6.ts(120,4): error TS2540: Cannot assign to 'b' because it is a read-only property. -!!! error TS2322: Type 'T[P]' is not assignable to type '{}'. -!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. -!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'. -!!! error TS2322: Type 'T[string]' is not assignable to type '{}'. ==== mappedTypes6.ts (19 errors) ==== type T00 = { [P in keyof T]: T[P] }; type T01 = { [P in keyof T]?: T[P] }; diff --git a/testdata/baselines/reference/submodule/conformance/mappedTypes6.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/mappedTypes6.errors.txt.diff deleted file mode 100644 index 47e886c6d6..0000000000 --- a/testdata/baselines/reference/submodule/conformance/mappedTypes6.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.mappedTypes6.errors.txt -+++ new.mappedTypes6.errors.txt -@@= skipped -0, +0 lines =@@ -+error TS2322: Type 'T[P]' is not assignable to type '{}'. -+ Type 'T[keyof T]' is not assignable to type '{}'. -+ Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'. -+ Type 'T[string]' is not assignable to type '{}'. - mappedTypes6.ts(23,5): error TS2322: Type 'T' is not assignable to type 'Required'. - mappedTypes6.ts(24,5): error TS2322: Type 'Partial' is not assignable to type 'Required'. - mappedTypes6.ts(27,5): error TS2322: Type 'Partial' is not assignable to type 'T'. -@@= skipped -39, +43 lines =@@ - mappedTypes6.ts(120,4): error TS2540: Cannot assign to 'b' because it is a read-only property. - - -+!!! error TS2322: Type 'T[P]' is not assignable to type '{}'. -+!!! error TS2322: Type 'T[keyof T]' is not assignable to type '{}'. -+!!! error TS2322: Type 'T[string] | T[number] | T[symbol]' is not assignable to type '{}'. -+!!! error TS2322: Type 'T[string]' is not assignable to type '{}'. - ==== mappedTypes6.ts (19 errors) ==== - type T00 = { [P in keyof T]: T[P] }; - type T01 = { [P in keyof T]?: T[P] }; From ff5ab0901d52e8cf11fb5b7af7898b233235851e Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 16 Mar 2025 17:57:15 -0700 Subject: [PATCH 30/31] Accept new baselines --- .../submodule/compiler/ambientEnum1.types | 4 +- .../compiler/ambientEnum1.types.diff | 20 - .../ambientEnumElementInitializer1.types | 2 +- .../ambientEnumElementInitializer1.types.diff | 11 - .../ambientEnumElementInitializer2.types | 2 +- .../ambientEnumElementInitializer2.types.diff | 11 - .../ambientEnumElementInitializer3.types | 2 +- .../ambientEnumElementInitializer3.types.diff | 11 - .../ambientEnumElementInitializer4.types | 2 +- .../ambientEnumElementInitializer4.types.diff | 11 - .../ambientEnumElementInitializer5.types | 2 +- .../ambientEnumElementInitializer5.types.diff | 11 - .../ambientEnumElementInitializer6.types | 2 +- .../ambientEnumElementInitializer6.types.diff | 11 - .../compiler/augmentedTypesClass.types | 2 +- .../compiler/augmentedTypesClass.types.diff | 10 - .../compiler/augmentedTypesClass2.types | 2 +- .../compiler/augmentedTypesClass2.types.diff | 9 - .../compiler/augmentedTypesEnum.types | 22 +- .../compiler/augmentedTypesEnum.types.diff | 78 +-- .../compiler/augmentedTypesEnum2.types | 4 +- .../compiler/augmentedTypesEnum2.types.diff | 16 +- .../compiler/augmentedTypesEnum3.types | 4 +- .../compiler/augmentedTypesEnum3.types.diff | 18 - .../compiler/augmentedTypesFunction.types | 2 +- .../augmentedTypesFunction.types.diff | 11 +- .../compiler/augmentedTypesInterface.types | 2 +- .../augmentedTypesInterface.types.diff | 5 +- .../compiler/augmentedTypesModules.types | 8 +- .../compiler/augmentedTypesModules.types.diff | 32 +- .../compiler/augmentedTypesModules4.types | 8 +- .../augmentedTypesModules4.types.diff | 32 +- .../compiler/augmentedTypesVar.types | 2 +- .../compiler/augmentedTypesVar.types.diff | 11 +- ...blockScopedEnumVariablesUseBeforeDef.types | 28 +- ...ScopedEnumVariablesUseBeforeDef.types.diff | 62 --- ...ariablesUseBeforeDef_isolatedModules.types | 28 +- ...lesUseBeforeDef_isolatedModules.types.diff | 62 --- ...edEnumVariablesUseBeforeDef_preserve.types | 28 +- ...mVariablesUseBeforeDef_preserve.types.diff | 62 --- ...lesUseBeforeDef_verbatimModuleSyntax.types | 28 +- ...eBeforeDef_verbatimModuleSyntax.types.diff | 62 --- ...pedFunctionDeclarationInStrictModule.types | 2 +- ...nctionDeclarationInStrictModule.types.diff | 9 - ...lizersUsePropertiesBeforeDeclaration.types | 8 +- ...sUsePropertiesBeforeDeclaration.types.diff | 25 - ...ionCodeGenEnumWithEnumMemberConflict.types | 4 +- ...deGenEnumWithEnumMemberConflict.types.diff | 17 - ...nCodeGenModuleWithEnumMemberConflict.types | 4 +- ...GenModuleWithEnumMemberConflict.types.diff | 18 - .../submodule/compiler/commentsModules.types | 88 ++-- .../compiler/commentsModules.types.diff | 88 ++-- .../compiler/computedEnumTypeWidening.types | 26 +- .../computedEnumTypeWidening.types.diff | 113 ----- .../compiler/constEnumBadPropertyNames.types | 2 +- .../constEnumBadPropertyNames.types.diff | 11 - .../submodule/compiler/constEnumErrors.types | 4 +- .../compiler/constEnumErrors.types.diff | 20 +- .../constEnumMergingWithValues1.types | 2 +- .../constEnumMergingWithValues1.types.diff | 5 +- .../constEnumMergingWithValues2.types | 2 +- .../constEnumMergingWithValues2.types.diff | 5 +- .../constEnumMergingWithValues3.types | 6 +- .../constEnumMergingWithValues3.types.diff | 16 +- .../constEnumMergingWithValues4.types | 2 +- .../constEnumMergingWithValues4.types.diff | 5 +- .../constEnumMergingWithValues5.types | 2 +- .../constEnumMergingWithValues5.types.diff | 5 +- .../compiler/constEnumOnlyModuleMerging.types | 8 +- .../constEnumOnlyModuleMerging.types.diff | 11 +- .../constEnumPreserveEmitNamedExport1.types | 2 +- ...nstEnumPreserveEmitNamedExport1.types.diff | 11 - .../constEnumPreserveEmitNamedExport2.types | 2 +- ...nstEnumPreserveEmitNamedExport2.types.diff | 11 - .../compiler/declFileGenericType2.types | 18 +- .../compiler/declFileGenericType2.types.diff | 26 +- ...tingWithClassReferredByExtendsClause.types | 12 +- ...ithClassReferredByExtendsClause.types.diff | 16 +- ...lauseThatHasItsContainerNameConflict.types | 2 +- ...ThatHasItsContainerNameConflict.types.diff | 11 - ...lModuleNameConflictsInExtendsClause1.types | 6 +- ...leNameConflictsInExtendsClause1.types.diff | 11 +- ...lModuleNameConflictsInExtendsClause2.types | 8 +- ...leNameConflictsInExtendsClause2.types.diff | 8 +- ...lModuleNameConflictsInExtendsClause3.types | 12 +- ...leNameConflictsInExtendsClause3.types.diff | 20 +- ...larationEmitClassMemberNameConflict2.types | 4 +- ...ionEmitClassMemberNameConflict2.types.diff | 19 - ...rationEmitComputedNameConstEnumAlias.types | 8 +- ...nEmitComputedNameConstEnumAlias.types.diff | 32 -- ...tionEmitForGlobalishSpecifierSymlink.types | 18 +- ...mitForGlobalishSpecifierSymlink.types.diff | 38 +- ...ionEmitForGlobalishSpecifierSymlink2.types | 14 +- ...itForGlobalishSpecifierSymlink2.types.diff | 25 +- .../declarationEmitNameConflicts.types | 6 +- .../declarationEmitNameConflicts.types.diff | 11 +- .../declarationEmitNameConflicts2.types | 56 +-- .../declarationEmitNameConflicts2.types.diff | 75 +-- .../declarationEmitNameConflicts3.types | 2 +- .../declarationEmitNameConflicts3.types.diff | 9 +- .../submodule/compiler/dottedModuleName.types | 2 +- .../compiler/dottedModuleName.types.diff | 11 - .../compiler/dottedModuleName2.types | 20 +- .../compiler/dottedModuleName2.types.diff | 24 +- .../compiler/dottedNamesInSystem.types | 16 +- .../compiler/dottedNamesInSystem.types.diff | 25 +- .../compiler/duplicateIdentifierEnum.types | 8 +- .../duplicateIdentifierEnum.types.diff | 35 +- .../compiler/duplicateLocalVariable4.types | 6 +- .../duplicateLocalVariable4.types.diff | 21 - ...eObjectLiteralProperty_computedName2.types | 20 +- ...ctLiteralProperty_computedName2.types.diff | 50 +- ...eObjectLiteralProperty_computedName3.types | 20 +- ...ctLiteralProperty_computedName3.types.diff | 32 +- .../compiler/emitMemberAccessExpression.types | 6 +- .../emitMemberAccessExpression.types.diff | 16 - .../compiler/enumAssignmentCompat4.types | 36 +- .../compiler/enumAssignmentCompat4.types.diff | 67 +-- .../compiler/enumAssignmentCompat7.types | 16 +- .../compiler/enumAssignmentCompat7.types.diff | 32 +- .../enumConflictsWithGlobalIdentifier.types | 8 +- ...umConflictsWithGlobalIdentifier.types.diff | 23 - .../compiler/enumFromExternalModule.types | 8 +- .../enumFromExternalModule.types.diff | 10 +- .../compiler/enumGenericTypeClash.types | 2 +- .../compiler/enumGenericTypeClash.types.diff | 5 +- .../compiler/enumMemberResolution.types | 8 +- .../compiler/enumMemberResolution.types.diff | 23 - .../submodule/compiler/enumOperations.types | 22 +- .../compiler/enumOperations.types.diff | 72 --- .../submodule/compiler/enumWithExport.types | 2 +- .../compiler/enumWithExport.types.diff | 11 - .../compiler/enumWithInfinityProperty.types | 2 +- .../enumWithInfinityProperty.types.diff | 11 - .../compiler/enumWithNaNProperty.types | 2 +- .../compiler/enumWithNaNProperty.types.diff | 11 - .../enumWithNegativeInfinityProperty.types | 2 +- ...numWithNegativeInfinityProperty.types.diff | 8 +- .../enumWithParenthesizedInitializer1.types | 2 +- ...umWithParenthesizedInitializer1.types.diff | 11 - .../compiler/enumWithQuotedElementName1.types | 2 +- .../enumWithQuotedElementName1.types.diff | 8 +- .../compiler/enumWithQuotedElementName2.types | 2 +- .../enumWithQuotedElementName2.types.diff | 8 +- .../compiler/enumWithUnicodeEscape1.types | 2 +- .../enumWithUnicodeEscape1.types.diff | 8 +- .../enumsWithMultipleDeclarations1.types | 6 +- .../enumsWithMultipleDeclarations1.types.diff | 27 -- .../enumsWithMultipleDeclarations3.types | 2 +- .../enumsWithMultipleDeclarations3.types.diff | 5 - ...ImportCanSubstituteConstEnumForValue.types | 36 +- ...tCanSubstituteConstEnumForValue.types.diff | 43 +- .../compiler/functionMergedWithModule.types | 8 +- .../functionMergedWithModule.types.diff | 16 - ...assPropertyInheritanceSpecialization.types | 14 +- ...opertyInheritanceSpecialization.types.diff | 14 +- ...ericConstraintOnExtendedBuiltinTypes.types | 4 +- ...onstraintOnExtendedBuiltinTypes.types.diff | 17 - ...ricConstraintOnExtendedBuiltinTypes2.types | 4 +- ...nstraintOnExtendedBuiltinTypes2.types.diff | 17 - .../compiler/importAliasFromNamespace.types | 22 +- .../importAliasFromNamespace.types.diff | 36 +- .../compiler/importElisionEnum.types | 2 +- .../compiler/importElisionEnum.types.diff | 3 +- .../internalAliasWithDottedNameEmit.types | 6 +- ...internalAliasWithDottedNameEmit.types.diff | 7 +- .../isolatedDeclarationErrorsEnums.types | 22 +- .../isolatedDeclarationErrorsEnums.types.diff | 62 --- .../isolatedDeclarationErrorsObjects.types | 6 +- ...solatedDeclarationErrorsObjects.types.diff | 24 +- .../isolatedModulesAmbientConstEnum.types | 8 +- ...isolatedModulesAmbientConstEnum.types.diff | 20 - .../isolatedModulesImportConstEnum.types | 6 +- .../isolatedModulesImportConstEnum.types.diff | 19 - ...olatedModulesImportConstEnumTypeOnly.types | 6 +- ...dModulesImportConstEnumTypeOnly.types.diff | 20 - .../isolatedModulesNonAmbientConstEnum.types | 8 +- ...latedModulesNonAmbientConstEnum.types.diff | 22 - .../compiler/jsdocAccessEnumType.types | 6 +- .../compiler/jsdocAccessEnumType.types.diff | 18 +- .../compiler/mergeWithImportedType.types | 4 +- .../compiler/mergeWithImportedType.types.diff | 18 - .../compiler/mergedDeclarations2.types | 6 +- .../compiler/mergedDeclarations2.types.diff | 23 - .../mergedEnumDeclarationCodeGen.types | 8 +- .../mergedEnumDeclarationCodeGen.types.diff | 26 - .../mergedModuleDeclarationCodeGen2.types | 8 +- ...mergedModuleDeclarationCodeGen2.types.diff | 13 - .../mergedModuleDeclarationCodeGen3.types | 4 +- ...mergedModuleDeclarationCodeGen3.types.diff | 12 - .../mergedModuleDeclarationCodeGen4.types | 4 +- ...mergedModuleDeclarationCodeGen4.types.diff | 13 - .../mergedModuleDeclarationCodeGen5.types | 8 +- ...mergedModuleDeclarationCodeGen5.types.diff | 17 - .../methodContainingLocalFunction.types | 2 +- .../methodContainingLocalFunction.types.diff | 9 - .../compiler/moduleCodeGenTest5.types | 16 +- .../compiler/moduleCodeGenTest5.types.diff | 36 -- .../submodule/compiler/moduleExports1.types | 22 +- .../compiler/moduleExports1.types.diff | 25 +- .../submodule/compiler/moduleImport.types | 14 +- .../compiler/moduleImport.types.diff | 22 +- ...eLocalImportNotIncorrectlyRedirected.types | 2 +- ...lImportNotIncorrectlyRedirected.types.diff | 7 - .../moduleMemberWithoutTypeAnnotation1.types | 10 +- ...uleMemberWithoutTypeAnnotation1.types.diff | 18 - ...resNameWithImportDeclarationInsideIt.types | 12 +- ...meWithImportDeclarationInsideIt.types.diff | 20 +- ...esNameWithImportDeclarationInsideIt2.types | 12 +- ...eWithImportDeclarationInsideIt2.types.diff | 20 +- ...esNameWithImportDeclarationInsideIt4.types | 12 +- ...eWithImportDeclarationInsideIt4.types.diff | 19 +- ...esNameWithImportDeclarationInsideIt6.types | 4 +- ...eWithImportDeclarationInsideIt6.types.diff | 9 +- .../nestedExcessPropertyChecking.types | 6 +- .../nestedExcessPropertyChecking.types.diff | 22 +- .../submodule/compiler/noCrashOnMixin.types | 2 +- .../compiler/noCrashOnMixin.types.diff | 8 - .../noCrashUMDMergedWithGlobalValue.types | 4 +- ...noCrashUMDMergedWithGlobalValue.types.diff | 6 +- .../compiler/noImplicitAnyIndexing.types | 18 +- .../compiler/noImplicitAnyIndexing.types.diff | 58 +-- .../noImplicitAnyIndexingSuppressed.types | 18 +- ...noImplicitAnyIndexingSuppressed.types.diff | 58 +-- .../noUnusedLocals_selfReference.types | 6 +- .../noUnusedLocals_selfReference.types.diff | 18 +- .../nonExportedElementsOfMergedModules.types | 4 +- ...ExportedElementsOfMergedModules.types.diff | 20 - .../compiler/operatorAddNullUndefined.types | 18 +- .../operatorAddNullUndefined.types.diff | 50 -- .../submodule/compiler/overshifts.types | 2 +- .../submodule/compiler/overshifts.types.diff | 11 - .../parseEntityNameWithReservedWord.types | 8 +- ...parseEntityNameWithReservedWord.types.diff | 20 - .../compiler/preserveConstEnums.types | 4 +- .../compiler/preserveConstEnums.types.diff | 16 - .../compiler/reachabilityChecks1.types | 6 +- .../compiler/reachabilityChecks1.types.diff | 23 +- .../compiler/reachabilityChecks2.types | 4 +- .../compiler/reachabilityChecks2.types.diff | 16 +- .../recursiveClassReferenceTest.types | 10 +- .../recursiveClassReferenceTest.types.diff | 19 +- .../strictModeEnumMemberNameReserved.types | 8 +- ...trictModeEnumMemberNameReserved.types.diff | 23 - .../systemModuleAmbientDeclarations.types | 4 +- ...systemModuleAmbientDeclarations.types.diff | 20 - .../compiler/systemModuleConstEnums.types | 12 +- .../systemModuleConstEnums.types.diff | 28 +- ...mModuleConstEnumsSeparateCompilation.types | 12 +- ...leConstEnumsSeparateCompilation.types.diff | 28 +- .../systemModuleDeclarationMerging.types | 2 +- .../systemModuleDeclarationMerging.types.diff | 2 +- ...systemModuleNonTopLevelModuleMembers.types | 4 +- ...mModuleNonTopLevelModuleMembers.types.diff | 19 - ...is_inside-enum-should-not-be-allowed.types | 4 +- ...side-enum-should-not-be-allowed.types.diff | 20 - .../compiler/tsxDefaultImports.types | 8 +- .../compiler/tsxDefaultImports.types.diff | 20 +- ...clarations(preserveconstenums=false).types | 50 +- ...tions(preserveconstenums=false).types.diff | 149 ------ ...eclarations(preserveconstenums=true).types | 50 +- ...ations(preserveconstenums=true).types.diff | 149 ------ ...ssAndModuleWithSameNameAndCommonRoot.types | 30 +- ...ModuleWithSameNameAndCommonRoot.types.diff | 39 +- ...ndModuleWithSameNameAndCommonRootES6.types | 30 +- ...uleWithSameNameAndCommonRootES6.types.diff | 39 +- ...uleAndClassWithSameNameAndCommonRoot.types | 4 +- ...dClassWithSameNameAndCommonRoot.types.diff | 13 - ...EachWithExportedModulesOfTheSameName.types | 8 +- ...ithExportedModulesOfTheSameName.types.diff | 14 +- .../conformance/ambientDeclarations.types | 2 +- .../ambientDeclarations.types.diff | 9 - .../submodule/conformance/ambientErrors.types | 4 +- .../conformance/ambientErrors.types.diff | 20 +- ...mbientInsideNonAmbientExternalModule.types | 2 +- ...tInsideNonAmbientExternalModule.types.diff | 2 +- .../anyAssignabilityInInheritance.types | 8 +- .../anyAssignabilityInInheritance.types.diff | 22 +- .../anyAssignableToEveryType.types | 6 +- .../anyAssignableToEveryType.types.diff | 25 +- .../anyAssignableToEveryType2.types | 2 +- .../anyAssignableToEveryType2.types.diff | 9 +- .../asiPreventsParsingAsNamespace05.types | 8 +- ...asiPreventsParsingAsNamespace05.types.diff | 13 +- .../conformance/assignAnyToEveryType.types | 12 +- .../assignAnyToEveryType.types.diff | 34 +- .../conformance/assignEveryTypeToAny.types | 18 +- .../assignEveryTypeToAny.types.diff | 40 +- .../assignmentCompatWithEnumIndexer.types | 4 +- ...assignmentCompatWithEnumIndexer.types.diff | 18 - ...assignmentToParenthesizedIdentifiers.types | 2 +- ...nmentToParenthesizedIdentifiers.types.diff | 9 - .../submodule/conformance/assignments.types | 2 +- .../conformance/assignments.types.diff | 11 +- .../submodule/conformance/asyncEnum_es5.types | 2 +- .../conformance/asyncEnum_es5.types.diff | 11 - .../submodule/conformance/asyncEnum_es6.types | 2 +- .../conformance/asyncEnum_es6.types.diff | 11 - .../conformance/bestCommonTypeOfTuple.types | 40 +- .../bestCommonTypeOfTuple.types.diff | 95 ---- ...WithoutReturnTypeAnnotationInference.types | 2 +- ...utReturnTypeAnnotationInference.types.diff | 9 - .../submodule/conformance/castingTuple.types | 18 +- .../conformance/castingTuple.types.diff | 41 -- .../classConstructorAccessibility.types | 16 +- .../classConstructorAccessibility.types.diff | 40 +- .../classConstructorAccessibility2.types | 12 +- .../classConstructorAccessibility2.types.diff | 37 -- .../classConstructorAccessibility5.types | 2 +- .../classConstructorAccessibility5.types.diff | 11 - .../conformance/classExtendingPrimitive.types | 2 +- .../classExtendingPrimitive.types.diff | 11 - .../computedPropertyNames47_ES5.types | 14 +- .../computedPropertyNames47_ES5.types.diff | 27 +- .../computedPropertyNames47_ES6.types | 14 +- .../computedPropertyNames47_ES6.types.diff | 27 +- .../computedPropertyNames48_ES5.types | 6 +- .../computedPropertyNames48_ES5.types.diff | 14 - .../computedPropertyNames48_ES6.types | 6 +- .../computedPropertyNames48_ES6.types.diff | 14 - .../computedPropertyNames7_ES5.types | 6 +- .../computedPropertyNames7_ES5.types.diff | 16 +- .../computedPropertyNames7_ES6.types | 6 +- .../computedPropertyNames7_ES6.types.diff | 16 +- .../conformance/constAssertionOnEnum.types | 16 +- .../constAssertionOnEnum.types.diff | 38 -- ...estructuringParameterDeclaration1ES5.types | 2 +- ...cturingParameterDeclaration1ES5.types.diff | 9 +- ...ringParameterDeclaration1ES5iterable.types | 2 +- ...arameterDeclaration1ES5iterable.types.diff | 9 +- ...estructuringParameterDeclaration1ES6.types | 2 +- ...cturingParameterDeclaration1ES6.types.diff | 9 +- .../disallowLineTerminatorBeforeArrow.types | 6 +- ...sallowLineTerminatorBeforeArrow.types.diff | 22 - .../conformance/enumAssignability.types | 98 ++-- .../conformance/enumAssignability.types.diff | 215 +------- .../enumAssignabilityInInheritance.types | 282 +++++------ .../enumAssignabilityInInheritance.types.diff | 458 +----------------- .../submodule/conformance/enumBasics.types | 32 +- .../conformance/enumBasics.types.diff | 67 +-- .../conformance/enumClassification.types | 6 +- .../conformance/enumClassification.types.diff | 28 -- .../enumConstantMemberWithString.types | 4 +- .../enumConstantMemberWithString.types.diff | 20 - ...stantMemberWithStringEmitDeclaration.types | 4 +- ...MemberWithStringEmitDeclaration.types.diff | 20 - ...umConstantMemberWithTemplateLiterals.types | 4 +- ...stantMemberWithTemplateLiterals.types.diff | 20 - ...rWithTemplateLiteralsEmitDeclaration.types | 4 +- ...TemplateLiteralsEmitDeclaration.types.diff | 20 - ...rrorOnConstantBindingWithInitializer.types | 2 +- ...nConstantBindingWithInitializer.types.diff | 11 - .../submodule/conformance/enumErrors.types | 16 +- .../conformance/enumErrors.types.diff | 51 +- ...enumIsNotASubtypeOfAnythingButNumber.types | 44 +- ...sNotASubtypeOfAnythingButNumber.types.diff | 119 +---- .../submodule/conformance/enumMerging.types | 22 +- .../conformance/enumMerging.types.diff | 34 +- .../conformance/enumMergingErrors.types | 12 +- .../conformance/enumMergingErrors.types.diff | 54 --- .../conformance/enumShadowedInfinityNaN.types | 4 +- .../enumShadowedInfinityNaN.types.diff | 20 - .../es6modulekindWithES5Target5.types | 4 +- .../es6modulekindWithES5Target5.types.diff | 19 - .../esnextmodulekindWithES5Target5.types | 4 +- .../esnextmodulekindWithES5Target5.types.diff | 19 - .../everyTypeAssignableToAny.types | 8 +- .../everyTypeAssignableToAny.types.diff | 26 +- .../submodule/conformance/exportCodeGen.types | 4 +- .../conformance/exportCodeGen.types.diff | 18 +- .../submodule/conformance/for-of47.types | 12 +- .../submodule/conformance/for-of47.types.diff | 25 +- .../submodule/conformance/for-of48.types | 6 +- .../submodule/conformance/for-of48.types.diff | 17 +- ...icCallWithGenericSignatureArguments2.types | 54 +-- ...lWithGenericSignatureArguments2.types.diff | 95 +--- ...icCallWithGenericSignatureArguments3.types | 22 +- ...lWithGenericSignatureArguments3.types.diff | 41 +- .../importElisionConstEnumMerge1.types | 6 +- .../importElisionConstEnumMerge1.types.diff | 15 +- .../inOperatorWithInvalidOperands.types | 10 +- .../inOperatorWithInvalidOperands.types.diff | 41 -- .../interfaceWithPropertyOfEveryType.types | 12 +- ...nterfaceWithPropertyOfEveryType.types.diff | 34 +- .../invalidBooleanAssignments.types | 4 +- .../invalidBooleanAssignments.types.diff | 10 - .../invalidStringAssignments.types | 4 +- .../invalidStringAssignments.types.diff | 13 - .../invalidUndefinedAssignments.types | 2 +- .../invalidUndefinedAssignments.types.diff | 6 +- .../conformance/invalidUndefinedValues.types | 8 +- .../invalidUndefinedValues.types.diff | 22 - .../conformance/invalidVoidAssignments.types | 8 +- .../invalidVoidAssignments.types.diff | 23 +- .../conformance/invalidVoidValues.types | 8 +- .../conformance/invalidVoidValues.types.diff | 26 +- .../conformance/jsDeclarationsEnums.types | 8 +- .../jsDeclarationsEnums.types.diff | 12 +- .../mappedTypeOverlappingStringEnumKeys.types | 18 +- ...edTypeOverlappingStringEnumKeys.types.diff | 46 +- .../submodule/conformance/nestedModules.types | 4 +- .../conformance/nestedModules.types.diff | 4 +- .../nullAssignableToEveryType.types | 6 +- .../nullAssignableToEveryType.types.diff | 25 +- ...ullIsSubtypeOfEverythingButUndefined.types | 18 +- ...SubtypeOfEverythingButUndefined.types.diff | 40 +- .../conformance/numberAssignableToEnum.types | 10 +- .../numberAssignableToEnum.types.diff | 30 -- .../conformance/objectTypesIdentity2.types | 28 +- .../objectTypesIdentity2.types.diff | 43 +- .../submodule/conformance/parserEnum3.types | 2 +- .../conformance/parserEnum3.types.diff | 2 +- .../submodule/conformance/parserEnum4.types | 2 +- .../conformance/parserEnum4.types.diff | 2 +- .../submodule/conformance/parserEnum5.types | 2 +- .../conformance/parserEnum5.types.diff | 9 +- .../parserEnumDeclaration3.d.types | 2 +- .../parserEnumDeclaration3.d.types.diff | 11 - .../conformance/parserEnumDeclaration3.types | 2 +- .../parserEnumDeclaration3.types.diff | 11 - .../parserInterfaceKeywordInEnum.types | 2 +- .../parserInterfaceKeywordInEnum.types.diff | 11 - .../parserInterfaceKeywordInEnum1.types | 2 +- .../parserInterfaceKeywordInEnum1.types.diff | 11 - .../primtiveTypesAreIdentical.types | 12 +- .../primtiveTypesAreIdentical.types.diff | 28 -- .../conformance/privateNameEnum.types | 2 +- .../conformance/privateNameEnum.types.diff | 8 +- .../conformance/strictModeOctalLiterals.types | 2 +- .../strictModeOctalLiterals.types.diff | 11 - .../stringLiteralTypeIsSubtypeOfString.types | 10 +- ...ingLiteralTypeIsSubtypeOfString.types.diff | 19 +- .../submodule/conformance/subtypesOfAny.types | 4 +- .../conformance/subtypesOfAny.types.diff | 13 +- .../conformance/subtypesOfTypeParameter.types | 18 +- .../subtypesOfTypeParameter.types.diff | 28 +- ...typesOfTypeParameterWithConstraints2.types | 20 +- ...OfTypeParameterWithConstraints2.types.diff | 43 +- .../submodule/conformance/typeAliases.types | 6 +- .../conformance/typeAliases.types.diff | 16 +- ...peArgumentInferenceWithObjectLiteral.types | 66 +-- ...umentInferenceWithObjectLiteral.types.diff | 109 +---- .../conformance/typeofANonExportedType.types | 4 +- .../typeofANonExportedType.types.diff | 12 +- .../conformance/typeofAnExportedType.types | 4 +- .../typeofAnExportedType.types.diff | 12 +- .../typesWithPrivateConstructor.types | 20 +- .../typesWithPrivateConstructor.types.diff | 43 -- .../typesWithProtectedConstructor.types | 20 +- .../typesWithProtectedConstructor.types.diff | 43 -- .../undefinedAssignableToEveryType.types | 6 +- .../undefinedAssignableToEveryType.types.diff | 25 +- .../undefinedIsSubtypeOfEverything.types | 4 +- .../undefinedIsSubtypeOfEverything.types.diff | 20 +- ...btypeIfEveryConstituentTypeIsSubtype.types | 2 +- ...IfEveryConstituentTypeIsSubtype.types.diff | 9 +- .../conformance/validNullAssignments.types | 2 +- .../validNullAssignments.types.diff | 8 - .../conformance/validNumberAssignments.types | 12 +- .../validNumberAssignments.types.diff | 30 -- .../verbatimModuleSyntaxConstEnum.types | 2 +- .../verbatimModuleSyntaxConstEnum.types.diff | 11 - 462 files changed, 1799 insertions(+), 7202 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/ambientEnum1.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer1.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer2.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer3.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer4.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer5.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesClass.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/collisionCodeGenEnumWithEnumMemberConflict.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/constEnumBadPropertyNames.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport1.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport2.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/dottedModuleName.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/enumConflictsWithGlobalIdentifier.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/enumMemberResolution.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/enumOperations.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/enumWithExport.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/enumWithInfinityProperty.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/enumWithNaNProperty.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/enumWithParenthesizedInitializer1.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations1.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsEnums.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/isolatedModulesAmbientConstEnum.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnum.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnumTypeOnly.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/isolatedModulesNonAmbientConstEnum.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergeWithImportedType.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedDeclarations2.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedEnumDeclarationCodeGen.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleCodeGenTest5.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/nonExportedElementsOfMergedModules.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/operatorAddNullUndefined.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/overshifts.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/parseEntityNameWithReservedWord.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/preserveConstEnums.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/strictModeEnumMemberNameReserved.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/systemModuleAmbientDeclarations.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/systemModuleNonTopLevelModuleMembers.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/this_inside-enum-should-not-be-allowed.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=false).types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=true).types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/asyncEnum_es5.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/asyncEnum_es6.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/classExtendingPrimitive.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/constAssertionOnEnum.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/disallowLineTerminatorBeforeArrow.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumClassification.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumConstantMemberWithString.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumConstantMemberWithStringEmitDeclaration.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiterals.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiteralsEmitDeclaration.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumErrorOnConstantBindingWithInitializer.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumMergingErrors.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/enumShadowedInfinityNaN.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target5.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target5.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/inOperatorWithInvalidOperands.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/numberAssignableToEnum.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.d.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum1.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/primtiveTypesAreIdentical.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/strictModeOctalLiterals.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/validNumberAssignments.types.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxConstEnum.types.diff diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnum1.types b/testdata/baselines/reference/submodule/compiler/ambientEnum1.types index f1276e5fe1..ddc6c0787c 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientEnum1.types +++ b/testdata/baselines/reference/submodule/compiler/ambientEnum1.types @@ -2,7 +2,7 @@ === ambientEnum1.ts === declare enum E1 { ->E1 : E1.y +>E1 : E1 y = 4.23 >y : E1.y @@ -11,7 +11,7 @@ // Ambient enum with computer member declare enum E2 { ->E2 : E2.x +>E2 : E2 x = 'foo'.length >x : E2.x diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnum1.types.diff b/testdata/baselines/reference/submodule/compiler/ambientEnum1.types.diff deleted file mode 100644 index 1679e4bc83..0000000000 --- a/testdata/baselines/reference/submodule/compiler/ambientEnum1.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.ambientEnum1.types -+++ new.ambientEnum1.types -@@= skipped -1, +1 lines =@@ - - === ambientEnum1.ts === - declare enum E1 { -->E1 : E1 -+>E1 : E1.y - - y = 4.23 - >y : E1.y -@@= skipped -9, +9 lines =@@ - - // Ambient enum with computer member - declare enum E2 { -->E2 : E2 -+>E2 : E2.x - - x = 'foo'.length - >x : E2.x diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer1.types b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer1.types index d7bc252e90..bffdf0907c 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer1.types +++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer1.types @@ -2,7 +2,7 @@ === ambientEnumElementInitializer1.ts === declare enum E { ->E : E.e +>E : E e = 3 >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer1.types.diff b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer1.types.diff deleted file mode 100644 index bd6002778d..0000000000 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer1.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.ambientEnumElementInitializer1.types -+++ new.ambientEnumElementInitializer1.types -@@= skipped -1, +1 lines =@@ - - === ambientEnumElementInitializer1.ts === - declare enum E { -->E : E -+>E : E.e - - e = 3 - >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer2.types b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer2.types index 342fa0df66..a478b62d15 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer2.types +++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer2.types @@ -2,7 +2,7 @@ === ambientEnumElementInitializer2.ts === declare enum E { ->E : E.e +>E : E e = -3 // Negative >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer2.types.diff b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer2.types.diff deleted file mode 100644 index c23cc55e6c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer2.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.ambientEnumElementInitializer2.types -+++ new.ambientEnumElementInitializer2.types -@@= skipped -1, +1 lines =@@ - - === ambientEnumElementInitializer2.ts === - declare enum E { -->E : E -+>E : E.e - - e = -3 // Negative - >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer3.types b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer3.types index 0ad2039f28..11c6fc73fe 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer3.types +++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer3.types @@ -2,7 +2,7 @@ === ambientEnumElementInitializer3.ts === declare enum E { ->E : E.e +>E : E e = 3.3 // Decimal >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer3.types.diff b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer3.types.diff deleted file mode 100644 index 95313885ab..0000000000 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer3.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.ambientEnumElementInitializer3.types -+++ new.ambientEnumElementInitializer3.types -@@= skipped -1, +1 lines =@@ - - === ambientEnumElementInitializer3.ts === - declare enum E { -->E : E -+>E : E.e - - e = 3.3 // Decimal - >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer4.types b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer4.types index 611ee1aa5f..ccce0f1db3 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer4.types +++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer4.types @@ -2,7 +2,7 @@ === ambientEnumElementInitializer4.ts === declare enum E { ->E : E.e +>E : E e = 0xA >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer4.types.diff b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer4.types.diff deleted file mode 100644 index 0206ff62d5..0000000000 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer4.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.ambientEnumElementInitializer4.types -+++ new.ambientEnumElementInitializer4.types -@@= skipped -1, +1 lines =@@ - - === ambientEnumElementInitializer4.ts === - declare enum E { -->E : E -+>E : E.e - - e = 0xA - >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer5.types b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer5.types index 3d49880caf..9f68ffc70f 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer5.types +++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer5.types @@ -2,7 +2,7 @@ === ambientEnumElementInitializer5.ts === declare enum E { ->E : E.e +>E : E e = -0xA >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer5.types.diff b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer5.types.diff deleted file mode 100644 index c7894649bb..0000000000 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer5.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.ambientEnumElementInitializer5.types -+++ new.ambientEnumElementInitializer5.types -@@= skipped -1, +1 lines =@@ - - === ambientEnumElementInitializer5.ts === - declare enum E { -->E : E -+>E : E.e - - e = -0xA - >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types index 28ee8a1e2f..f852e992be 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types +++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types @@ -5,7 +5,7 @@ declare module M { >M : typeof M enum E { ->E : E.e +>E : E e = 3 >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types.diff b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types.diff deleted file mode 100644 index f3a321eae3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.ambientEnumElementInitializer6.types -+++ new.ambientEnumElementInitializer6.types -@@= skipped -4, +4 lines =@@ - >M : typeof M - - enum E { -->E : E -+>E : E.e - - e = 3 - >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass.types index 12fa628b32..75e67b3306 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass.types @@ -16,6 +16,6 @@ class c4 { public foo() { } } >foo : () => void enum c4 { One } // error ->c4 : c4.One +>c4 : c4 >One : c4.One diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass.types.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass.types.diff deleted file mode 100644 index fd93f47459..0000000000 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass.types.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.augmentedTypesClass.types -+++ new.augmentedTypesClass.types -@@= skipped -15, +15 lines =@@ - >foo : () => void - - enum c4 { One } // error -->c4 : c4 -+>c4 : c4.One - >One : c4.One - diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.types index 57c2f8f9d7..39d074e5a7 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.types @@ -35,7 +35,7 @@ class c33 { } } enum c33 { One }; ->c33 : c33.One +>c33 : c33 >One : c33.One // class then import diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.types.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.types.diff index cc60e202f4..8dc5cfc352 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.types.diff @@ -9,12 +9,3 @@ bar(): void; >bar : () => void } -@@= skipped -17, +19 lines =@@ - } - } - enum c33 { One }; -->c33 : c33 -+>c33 : c33.One - >One : c33.One - - // class then import diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types index 3fa241c2f4..fee846f099 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types @@ -3,7 +3,7 @@ === augmentedTypesEnum.ts === // enum then var enum e1111 { One } // error ->e1111 : e1111.One +>e1111 : e1111 >One : e1111.One var e1111 = 1; // error @@ -12,14 +12,14 @@ var e1111 = 1; // error // enum then function enum e2 { One } // error ->e2 : e2.One +>e2 : e2 >One : e2.One function e2() { } // error >e2 : () => void enum e3 { One } // error ->e3 : e3.One +>e3 : e3 >One : e3.One var e3 = () => { } // error @@ -28,7 +28,7 @@ var e3 = () => { } // error // enum then class enum e4 { One } // error ->e4 : e4.One +>e4 : e4 >One : e4.One class e4 { public foo() { } } // error @@ -37,31 +37,31 @@ class e4 { public foo() { } } // error // enum then enum enum e5 { One } ->e5 : e5.One +>e5 : e5 >One : e5.One enum e5 { Two } // error ->e5 : e5.One +>e5 : e5 >Two : e5.One enum e5a { One } // error ->e5a : e5a.One +>e5a : e5a >One : e5a.One enum e5a { One } // error ->e5a : e5a.One +>e5a : e5a >One : e5a.One // enum then internal module enum e6 { One } ->e6 : e6.One +>e6 : e6 >One : e6.One module e6 { } // ok >e6 : typeof e6 enum e6a { One } ->e6a : e6a.One +>e6a : e6a >One : e6a.One module e6a { var y = 2; } // should be error @@ -70,7 +70,7 @@ module e6a { var y = 2; } // should be error >2 : 2 enum e6b { One } ->e6b : e6b.One +>e6b : e6b >One : e6b.One module e6b { export var y = 2; } // should be error diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types.diff index 484f651634..f5f5cc0332 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types.diff +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types.diff @@ -1,84 +1,10 @@ --- old.augmentedTypesEnum.types +++ new.augmentedTypesEnum.types -@@= skipped -2, +2 lines =@@ - === augmentedTypesEnum.ts === - // enum then var - enum e1111 { One } // error -->e1111 : e1111 -+>e1111 : e1111.One - >One : e1111.One - - var e1111 = 1; // error -@@= skipped -9, +9 lines =@@ - - // enum then function - enum e2 { One } // error -->e2 : e2 -+>e2 : e2.One - >One : e2.One - - function e2() { } // error - >e2 : () => void - - enum e3 { One } // error -->e3 : e3 -+>e3 : e3.One - >One : e3.One - - var e3 = () => { } // error -@@= skipped -16, +16 lines =@@ - - // enum then class - enum e4 { One } // error -->e4 : e4 -+>e4 : e4.One - >One : e4.One - - class e4 { public foo() { } } // error -@@= skipped -9, +9 lines =@@ - - // enum then enum - enum e5 { One } -->e5 : e5 -+>e5 : e5.One - >One : e5.One - - enum e5 { Two } // error -->e5 : e5 -+>e5 : e5.One - >Two : e5.One - - enum e5a { One } // error -->e5a : e5a -+>e5a : e5a.One - >One : e5a.One - - enum e5a { One } // error -->e5a : e5a -+>e5a : e5a.One - >One : e5a.One - - // enum then internal module - enum e6 { One } -->e6 : e6 -+>e6 : e6.One +@@= skipped -57, +57 lines =@@ >One : e6.One module e6 { } // ok +>e6 : typeof e6 enum e6a { One } -->e6a : e6a -+>e6a : e6a.One - >One : e6a.One - - module e6a { var y = 2; } // should be error -@@= skipped -32, +33 lines =@@ - >2 : 2 - - enum e6b { One } -->e6b : e6b -+>e6b : e6b.One - >One : e6b.One - - module e6b { export var y = 2; } // should be error + >e6a : e6a diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.types index 89c200a28d..9e7e8d2679 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.types @@ -3,7 +3,7 @@ === augmentedTypesEnum2.ts === // enum then interface enum e1 { One } // error ->e1 : e1.One +>e1 : e1 >One : e1.One interface e1 { // error @@ -17,7 +17,7 @@ interface e1 { // error // enum then class enum e2 { One }; // error ->e2 : e2.One +>e2 : e2 >One : e2.One class e2 { // error diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.types.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.types.diff index 78140dc0a0..ebc63f3453 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.types.diff @@ -1,11 +1,6 @@ --- old.augmentedTypesEnum2.types +++ new.augmentedTypesEnum2.types -@@= skipped -2, +2 lines =@@ - === augmentedTypesEnum2.ts === - // enum then interface - enum e1 { One } // error -->e1 : e1 -+>e1 : e1.One +@@= skipped -6, +6 lines =@@ >One : e1.One interface e1 { // error @@ -14,12 +9,3 @@ foo(): void; >foo : () => void } -@@= skipped -12, +14 lines =@@ - - // enum then class - enum e2 { One }; // error -->e2 : e2 -+>e2 : e2.One - >One : e2.One - - class e2 { // error diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types index 20216dd91f..1c03e61795 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types @@ -24,13 +24,13 @@ module A { >o : any } enum A { ->A : A.b +>A : A b >b : A.b } enum A { ->A : A.b +>A : A c >c : A.b diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types.diff deleted file mode 100644 index 46c369faaf..0000000000 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.augmentedTypesEnum3.types -+++ new.augmentedTypesEnum3.types -@@= skipped -23, +23 lines =@@ - >o : any - } - enum A { -->A : A -+>A : A.b - - b - >b : A.b - } - enum A { -->A : A -+>A : A.b - - c - >c : A.b diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types index af36d4fc83..ee7a85129e 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types @@ -42,7 +42,7 @@ function y4() { } // error >y4 : () => void enum y4 { One } // error ->y4 : y4.One +>y4 : y4 >One : y4.One // function then internal module diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types.diff index 6b5082bfca..64aaf7abc8 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types.diff +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types.diff @@ -1,15 +1,6 @@ --- old.augmentedTypesFunction.types +++ new.augmentedTypesFunction.types -@@= skipped -41, +41 lines =@@ - >y4 : () => void - - enum y4 { One } // error -->y4 : y4 -+>y4 : y4.One - >One : y4.One - - // function then internal module -@@= skipped -8, +8 lines =@@ +@@= skipped -49, +49 lines =@@ >y5 : () => void module y5 { } // ok since module is not instantiated diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.types index 1671e837e6..5619b773d1 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.types @@ -44,7 +44,7 @@ interface i3 { // error >foo : () => void } enum i3 { One }; // error ->i3 : i3.One +>i3 : i3 >One : i3.One // interface then import diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.types.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.types.diff index 4e7b7063bb..5e601b1f29 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.types.diff +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.types.diff @@ -33,10 +33,7 @@ foo(): void; >foo : () => void } - enum i3 { One }; // error -->i3 : i3 -+>i3 : i3.One - >One : i3.One +@@= skipped -9, +11 lines =@@ // interface then import interface i4 { diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types index 4c64838b9a..323748edc8 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types @@ -193,7 +193,7 @@ module m4a { var y = 2; } >2 : 2 enum m4a { One } ->m4a : m4a.One +>m4a : m4a >One : m4a.One module m4b { export var y = 2; } @@ -202,7 +202,7 @@ module m4b { export var y = 2; } >2 : 2 enum m4b { One } ->m4b : m4b.One +>m4b : m4b >One : m4b.One module m4c { interface I { foo(): void } } @@ -211,7 +211,7 @@ module m4c { interface I { foo(): void } } >foo : () => void enum m4c { One } ->m4c : m4c.One +>m4c : m4c >One : m4c.One module m4d { class C { foo() { } } } @@ -220,7 +220,7 @@ module m4d { class C { foo() { } } } >foo : () => void enum m4d { One } ->m4d : m4d.One +>m4d : m4d >One : m4d.One //// module then module diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types.diff index cd4a209eb6..99ea84ec5e 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types.diff +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types.diff @@ -80,21 +80,7 @@ enum m4 { } >m4 : m4 -@@= skipped -9, +11 lines =@@ - >2 : 2 - - enum m4a { One } -->m4a : m4a -+>m4a : m4a.One - >One : m4a.One - - module m4b { export var y = 2; } -@@= skipped -9, +9 lines =@@ - >2 : 2 - - enum m4b { One } -->m4b : m4b -+>m4b : m4b.One +@@= skipped -22, +24 lines =@@ >One : m4b.One module m4c { interface I { foo(): void } } @@ -103,21 +89,7 @@ >foo : () => void enum m4c { One } -->m4c : m4c -+>m4c : m4c.One - >One : m4c.One - - module m4d { class C { foo() { } } } -@@= skipped -16, +18 lines =@@ - >foo : () => void - - enum m4d { One } -->m4d : m4d -+>m4d : m4d.One - >One : m4d.One - - //// module then module -@@= skipped -11, +11 lines =@@ +@@= skipped -23, +25 lines =@@ >2 : 2 module m5 { export interface I { foo(): void } } // should already be reasonably well covered diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types index 37915cd09e..b81a5e51b8 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types @@ -15,7 +15,7 @@ module m4a { var y = 2; } >2 : 2 enum m4a { One } ->m4a : m4a.One +>m4a : m4a >One : m4a.One module m4b { export var y = 2; } @@ -24,7 +24,7 @@ module m4b { export var y = 2; } >2 : 2 enum m4b { One } ->m4b : m4b.One +>m4b : m4b >One : m4b.One module m4c { interface I { foo(): void } } @@ -33,7 +33,7 @@ module m4c { interface I { foo(): void } } >foo : () => void enum m4c { One } ->m4c : m4c.One +>m4c : m4c >One : m4c.One module m4d { class C { foo() { } } } @@ -42,7 +42,7 @@ module m4d { class C { foo() { } } } >foo : () => void enum m4d { One } ->m4d : m4d.One +>m4d : m4d >One : m4d.One //// module then module diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types.diff index 5cde165490..9e267335ba 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types.diff +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types.diff @@ -9,21 +9,7 @@ enum m4 { } >m4 : m4 -@@= skipped -9, +11 lines =@@ - >2 : 2 - - enum m4a { One } -->m4a : m4a -+>m4a : m4a.One - >One : m4a.One - - module m4b { export var y = 2; } -@@= skipped -9, +9 lines =@@ - >2 : 2 - - enum m4b { One } -->m4b : m4b -+>m4b : m4b.One +@@= skipped -22, +24 lines =@@ >One : m4b.One module m4c { interface I { foo(): void } } @@ -32,21 +18,7 @@ >foo : () => void enum m4c { One } -->m4c : m4c -+>m4c : m4c.One - >One : m4c.One - - module m4d { class C { foo() { } } } -@@= skipped -16, +18 lines =@@ - >foo : () => void - - enum m4d { One } -->m4d : m4d -+>m4d : m4d.One - >One : m4d.One - - //// module then module -@@= skipped -11, +11 lines =@@ +@@= skipped -23, +25 lines =@@ >2 : 2 module m5 { export interface I { foo(): void } } // should already be reasonably well covered diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types index 08c4c9b9be..f3f333d6ee 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types @@ -48,7 +48,7 @@ var x5 = 1; >1 : 1 enum x5 { One } // error ->x5 : x5.One +>x5 : x5 >One : x5.One // var then module diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types.diff index 749f691107..56b590c4f2 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types.diff +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types.diff @@ -1,15 +1,6 @@ --- old.augmentedTypesVar.types +++ new.augmentedTypesVar.types -@@= skipped -47, +47 lines =@@ - >1 : 1 - - enum x5 { One } // error -->x5 : x5 -+>x5 : x5.One - >One : x5.One - - // var then module -@@= skipped -9, +9 lines =@@ +@@= skipped -56, +56 lines =@@ >1 : 1 module x6 { } // ok since non-instantiated diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.types b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.types index 0881a05c99..176e2055fa 100644 --- a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.types +++ b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.types @@ -2,45 +2,45 @@ === blockScopedEnumVariablesUseBeforeDef.ts === function foo1() { ->foo1 : () => E.A +>foo1 : () => E return E.A ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E enum E { A } ->E : E.A +>E : E >A : E.A } function foo2() { ->foo2 : () => E.A +>foo2 : () => E return E.A ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E const enum E { A } ->E : E.A +>E : E >A : E.A } const config = { ->config : { a: AfterObject.A; } ->{ a: AfterObject.A,} : { a: AfterObject.A; } +>config : { a: AfterObject; } +>{ a: AfterObject.A,} : { a: AfterObject; } a: AfterObject.A, ->a : AfterObject.A ->AfterObject.A : AfterObject.A +>a : AfterObject +>AfterObject.A : AfterObject >AfterObject : typeof AfterObject ->A : AfterObject.A +>A : AfterObject }; const enum AfterObject { ->AfterObject : AfterObject.A +>AfterObject : AfterObject A = 2, >A : AfterObject.A diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.types.diff b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.types.diff deleted file mode 100644 index 78a5410915..0000000000 --- a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.types.diff +++ /dev/null @@ -1,62 +0,0 @@ ---- old.blockScopedEnumVariablesUseBeforeDef.types -+++ new.blockScopedEnumVariablesUseBeforeDef.types -@@= skipped -1, +1 lines =@@ - - === blockScopedEnumVariablesUseBeforeDef.ts === - function foo1() { -->foo1 : () => E -+>foo1 : () => E.A - - return E.A -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - enum E { A } -->E : E -+>E : E.A - >A : E.A - } - - function foo2() { -->foo2 : () => E -+>foo2 : () => E.A - - return E.A -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - const enum E { A } -->E : E -+>E : E.A - >A : E.A - } - - const config = { -->config : { a: AfterObject; } -->{ a: AfterObject.A,} : { a: AfterObject; } -+>config : { a: AfterObject.A; } -+>{ a: AfterObject.A,} : { a: AfterObject.A; } - - a: AfterObject.A, -->a : AfterObject -->AfterObject.A : AfterObject -+>a : AfterObject.A -+>AfterObject.A : AfterObject.A - >AfterObject : typeof AfterObject -->A : AfterObject -+>A : AfterObject.A - - }; - - const enum AfterObject { -->AfterObject : AfterObject -+>AfterObject : AfterObject.A - - A = 2, - >A : AfterObject.A diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.types b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.types index 67b98d6a51..98a0e5cb2d 100644 --- a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.types +++ b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.types @@ -2,45 +2,45 @@ === blockScopedEnumVariablesUseBeforeDef_isolatedModules.ts === function foo1() { ->foo1 : () => E.A +>foo1 : () => E return E.A ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E enum E { A } ->E : E.A +>E : E >A : E.A } function foo2() { ->foo2 : () => E.A +>foo2 : () => E return E.A ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E const enum E { A } ->E : E.A +>E : E >A : E.A } const config = { ->config : { a: AfterObject.A; } ->{ a: AfterObject.A,} : { a: AfterObject.A; } +>config : { a: AfterObject; } +>{ a: AfterObject.A,} : { a: AfterObject; } a: AfterObject.A, ->a : AfterObject.A ->AfterObject.A : AfterObject.A +>a : AfterObject +>AfterObject.A : AfterObject >AfterObject : typeof AfterObject ->A : AfterObject.A +>A : AfterObject }; const enum AfterObject { ->AfterObject : AfterObject.A +>AfterObject : AfterObject A = 2, >A : AfterObject.A diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.types.diff b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.types.diff deleted file mode 100644 index 461a5c6fc4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.types.diff +++ /dev/null @@ -1,62 +0,0 @@ ---- old.blockScopedEnumVariablesUseBeforeDef_isolatedModules.types -+++ new.blockScopedEnumVariablesUseBeforeDef_isolatedModules.types -@@= skipped -1, +1 lines =@@ - - === blockScopedEnumVariablesUseBeforeDef_isolatedModules.ts === - function foo1() { -->foo1 : () => E -+>foo1 : () => E.A - - return E.A -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - enum E { A } -->E : E -+>E : E.A - >A : E.A - } - - function foo2() { -->foo2 : () => E -+>foo2 : () => E.A - - return E.A -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - const enum E { A } -->E : E -+>E : E.A - >A : E.A - } - - const config = { -->config : { a: AfterObject; } -->{ a: AfterObject.A,} : { a: AfterObject; } -+>config : { a: AfterObject.A; } -+>{ a: AfterObject.A,} : { a: AfterObject.A; } - - a: AfterObject.A, -->a : AfterObject -->AfterObject.A : AfterObject -+>a : AfterObject.A -+>AfterObject.A : AfterObject.A - >AfterObject : typeof AfterObject -->A : AfterObject -+>A : AfterObject.A - - }; - - const enum AfterObject { -->AfterObject : AfterObject -+>AfterObject : AfterObject.A - - A = 2, - >A : AfterObject.A diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.types b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.types index 7d90b6dc66..4ea9a2749d 100644 --- a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.types +++ b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.types @@ -2,45 +2,45 @@ === blockScopedEnumVariablesUseBeforeDef_preserve.ts === function foo1() { ->foo1 : () => E.A +>foo1 : () => E return E.A ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E enum E { A } ->E : E.A +>E : E >A : E.A } function foo2() { ->foo2 : () => E.A +>foo2 : () => E return E.A ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E const enum E { A } ->E : E.A +>E : E >A : E.A } const config = { ->config : { a: AfterObject.A; } ->{ a: AfterObject.A,} : { a: AfterObject.A; } +>config : { a: AfterObject; } +>{ a: AfterObject.A,} : { a: AfterObject; } a: AfterObject.A, ->a : AfterObject.A ->AfterObject.A : AfterObject.A +>a : AfterObject +>AfterObject.A : AfterObject >AfterObject : typeof AfterObject ->A : AfterObject.A +>A : AfterObject }; const enum AfterObject { ->AfterObject : AfterObject.A +>AfterObject : AfterObject A = 2, >A : AfterObject.A diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.types.diff b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.types.diff deleted file mode 100644 index 8d1ec7267a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.types.diff +++ /dev/null @@ -1,62 +0,0 @@ ---- old.blockScopedEnumVariablesUseBeforeDef_preserve.types -+++ new.blockScopedEnumVariablesUseBeforeDef_preserve.types -@@= skipped -1, +1 lines =@@ - - === blockScopedEnumVariablesUseBeforeDef_preserve.ts === - function foo1() { -->foo1 : () => E -+>foo1 : () => E.A - - return E.A -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - enum E { A } -->E : E -+>E : E.A - >A : E.A - } - - function foo2() { -->foo2 : () => E -+>foo2 : () => E.A - - return E.A -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - const enum E { A } -->E : E -+>E : E.A - >A : E.A - } - - const config = { -->config : { a: AfterObject; } -->{ a: AfterObject.A,} : { a: AfterObject; } -+>config : { a: AfterObject.A; } -+>{ a: AfterObject.A,} : { a: AfterObject.A; } - - a: AfterObject.A, -->a : AfterObject -->AfterObject.A : AfterObject -+>a : AfterObject.A -+>AfterObject.A : AfterObject.A - >AfterObject : typeof AfterObject -->A : AfterObject -+>A : AfterObject.A - - }; - - const enum AfterObject { -->AfterObject : AfterObject -+>AfterObject : AfterObject.A - - A = 2, - >A : AfterObject.A diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.types b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.types index 349b4131a0..cbbd657d00 100644 --- a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.types +++ b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.types @@ -2,45 +2,45 @@ === blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.ts === function foo1() { ->foo1 : () => E.A +>foo1 : () => E return E.A ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E enum E { A } ->E : E.A +>E : E >A : E.A } function foo2() { ->foo2 : () => E.A +>foo2 : () => E return E.A ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E const enum E { A } ->E : E.A +>E : E >A : E.A } const config = { ->config : { a: AfterObject.A; } ->{ a: AfterObject.A,} : { a: AfterObject.A; } +>config : { a: AfterObject; } +>{ a: AfterObject.A,} : { a: AfterObject; } a: AfterObject.A, ->a : AfterObject.A ->AfterObject.A : AfterObject.A +>a : AfterObject +>AfterObject.A : AfterObject >AfterObject : typeof AfterObject ->A : AfterObject.A +>A : AfterObject }; const enum AfterObject { ->AfterObject : AfterObject.A +>AfterObject : AfterObject A = 2, >A : AfterObject.A diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.types.diff b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.types.diff deleted file mode 100644 index ca748be909..0000000000 --- a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.types.diff +++ /dev/null @@ -1,62 +0,0 @@ ---- old.blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.types -+++ new.blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.types -@@= skipped -1, +1 lines =@@ - - === blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.ts === - function foo1() { -->foo1 : () => E -+>foo1 : () => E.A - - return E.A -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - enum E { A } -->E : E -+>E : E.A - >A : E.A - } - - function foo2() { -->foo2 : () => E -+>foo2 : () => E.A - - return E.A -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - const enum E { A } -->E : E -+>E : E.A - >A : E.A - } - - const config = { -->config : { a: AfterObject; } -->{ a: AfterObject.A,} : { a: AfterObject; } -+>config : { a: AfterObject.A; } -+>{ a: AfterObject.A,} : { a: AfterObject.A; } - - a: AfterObject.A, -->a : AfterObject -->AfterObject.A : AfterObject -+>a : AfterObject.A -+>AfterObject.A : AfterObject.A - >AfterObject : typeof AfterObject -->A : AfterObject -+>A : AfterObject.A - - }; - - const enum AfterObject { -->AfterObject : AfterObject -+>AfterObject : AfterObject.A - - A = 2, - >A : AfterObject.A diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.types b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.types index 9d5c39c406..8adbd07915 100644 --- a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.types +++ b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.types @@ -13,5 +13,5 @@ if (true) { } export = foo; // not ok ->foo : () => void +>foo : any diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.types.diff b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.types.diff deleted file mode 100644 index c28056f66a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictModule.types.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- old.blockScopedFunctionDeclarationInStrictModule.types -+++ new.blockScopedFunctionDeclarationInStrictModule.types -@@= skipped -12, +12 lines =@@ - } - - export = foo; // not ok -->foo : any -+>foo : () => void - diff --git a/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.types b/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.types index 1ad854b6e8..9196d8e837 100644 --- a/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.types @@ -5,10 +5,10 @@ class Foo { >Foo : Foo static enumMember = Enum.A; ->enumMember : Enum.A ->Enum.A : Enum.A +>enumMember : Enum +>Enum.A : Enum >Enum : typeof Enum ->A : Enum.A +>A : Enum static objLiteralMember = ObjLiteral.A; >objLiteralMember : number @@ -24,7 +24,7 @@ class Foo { } enum Enum { ->Enum : Enum.A +>Enum : Enum A >A : Enum.A diff --git a/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.types.diff b/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.types.diff deleted file mode 100644 index 3dde5787e8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.types.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- old.classStaticInitializersUsePropertiesBeforeDeclaration.types -+++ new.classStaticInitializersUsePropertiesBeforeDeclaration.types -@@= skipped -4, +4 lines =@@ - >Foo : Foo - - static enumMember = Enum.A; -->enumMember : Enum -->Enum.A : Enum -+>enumMember : Enum.A -+>Enum.A : Enum.A - >Enum : typeof Enum -->A : Enum -+>A : Enum.A - - static objLiteralMember = ObjLiteral.A; - >objLiteralMember : number -@@= skipped -19, +19 lines =@@ - } - - enum Enum { -->Enum : Enum -+>Enum : Enum.A - - A - >A : Enum.A diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenEnumWithEnumMemberConflict.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenEnumWithEnumMemberConflict.types index a0199d47e5..8fb4e8fcae 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenEnumWithEnumMemberConflict.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenEnumWithEnumMemberConflict.types @@ -2,12 +2,12 @@ === collisionCodeGenEnumWithEnumMemberConflict.ts === enum Color { ->Color : Color.Color +>Color : Color Color, >Color : Color.Color Thing = Color >Thing : Color.Color ->Color : Color.Color +>Color : Color } diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenEnumWithEnumMemberConflict.types.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenEnumWithEnumMemberConflict.types.diff deleted file mode 100644 index 86d3949992..0000000000 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenEnumWithEnumMemberConflict.types.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- old.collisionCodeGenEnumWithEnumMemberConflict.types -+++ new.collisionCodeGenEnumWithEnumMemberConflict.types -@@= skipped -1, +1 lines =@@ - - === collisionCodeGenEnumWithEnumMemberConflict.ts === - enum Color { -->Color : Color -+>Color : Color.Color - - Color, - >Color : Color.Color - - Thing = Color - >Thing : Color.Color -->Color : Color -+>Color : Color.Color - } diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types index 4b65b56e81..bce5bdd85f 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types @@ -5,13 +5,13 @@ module m1 { >m1 : typeof m1 enum e { ->e : e.m1 +>e : e m1, >m1 : e.m1 m2 = m1 >m2 : e.m1 ->m1 : e.m1 +>m1 : e } } diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types.diff deleted file mode 100644 index 589883efb1..0000000000 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.collisionCodeGenModuleWithEnumMemberConflict.types -+++ new.collisionCodeGenModuleWithEnumMemberConflict.types -@@= skipped -4, +4 lines =@@ - >m1 : typeof m1 - - enum e { -->e : e -+>e : e.m1 - - m1, - >m1 : e.m1 - - m2 = m1 - >m2 : e.m1 -->m1 : e -+>m1 : e.m1 - } - } diff --git a/testdata/baselines/reference/submodule/compiler/commentsModules.types b/testdata/baselines/reference/submodule/compiler/commentsModules.types index 178777fb22..b7a8bb893d 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsModules.types +++ b/testdata/baselines/reference/submodule/compiler/commentsModules.types @@ -86,12 +86,12 @@ module m2.m3 { } } /* trailing dotted module comment*/ new m2.m3.c(); ->new m2.m3.c() : any ->m2.m3.c : any ->m2.m3 : any +>new m2.m3.c() : c +>m2.m3.c : typeof c +>m2.m3 : typeof m3 >m2 : typeof m2 ->m3 : any ->c : any +>m3 : typeof m3 +>c : typeof c /** module comment of m3.m4.m5*/ module m3.m4.m5 { @@ -105,14 +105,14 @@ module m3.m4.m5 { } } // trailing dotted module 2 new m3.m4.m5.c(); ->new m3.m4.m5.c() : any ->m3.m4.m5.c : any ->m3.m4.m5 : any ->m3.m4 : any +>new m3.m4.m5.c() : c +>m3.m4.m5.c : typeof c +>m3.m4.m5 : typeof m5 +>m3.m4 : typeof m4 >m3 : typeof m3 ->m4 : any ->m5 : any ->c : any +>m4 : typeof m4 +>m5 : typeof m5 +>c : typeof c /** module comment of m4.m5.m6*/ module m4.m5.m6 { @@ -130,16 +130,16 @@ module m4.m5.m6 { } /* trailing inner module */ /* multiple comments*/ } new m4.m5.m6.m7.c(); ->new m4.m5.m6.m7.c() : any ->m4.m5.m6.m7.c : any ->m4.m5.m6.m7 : any ->m4.m5.m6 : any ->m4.m5 : any +>new m4.m5.m6.m7.c() : c +>m4.m5.m6.m7.c : typeof c +>m4.m5.m6.m7 : typeof m7 +>m4.m5.m6 : typeof m6 +>m4.m5 : typeof m5 >m4 : typeof m4 ->m5 : any ->m6 : any ->m7 : any ->c : any +>m5 : typeof m5 +>m6 : typeof m6 +>m7 : typeof m7 +>c : typeof c /** module comment of m5.m6.m7*/ module m5.m6.m7 { @@ -158,16 +158,16 @@ module m5.m6.m7 { } } new m5.m6.m7.m8.c(); ->new m5.m6.m7.m8.c() : any ->m5.m6.m7.m8.c : any ->m5.m6.m7.m8 : any ->m5.m6.m7 : any ->m5.m6 : any +>new m5.m6.m7.m8.c() : c +>m5.m6.m7.m8.c : typeof c +>m5.m6.m7.m8 : typeof m8 +>m5.m6.m7 : typeof m7 +>m5.m6 : typeof m6 >m5 : typeof m5 ->m6 : any ->m7 : any ->m8 : any ->c : any +>m6 : typeof m6 +>m7 : typeof m7 +>m8 : typeof m8 +>c : typeof c module m6.m7 { >m6 : typeof m6 @@ -183,14 +183,14 @@ module m6.m7 { } } new m6.m7.m8.c(); ->new m6.m7.m8.c() : any ->m6.m7.m8.c : any ->m6.m7.m8 : any ->m6.m7 : any +>new m6.m7.m8.c() : c +>m6.m7.m8.c : typeof c +>m6.m7.m8 : typeof m8 +>m6.m7 : typeof m7 >m6 : typeof m6 ->m7 : any ->m8 : any ->c : any +>m7 : typeof m7 +>m8 : typeof m8 +>c : typeof c module m7.m8 { >m7 : typeof m7 @@ -217,12 +217,12 @@ module m7.m8 { } } new m7.m8.m9.c(); ->new m7.m8.m9.c() : any ->m7.m8.m9.c : any ->m7.m8.m9 : any ->m7.m8 : any +>new m7.m8.m9.c() : c +>m7.m8.m9.c : typeof c +>m7.m8.m9 : typeof m9 +>m7.m8 : typeof m8 >m7 : typeof m7 ->m8 : any ->m9 : any ->c : any +>m8 : typeof m8 +>m9 : typeof m9 +>c : typeof c diff --git a/testdata/baselines/reference/submodule/compiler/commentsModules.types.diff b/testdata/baselines/reference/submodule/compiler/commentsModules.types.diff index 187c5415d5..e01df215c0 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsModules.types.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsModules.types.diff @@ -27,14 +27,14 @@ ->new m2.m3.c() : m2.m3.c ->m2.m3.c : typeof m2.m3.c ->m2.m3 : typeof m2.m3 -+>new m2.m3.c() : any -+>m2.m3.c : any -+>m2.m3 : any ++>new m2.m3.c() : c ++>m2.m3.c : typeof c ++>m2.m3 : typeof m3 >m2 : typeof m2 ->m3 : typeof m2.m3 ->c : typeof m2.m3.c -+>m3 : any -+>c : any ++>m3 : typeof m3 ++>c : typeof c /** module comment of m3.m4.m5*/ module m3.m4.m5 { @@ -46,17 +46,17 @@ ->m3.m4.m5.c : typeof m3.m4.m5.c ->m3.m4.m5 : typeof m3.m4.m5 ->m3.m4 : typeof m3.m4 -+>new m3.m4.m5.c() : any -+>m3.m4.m5.c : any -+>m3.m4.m5 : any -+>m3.m4 : any ++>new m3.m4.m5.c() : c ++>m3.m4.m5.c : typeof c ++>m3.m4.m5 : typeof m5 ++>m3.m4 : typeof m4 >m3 : typeof m3 ->m4 : typeof m3.m4 ->m5 : typeof m3.m4.m5 ->c : typeof m3.m4.m5.c -+>m4 : any -+>m5 : any -+>c : any ++>m4 : typeof m4 ++>m5 : typeof m5 ++>c : typeof c /** module comment of m4.m5.m6*/ module m4.m5.m6 { @@ -69,20 +69,20 @@ ->m4.m5.m6.m7 : typeof m4.m5.m6.m7 ->m4.m5.m6 : typeof m4.m5.m6 ->m4.m5 : typeof m4.m5 -+>new m4.m5.m6.m7.c() : any -+>m4.m5.m6.m7.c : any -+>m4.m5.m6.m7 : any -+>m4.m5.m6 : any -+>m4.m5 : any ++>new m4.m5.m6.m7.c() : c ++>m4.m5.m6.m7.c : typeof c ++>m4.m5.m6.m7 : typeof m7 ++>m4.m5.m6 : typeof m6 ++>m4.m5 : typeof m5 >m4 : typeof m4 ->m5 : typeof m4.m5 ->m6 : typeof m4.m5.m6 ->m7 : typeof m4.m5.m6.m7 ->c : typeof m4.m5.m6.m7.c -+>m5 : any -+>m6 : any -+>m7 : any -+>c : any ++>m5 : typeof m5 ++>m6 : typeof m6 ++>m7 : typeof m7 ++>c : typeof c /** module comment of m5.m6.m7*/ module m5.m6.m7 { @@ -95,20 +95,20 @@ ->m5.m6.m7.m8 : typeof m5.m6.m7.m8 ->m5.m6.m7 : typeof m5.m6.m7 ->m5.m6 : typeof m5.m6 -+>new m5.m6.m7.m8.c() : any -+>m5.m6.m7.m8.c : any -+>m5.m6.m7.m8 : any -+>m5.m6.m7 : any -+>m5.m6 : any ++>new m5.m6.m7.m8.c() : c ++>m5.m6.m7.m8.c : typeof c ++>m5.m6.m7.m8 : typeof m8 ++>m5.m6.m7 : typeof m7 ++>m5.m6 : typeof m6 >m5 : typeof m5 ->m6 : typeof m5.m6 ->m7 : typeof m5.m6.m7 ->m8 : typeof m5.m6.m7.m8 ->c : typeof m5.m6.m7.m8.c -+>m6 : any -+>m7 : any -+>m8 : any -+>c : any ++>m6 : typeof m6 ++>m7 : typeof m7 ++>m8 : typeof m8 ++>c : typeof c module m6.m7 { >m6 : typeof m6 @@ -120,17 +120,17 @@ ->m6.m7.m8.c : typeof m6.m7.m8.c ->m6.m7.m8 : typeof m6.m7.m8 ->m6.m7 : typeof m6.m7 -+>new m6.m7.m8.c() : any -+>m6.m7.m8.c : any -+>m6.m7.m8 : any -+>m6.m7 : any ++>new m6.m7.m8.c() : c ++>m6.m7.m8.c : typeof c ++>m6.m7.m8 : typeof m8 ++>m6.m7 : typeof m7 >m6 : typeof m6 ->m7 : typeof m6.m7 ->m8 : typeof m6.m7.m8 ->c : typeof m6.m7.m8.c -+>m7 : any -+>m8 : any -+>c : any ++>m7 : typeof m7 ++>m8 : typeof m8 ++>c : typeof c module m7.m8 { >m7 : typeof m7 @@ -142,15 +142,15 @@ ->m7.m8.m9.c : typeof m7.m8.m9.c ->m7.m8.m9 : typeof m7.m8.m9 ->m7.m8 : typeof m7.m8 -+>new m7.m8.m9.c() : any -+>m7.m8.m9.c : any -+>m7.m8.m9 : any -+>m7.m8 : any ++>new m7.m8.m9.c() : c ++>m7.m8.m9.c : typeof c ++>m7.m8.m9 : typeof m9 ++>m7.m8 : typeof m8 >m7 : typeof m7 ->m8 : typeof m7.m8 ->m9 : typeof m7.m8.m9 ->c : typeof m7.m8.m9.c -+>m8 : any -+>m9 : any -+>c : any ++>m8 : typeof m8 ++>m9 : typeof m9 ++>c : typeof c diff --git a/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.types b/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.types index bc9ecd67fc..e05d95705b 100644 --- a/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.types +++ b/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.types @@ -43,7 +43,7 @@ function f1() { >B : E.B let v1 = c1; // E ->v1 : E.B +>v1 : E >c1 : E.B const c2 = c1; // Fresh E.B @@ -51,7 +51,7 @@ function f1() { >c1 : E.B let v2 = c2; // E ->v2 : E.B +>v2 : E >c2 : E.B const c3: E.B = E.B; // E.B @@ -97,14 +97,14 @@ function f2(cond: boolean) { >c1 : E.A | E.B const c3 = cond ? c1 : c2; // E.A | E.B ->c3 : E.A | E.A | E.B | E.B +>c3 : E.A | E.B >cond ? c1 : c2 : E.A | E.B >cond : boolean >c1 : E.A | E.B >c2 : E.A | E.B const c4 = cond ? c3 : E.C; // E.A | E.B | fresh E.C ->c4 : E.A | E.A | E.B | E.B | E.C +>c4 : E.A | E.B | E.C >cond ? c3 : E.C : E.A | E.B | E.C >cond : boolean >c3 : E.A | E.B @@ -120,7 +120,7 @@ function f2(cond: boolean) { >c4 : E.A | E.B | E.C let v1 = c1; // E ->v1 : E.A | E.B +>v1 : E >c1 : E.A | E.B let v2 = c2; // E.A | E.B @@ -128,11 +128,11 @@ function f2(cond: boolean) { >c2 : E.A | E.B let v3 = c3; // E.A | E.B ->v3 : E.A | E.A | E.B | E.B +>v3 : E.A | E.B >c3 : E.A | E.B let v4 = c4; // E ->v4 : E.A | E.A | E.B | E.B | E.C +>v4 : E >c4 : E.A | E.B | E.C let v5 = c5; // E.A | E.B | E.C @@ -150,7 +150,7 @@ function f3() { >B : E.B let v1 = c1; // E ->v1 : E.B +>v1 : E >c1 : E.B const c2: E.B = E.B; @@ -217,7 +217,7 @@ function f4() { >B : E2.B let v1 = E.B; // E2 ->v1 : E.B +>v1 : E >E.B : E.B >E : typeof E >B : E.B @@ -237,7 +237,7 @@ const c2 = E.B as const; >B : E.B let v1 = E.B; ->v1 : E.B +>v1 : E >E.B : E.B >E : typeof E >B : E.B @@ -253,7 +253,7 @@ class C { >C : C p1 = E.B; ->p1 : E.B +>p1 : E >E.B : E.B >E : typeof E >B : E.B @@ -307,14 +307,14 @@ declare enum MyDeclaredEnum { A, B, C } >C : MyDeclaredEnum.C let val2 = MyDeclaredEnum.A; ->val2 : MyDeclaredEnum.A +>val2 : MyDeclaredEnum >MyDeclaredEnum.A : MyDeclaredEnum.A >MyDeclaredEnum : typeof MyDeclaredEnum >A : MyDeclaredEnum.A val2 = MyDeclaredEnum.B; >val2 = MyDeclaredEnum.B : MyDeclaredEnum.B ->val2 : MyDeclaredEnum.A +>val2 : MyDeclaredEnum >MyDeclaredEnum.B : MyDeclaredEnum.B >MyDeclaredEnum : typeof MyDeclaredEnum >B : MyDeclaredEnum.B diff --git a/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.types.diff b/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.types.diff deleted file mode 100644 index 292f5eaa99..0000000000 --- a/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.types.diff +++ /dev/null @@ -1,113 +0,0 @@ ---- old.computedEnumTypeWidening.types -+++ new.computedEnumTypeWidening.types -@@= skipped -42, +42 lines =@@ - >B : E.B - - let v1 = c1; // E -->v1 : E -+>v1 : E.B - >c1 : E.B - - const c2 = c1; // Fresh E.B -@@= skipped -8, +8 lines =@@ - >c1 : E.B - - let v2 = c2; // E -->v2 : E -+>v2 : E.B - >c2 : E.B - - const c3: E.B = E.B; // E.B -@@= skipped -46, +46 lines =@@ - >c1 : E.A | E.B - - const c3 = cond ? c1 : c2; // E.A | E.B -->c3 : E.A | E.B -+>c3 : E.A | E.A | E.B | E.B - >cond ? c1 : c2 : E.A | E.B - >cond : boolean - >c1 : E.A | E.B - >c2 : E.A | E.B - - const c4 = cond ? c3 : E.C; // E.A | E.B | fresh E.C -->c4 : E.A | E.B | E.C -+>c4 : E.A | E.A | E.B | E.B | E.C - >cond ? c3 : E.C : E.A | E.B | E.C - >cond : boolean - >c3 : E.A | E.B -@@= skipped -23, +23 lines =@@ - >c4 : E.A | E.B | E.C - - let v1 = c1; // E -->v1 : E -+>v1 : E.A | E.B - >c1 : E.A | E.B - - let v2 = c2; // E.A | E.B -@@= skipped -8, +8 lines =@@ - >c2 : E.A | E.B - - let v3 = c3; // E.A | E.B -->v3 : E.A | E.B -+>v3 : E.A | E.A | E.B | E.B - >c3 : E.A | E.B - - let v4 = c4; // E -->v4 : E -+>v4 : E.A | E.A | E.B | E.B | E.C - >c4 : E.A | E.B | E.C - - let v5 = c5; // E.A | E.B | E.C -@@= skipped -22, +22 lines =@@ - >B : E.B - - let v1 = c1; // E -->v1 : E -+>v1 : E.B - >c1 : E.B - - const c2: E.B = E.B; -@@= skipped -67, +67 lines =@@ - >B : E2.B - - let v1 = E.B; // E2 -->v1 : E -+>v1 : E.B - >E.B : E.B - >E : typeof E - >B : E.B -@@= skipped -20, +20 lines =@@ - >B : E.B - - let v1 = E.B; -->v1 : E -+>v1 : E.B - >E.B : E.B - >E : typeof E - >B : E.B -@@= skipped -16, +16 lines =@@ - >C : C - - p1 = E.B; -->p1 : E -+>p1 : E.B - >E.B : E.B - >E : typeof E - >B : E.B -@@= skipped -54, +54 lines =@@ - >C : MyDeclaredEnum.C - - let val2 = MyDeclaredEnum.A; -->val2 : MyDeclaredEnum -+>val2 : MyDeclaredEnum.A - >MyDeclaredEnum.A : MyDeclaredEnum.A - >MyDeclaredEnum : typeof MyDeclaredEnum - >A : MyDeclaredEnum.A - - val2 = MyDeclaredEnum.B; - >val2 = MyDeclaredEnum.B : MyDeclaredEnum.B -->val2 : MyDeclaredEnum -+>val2 : MyDeclaredEnum.A - >MyDeclaredEnum.B : MyDeclaredEnum.B - >MyDeclaredEnum : typeof MyDeclaredEnum - >B : MyDeclaredEnum.B diff --git a/testdata/baselines/reference/submodule/compiler/constEnumBadPropertyNames.types b/testdata/baselines/reference/submodule/compiler/constEnumBadPropertyNames.types index 12fdcef4fe..0400f758ba 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumBadPropertyNames.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumBadPropertyNames.types @@ -2,7 +2,7 @@ === constEnumBadPropertyNames.ts === const enum E { A } ->E : E.A +>E : E >A : E.A var x = E["B"] diff --git a/testdata/baselines/reference/submodule/compiler/constEnumBadPropertyNames.types.diff b/testdata/baselines/reference/submodule/compiler/constEnumBadPropertyNames.types.diff deleted file mode 100644 index 973bea4f47..0000000000 --- a/testdata/baselines/reference/submodule/compiler/constEnumBadPropertyNames.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.constEnumBadPropertyNames.types -+++ new.constEnumBadPropertyNames.types -@@= skipped -1, +1 lines =@@ - - === constEnumBadPropertyNames.ts === - const enum E { A } -->E : E -+>E : E.A - >A : E.A - - var x = E["B"] diff --git a/testdata/baselines/reference/submodule/compiler/constEnumErrors.types b/testdata/baselines/reference/submodule/compiler/constEnumErrors.types index 98bacd1810..ca2f750c85 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumErrors.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumErrors.types @@ -2,7 +2,7 @@ === constEnumErrors.ts === const enum E { ->E : E.A +>E : E A >A : E.A @@ -40,7 +40,7 @@ const enum E1 { } const enum E2 { ->E2 : E2.A +>E2 : E2 A >A : E2.A diff --git a/testdata/baselines/reference/submodule/compiler/constEnumErrors.types.diff b/testdata/baselines/reference/submodule/compiler/constEnumErrors.types.diff index c6dcc29325..8ee5c54e0f 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumErrors.types.diff +++ b/testdata/baselines/reference/submodule/compiler/constEnumErrors.types.diff @@ -1,24 +1,6 @@ --- old.constEnumErrors.types +++ new.constEnumErrors.types -@@= skipped -1, +1 lines =@@ - - === constEnumErrors.ts === - const enum E { -->E : E -+>E : E.A - - A - >A : E.A -@@= skipped -38, +38 lines =@@ - } - - const enum E2 { -->E2 : E2 -+>E2 : E2.A - - A - >A : E2.A -@@= skipped -34, +34 lines =@@ +@@= skipped -73, +73 lines =@@ >E2 : typeof E2 var y = [E2]; diff --git a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues1.types b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues1.types index d1f232f08c..121d7669c9 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues1.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues1.types @@ -8,7 +8,7 @@ module foo { >foo : typeof foo const enum E { X } ->E : E.X +>E : E >X : E.X } diff --git a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues1.types.diff b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues1.types.diff index 0a9030d605..6b12cb0b02 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues1.types.diff +++ b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues1.types.diff @@ -7,8 +7,5 @@ +>foo : typeof foo + const enum E { X } -->E : E -+>E : E.X + >E : E >X : E.X - } - diff --git a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues2.types b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues2.types index da2bda5013..6ef1d427fd 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues2.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues2.types @@ -8,7 +8,7 @@ module foo { >foo : typeof foo const enum E { X } ->E : E.X +>E : E >X : E.X } diff --git a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues2.types.diff b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues2.types.diff index fc3f21aa4d..867dd21c4f 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues2.types.diff @@ -7,8 +7,5 @@ +>foo : typeof foo + const enum E { X } -->E : E -+>E : E.X + >E : E >X : E.X - } - diff --git a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues3.types b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues3.types index d7df5350e5..919bf47337 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues3.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues3.types @@ -2,17 +2,17 @@ === m1.ts === enum foo { A } ->foo : foo.A +>foo : foo >A : foo.A module foo { >foo : typeof foo const enum E { X } ->E : E.X +>E : E >X : E.X } export = foo ->foo : foo.A +>foo : foo diff --git a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues3.types.diff b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues3.types.diff index ee29b98b2d..2318b45238 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues3.types.diff +++ b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues3.types.diff @@ -1,23 +1,11 @@ --- old.constEnumMergingWithValues3.types +++ new.constEnumMergingWithValues3.types -@@= skipped -1, +1 lines =@@ - - === m1.ts === - enum foo { A } -->foo : foo -+>foo : foo.A +@@= skipped -5, +5 lines =@@ >A : foo.A module foo { +>foo : typeof foo + const enum E { X } -->E : E -+>E : E.X + >E : E >X : E.X - } - - export = foo -->foo : foo -+>foo : foo.A - diff --git a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues4.types b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues4.types index 1a76e8ee96..acee2690f4 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues4.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues4.types @@ -5,7 +5,7 @@ module foo { >foo : typeof foo const enum E { X } ->E : E.X +>E : E >X : E.X } diff --git a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues4.types.diff b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues4.types.diff index 1ef2995d06..e975e83b47 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues4.types.diff +++ b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues4.types.diff @@ -7,8 +7,5 @@ +>foo : typeof foo + const enum E { X } -->E : E -+>E : E.X + >E : E >X : E.X - } - diff --git a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues5.types b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues5.types index 34c9550ea5..8b195ece3d 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues5.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues5.types @@ -5,7 +5,7 @@ module foo { >foo : typeof foo const enum E { X } ->E : E.X +>E : E >X : E.X } diff --git a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues5.types.diff b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues5.types.diff index 2bd594d01d..96c2ae426a 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues5.types.diff +++ b/testdata/baselines/reference/submodule/compiler/constEnumMergingWithValues5.types.diff @@ -7,8 +7,5 @@ +>foo : typeof foo + const enum E { X } -->E : E -+>E : E.X + >E : E >X : E.X - } - diff --git a/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types b/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types index c60812dc46..272c321b01 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types @@ -13,7 +13,7 @@ module Outer { >Outer : typeof Outer export const enum A { X } ->A : A.X +>A : A >X : A.X } @@ -25,12 +25,12 @@ module B { >Outer : typeof Outer var x = O.A.X; ->x : A.X ->O.A.X : A.X +>x : A +>O.A.X : A >O.A : typeof A >O : typeof Outer >A : typeof A ->X : A.X +>X : A var y = O.x; >y : number diff --git a/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types.diff b/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types.diff index f16a7a688a..b70ba4c540 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types.diff +++ b/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types.diff @@ -7,11 +7,8 @@ +>Outer : typeof Outer + export const enum A { X } -->A : A -+>A : A.X + >A : A >X : A.X - } - @@= skipped -9, +11 lines =@@ >B : typeof B @@ -28,12 +25,12 @@ ->O : typeof O ->A : typeof O.A ->X : O.A -+>x : A.X -+>O.A.X : A.X ++>x : A ++>O.A.X : A +>O.A : typeof A +>O : typeof Outer +>A : typeof A -+>X : A.X ++>X : A var y = O.x; >y : number diff --git a/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport1.types b/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport1.types index 1b6e7b0e93..fd19d3e1aa 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport1.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport1.types @@ -2,7 +2,7 @@ === a.ts === const enum A { ->A : A.Foo +>A : A Foo >Foo : A.Foo diff --git a/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport1.types.diff b/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport1.types.diff deleted file mode 100644 index 4b5b3cabfb..0000000000 --- a/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport1.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.constEnumPreserveEmitNamedExport1.types -+++ new.constEnumPreserveEmitNamedExport1.types -@@= skipped -1, +1 lines =@@ - - === a.ts === - const enum A { -->A : A -+>A : A.Foo - - Foo - >Foo : A.Foo diff --git a/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport2.types b/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport2.types index ee3829b535..49059befd9 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport2.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport2.types @@ -2,7 +2,7 @@ === a.ts === const enum A { ->A : A.Foo +>A : A Foo >Foo : A.Foo diff --git a/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport2.types.diff b/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport2.types.diff deleted file mode 100644 index eeb1b998e8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/constEnumPreserveEmitNamedExport2.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.constEnumPreserveEmitNamedExport2.types -+++ new.constEnumPreserveEmitNamedExport2.types -@@= skipped -1, +1 lines =@@ - - === a.ts === - const enum A { -->A : A -+>A : A.Foo - - Foo - >Foo : A.Foo diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types index 481edcc457..e6c01357a8 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types +++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types @@ -49,8 +49,8 @@ declare module templa.mvc.composite { } module templa.dom.mvc { >templa : typeof templa ->dom : any ->mvc : any +>dom : typeof dom +>mvc : typeof mvc export interface IElementController extends templa.mvc.IController { >IElementController : IElementController @@ -99,13 +99,13 @@ module templa.dom.mvc.composite { >templa : any >mvc : any >composite : any ->templa.dom.mvc.AbstractElementController : any ->templa.dom.mvc : any ->templa.dom : any +>templa.dom.mvc.AbstractElementController : AbstractElementController +>templa.dom.mvc : typeof mvc +>templa.dom : typeof dom >templa : typeof templa ->dom : any ->mvc : any ->AbstractElementController : any +>dom : typeof dom +>mvc : typeof mvc +>AbstractElementController : typeof AbstractElementController public _controllers: templa.mvc.IController[]; >_controllers : IController[] @@ -117,7 +117,7 @@ module templa.dom.mvc.composite { constructor() { super(); >super() : void ->super : any +>super : typeof AbstractElementController this._controllers = []; >this._controllers = [] : undefined[] diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types.diff b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types.diff index 18ca244b11..e7223c5434 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types.diff @@ -49,8 +49,8 @@ } module templa.dom.mvc { +>templa : typeof templa -+>dom : any -+>mvc : any ++>dom : typeof dom ++>mvc : typeof mvc + export interface IElementController extends templa.mvc.IController { +>IElementController : IElementController @@ -98,19 +98,8 @@ >templa : any >mvc : any >composite : any -->templa.dom.mvc.AbstractElementController : AbstractElementController -->templa.dom.mvc : typeof mvc -->templa.dom : typeof dom -+>templa.dom.mvc.AbstractElementController : any -+>templa.dom.mvc : any -+>templa.dom : any - >templa : typeof templa -->dom : typeof dom -->mvc : typeof mvc -->AbstractElementController : typeof AbstractElementController -+>dom : any -+>mvc : any -+>AbstractElementController : any +@@= skipped -12, +13 lines =@@ + >AbstractElementController : typeof AbstractElementController public _controllers: templa.mvc.IController[]; ->_controllers : templa.mvc.IController[] @@ -118,12 +107,7 @@ >templa : any >mvc : any >templa : any -@@= skipped -21, +22 lines =@@ - constructor() { - super(); - >super() : void -->super : typeof AbstractElementController -+>super : any +@@= skipped -13, +13 lines =@@ this._controllers = []; >this._controllers = [] : undefined[] diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types index a675e79a1d..8a2e1841d8 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types +++ b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types @@ -42,13 +42,13 @@ module X.Y.base.Z { export class W extends X.Y.base.W { >W : W >TValue : TValue ->X.Y.base.W : any ->X.Y.base : any ->X.Y : any +>X.Y.base.W : W +>X.Y.base : typeof base +>X.Y : typeof Y >X : typeof X ->Y : any ->base : any ->W : any +>Y : typeof Y +>base : typeof base +>W : typeof W value: boolean; >value : boolean diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types.diff b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types.diff index b71c2491da..22dcad37c4 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types.diff @@ -25,19 +25,15 @@ export class W extends X.Y.base.W { >W : W ->X.Y.base.W : base.W -->X.Y.base : typeof base -->X.Y : typeof Y +>TValue : TValue -+>X.Y.base.W : any -+>X.Y.base : any -+>X.Y : any ++>X.Y.base.W : W + >X.Y.base : typeof base + >X.Y : typeof Y >X : typeof X -->Y : typeof Y -->base : typeof base + >Y : typeof Y + >base : typeof base ->W : typeof base.W -+>Y : any -+>base : any -+>W : any ++>W : typeof W value: boolean; >value : boolean diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types index 45fe6b09a3..1ff5261705 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types +++ b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types @@ -31,7 +31,7 @@ module A.B.C { export class ContextMenu extends EventManager { >ContextMenu : ContextMenu ->EventManager : any +>EventManager : EventManager name: string; >name : string diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types.diff b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types.diff deleted file mode 100644 index c4522a214b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.declFileWithExtendsClauseThatHasItsContainerNameConflict.types -+++ new.declFileWithExtendsClauseThatHasItsContainerNameConflict.types -@@= skipped -30, +30 lines =@@ - - export class ContextMenu extends EventManager { - >ContextMenu : ContextMenu -->EventManager : EventManager -+>EventManager : any - - name: string; - >name : string diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types index 48201c76ea..8b374cf4ec 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types @@ -3,7 +3,7 @@ === declFileWithInternalModuleNameConflictsInExtendsClause1.ts === module X.A.C { >X : typeof X ->A : any +>A : typeof A >C : any export interface Z { @@ -22,9 +22,9 @@ module X.A.B.C { export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict >W : W >X.A.C : any ->X.A : any +>X.A : typeof A >X : typeof X ->A : any +>A : typeof A >C : any } } diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types.diff index cc2f9a6f2e..dc2cb4f967 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types.diff @@ -5,7 +5,7 @@ === declFileWithInternalModuleNameConflictsInExtendsClause1.ts === module X.A.C { +>X : typeof X -+>A : any ++>A : typeof A +>C : any + export interface Z { @@ -21,12 +21,3 @@ } export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict >W : W - >X.A.C : any -->X.A : typeof A -+>X.A : any - >X : typeof X -->A : typeof A -+>A : any - >C : any - } - } diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types index 3209030c13..3c8b391e12 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types @@ -3,7 +3,7 @@ === declFileWithInternalModuleNameConflictsInExtendsClause2.ts === module X.A.C { >X : typeof X ->A : any +>A : typeof A >C : any export interface Z { @@ -26,9 +26,9 @@ module X.A.B.C { module X.A.B.C { >X : typeof X ->A : any ->B : any ->C : any +>A : typeof A +>B : typeof B +>C : typeof C module A { >A : any diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types.diff index d38a46b911..5c60c2c47f 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types.diff @@ -5,7 +5,7 @@ === declFileWithInternalModuleNameConflictsInExtendsClause2.ts === module X.A.C { +>X : typeof X -+>A : any ++>A : typeof A +>C : any + export interface Z { @@ -18,9 +18,9 @@ module X.A.B.C { +>X : typeof X -+>A : any -+>B : any -+>C : any ++>A : typeof A ++>B : typeof B ++>C : typeof C + module A { +>A : any diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types index 9a4c195909..c6f9963d18 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types @@ -3,7 +3,7 @@ === declFileWithInternalModuleNameConflictsInExtendsClause3.ts === module X.A.C { >X : typeof X ->A : any +>A : typeof A >C : any export interface Z { @@ -19,18 +19,18 @@ module X.A.B.C { export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict >W : W >X.A.C : any ->X.A : any +>X.A : typeof A >X : typeof X ->A : any +>A : typeof A >C : any } } module X.A.B.C { >X : typeof X ->A : any ->B : any ->C : any +>A : typeof A +>B : typeof B +>C : typeof C export module A { >A : any diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types.diff index 3abae1e2e9..ab921dbceb 100644 --- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types.diff +++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types.diff @@ -5,7 +5,7 @@ === declFileWithInternalModuleNameConflictsInExtendsClause3.ts === module X.A.C { +>X : typeof X -+>A : any ++>A : typeof A +>C : any + export interface Z { @@ -13,24 +13,14 @@ } } module X.A.B.C { -@@= skipped -12, +17 lines =@@ - export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict - >W : W - >X.A.C : any -->X.A : typeof A -+>X.A : any - >X : typeof X -->A : typeof A -+>A : any - >C : any - } +@@= skipped -20, +25 lines =@@ } module X.A.B.C { +>X : typeof X -+>A : any -+>B : any -+>C : any ++>A : typeof A ++>B : typeof B ++>C : typeof C + export module A { +>A : any diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.types b/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.types index c34c9d4a98..98154e1dd7 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.types @@ -6,14 +6,14 @@ const Bar = 'bar'; >'bar' : "bar" enum Hello { ->Hello : Hello.World +>Hello : Hello World >World : Hello.World } enum Hello1 { ->Hello1 : Hello1.World1 +>Hello1 : Hello1 World1 >World1 : Hello1.World1 diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.types.diff deleted file mode 100644 index 96d7c95863..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.types.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.declarationEmitClassMemberNameConflict2.types -+++ new.declarationEmitClassMemberNameConflict2.types -@@= skipped -5, +5 lines =@@ - >'bar' : "bar" - - enum Hello { -->Hello : Hello -+>Hello : Hello.World - - World - >World : Hello.World - } - - enum Hello1 { -->Hello1 : Hello1 -+>Hello1 : Hello1.World1 - - World1 - >World1 : Hello1.World1 diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.types b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.types index 66eeadf3cc..9e5c986a46 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.types @@ -2,7 +2,7 @@ === EnumExample.ts === enum EnumExample { ->EnumExample : EnumExample.TEST +>EnumExample : EnumExample TEST = 'TEST', >TEST : EnumExample.TEST @@ -10,7 +10,7 @@ enum EnumExample { } export default EnumExample; ->EnumExample : EnumExample.TEST +>EnumExample : EnumExample === index.ts === import EnumExample from './EnumExample'; @@ -21,9 +21,9 @@ export default { [EnumExample.TEST]: {}, >[EnumExample.TEST] : {} ->EnumExample.TEST : EnumExample.TEST +>EnumExample.TEST : EnumExample >EnumExample : typeof EnumExample ->TEST : EnumExample.TEST +>TEST : EnumExample >{} : {} }; diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.types.diff deleted file mode 100644 index 60d8eb2dda..0000000000 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.types.diff +++ /dev/null @@ -1,32 +0,0 @@ ---- old.declarationEmitComputedNameConstEnumAlias.types -+++ new.declarationEmitComputedNameConstEnumAlias.types -@@= skipped -1, +1 lines =@@ - - === EnumExample.ts === - enum EnumExample { -->EnumExample : EnumExample -+>EnumExample : EnumExample.TEST - - TEST = 'TEST', - >TEST : EnumExample.TEST -@@= skipped -8, +8 lines =@@ - } - - export default EnumExample; -->EnumExample : EnumExample -+>EnumExample : EnumExample.TEST - - === index.ts === - import EnumExample from './EnumExample'; -@@= skipped -11, +11 lines =@@ - - [EnumExample.TEST]: {}, - >[EnumExample.TEST] : {} -->EnumExample.TEST : EnumExample -+>EnumExample.TEST : EnumExample.TEST - >EnumExample : typeof EnumExample -->TEST : EnumExample -+>TEST : EnumExample.TEST - >{} : {} - - }; diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink.types b/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink.types index 3b7e3db063..a94be2a3f9 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink.types @@ -2,10 +2,10 @@ === /p1/node_modules/typescript-fsa/src/impl.d.ts === export function getA(): A; ->getA : () => A.Val +>getA : () => A export enum A { ->A : A.Val +>A : A Val >Val : A.Val @@ -15,10 +15,10 @@ export enum A { export * from "./src/impl"; === /p2/node_modules/typescript-fsa/src/impl.d.ts === export function getA(): A; ->getA : () => A.Val +>getA : () => A export enum A { ->A : A.Val +>A : A Val >Val : A.Val @@ -31,15 +31,15 @@ import * as _whatever from "p2"; >_whatever : typeof import("/p2/index") import { getA } from "typescript-fsa"; ->getA : () => A.Val +>getA : () => A export const a = getA(); ->a : A.Val ->getA() : A.Val ->getA : () => A.Val +>a : A +>getA() : A +>getA : () => A === /p2/index.d.ts === export const a: import("typescript-fsa").A; ->a : A.Val +>a : A diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink.types.diff index ff7f8cd08d..6ebb67a7e6 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink.types.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink.types.diff @@ -1,32 +1,6 @@ --- old.declarationEmitForGlobalishSpecifierSymlink.types +++ new.declarationEmitForGlobalishSpecifierSymlink.types -@@= skipped -1, +1 lines =@@ - - === /p1/node_modules/typescript-fsa/src/impl.d.ts === - export function getA(): A; -->getA : () => A -+>getA : () => A.Val - - export enum A { -->A : A -+>A : A.Val - - Val - >Val : A.Val -@@= skipped -13, +13 lines =@@ - export * from "./src/impl"; - === /p2/node_modules/typescript-fsa/src/impl.d.ts === - export function getA(): A; -->getA : () => A -+>getA : () => A.Val - - export enum A { -->A : A -+>A : A.Val - - Val - >Val : A.Val -@@= skipped -13, +13 lines =@@ +@@= skipped -27, +27 lines =@@ export * from "./src/impl"; === /p1/index.ts === import * as _whatever from "p2"; @@ -35,19 +9,19 @@ import { getA } from "typescript-fsa"; ->getA : () => import("/p1/node_modules/typescript-fsa/index").A -+>getA : () => A.Val ++>getA : () => A export const a = getA(); ->a : import("/p1/node_modules/typescript-fsa/index").A ->getA() : import("/p1/node_modules/typescript-fsa/index").A ->getA : () => import("/p1/node_modules/typescript-fsa/index").A -+>a : A.Val -+>getA() : A.Val -+>getA : () => A.Val ++>a : A ++>getA() : A ++>getA : () => A === /p2/index.d.ts === export const a: import("typescript-fsa").A; ->a : import("/p2/node_modules/typescript-fsa/index").A -+>a : A.Val ++>a : A diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink2.types b/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink2.types index e106273ae7..90df7b8985 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink2.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink2.types @@ -2,10 +2,10 @@ === /cache/typescript-fsa/src/impl.d.ts === export function getA(): A; ->getA : () => A.Val +>getA : () => A export enum A { ->A : A.Val +>A : A Val >Val : A.Val @@ -18,15 +18,15 @@ import * as _whatever from "p2"; >_whatever : typeof import("/p2/index") import { getA } from "typescript-fsa"; ->getA : () => A.Val +>getA : () => A export const a = getA(); ->a : A.Val ->getA() : A.Val ->getA : () => A.Val +>a : A +>getA() : A +>getA : () => A === /p2/index.d.ts === export const a: import("typescript-fsa").A; ->a : A.Val +>a : A diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink2.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink2.types.diff index 547d67b3f4..ab12fe28cd 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitForGlobalishSpecifierSymlink2.types.diff @@ -1,19 +1,6 @@ --- old.declarationEmitForGlobalishSpecifierSymlink2.types +++ new.declarationEmitForGlobalishSpecifierSymlink2.types -@@= skipped -1, +1 lines =@@ - - === /cache/typescript-fsa/src/impl.d.ts === - export function getA(): A; -->getA : () => A -+>getA : () => A.Val - - export enum A { -->A : A -+>A : A.Val - - Val - >Val : A.Val -@@= skipped -13, +13 lines =@@ +@@= skipped -14, +14 lines =@@ export * from "./src/impl"; === /p1/index.ts === import * as _whatever from "p2"; @@ -22,19 +9,19 @@ import { getA } from "typescript-fsa"; ->getA : () => import("/cache/typescript-fsa/index").A -+>getA : () => A.Val ++>getA : () => A export const a = getA(); ->a : import("/cache/typescript-fsa/index").A ->getA() : import("/cache/typescript-fsa/index").A ->getA : () => import("/cache/typescript-fsa/index").A -+>a : A.Val -+>getA() : A.Val -+>getA : () => A.Val ++>a : A ++>getA() : A ++>getA : () => A === /p2/index.d.ts === export const a: import("typescript-fsa").A; ->a : import("/cache/typescript-fsa/index").A -+>a : A.Val ++>a : A diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types index 90646e989b..20416a582c 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types @@ -62,10 +62,10 @@ export module M.P { >I : I } export import im = M.P.f; ->im : any +>im : () => void >M : typeof M ->P : any ->f : any +>P : typeof P +>f : () => void export var a = M.a; // emitted incorrectly as typeof f >a : () => void diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types.diff index b4cc37483e..99c9d4108d 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types.diff @@ -35,16 +35,7 @@ +>I : I } export import im = M.P.f; -->im : () => void -+>im : any - >M : typeof M -->P : typeof P -->f : () => void -+>P : any -+>f : any - - export var a = M.a; // emitted incorrectly as typeof f - >a : () => void + >im : () => void @@= skipped -14, +15 lines =@@ >a : () => void diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types index b1de305b9d..ef0a58989d 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types @@ -29,42 +29,42 @@ module X.Y.base.Z { >Z : typeof Z export var f = X.Y.base.f; // Should be base.f ->f : any ->X.Y.base.f : any ->X.Y.base : any ->X.Y : any +>f : () => void +>X.Y.base.f : () => void +>X.Y.base : typeof base +>X.Y : typeof Y >X : typeof X ->Y : any ->base : any ->f : any +>Y : typeof Y +>base : typeof base +>f : () => void export var C = X.Y.base.C; // Should be base.C ->C : any ->X.Y.base.C : any ->X.Y.base : any ->X.Y : any +>C : typeof C +>X.Y.base.C : typeof C +>X.Y.base : typeof base +>X.Y : typeof Y >X : typeof X ->Y : any ->base : any ->C : any +>Y : typeof Y +>base : typeof base +>C : typeof C export var M = X.Y.base.M; // Should be base.M ->M : any ->X.Y.base.M : any ->X.Y.base : any ->X.Y : any +>M : typeof M +>X.Y.base.M : typeof M +>X.Y.base : typeof base +>X.Y : typeof Y >X : typeof X ->Y : any ->base : any ->M : any +>Y : typeof Y +>base : typeof base +>M : typeof M export var E = X.Y.base.E; // Should be base.E ->E : any ->X.Y.base.E : any ->X.Y.base : any ->X.Y : any +>E : typeof E +>X.Y.base.E : typeof E +>X.Y.base : typeof base +>X.Y : typeof Y >X : typeof X ->Y : any ->base : any ->E : any +>Y : typeof Y +>base : typeof base +>E : typeof E } diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types.diff index fdaf72eeb7..1136cbad83 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types.diff @@ -9,74 +9,45 @@ } module X.Y.base.Z { -@@= skipped -10, +10 lines =@@ - >Z : typeof Z - - export var f = X.Y.base.f; // Should be base.f -->f : () => void -->X.Y.base.f : () => void -->X.Y.base : typeof base -->X.Y : typeof Y -+>f : any -+>X.Y.base.f : any -+>X.Y.base : any -+>X.Y : any - >X : typeof X -->Y : typeof Y -->base : typeof base -->f : () => void -+>Y : any -+>base : any -+>f : any +@@= skipped -20, +20 lines =@@ + >f : () => void export var C = X.Y.base.C; // Should be base.C ->C : typeof base.C ->X.Y.base.C : typeof base.C -->X.Y.base : typeof base -->X.Y : typeof Y -+>C : any -+>X.Y.base.C : any -+>X.Y.base : any -+>X.Y : any ++>C : typeof C ++>X.Y.base.C : typeof C + >X.Y.base : typeof base + >X.Y : typeof Y >X : typeof X -->Y : typeof Y -->base : typeof base + >Y : typeof Y + >base : typeof base ->C : typeof base.C -+>Y : any -+>base : any -+>C : any ++>C : typeof C export var M = X.Y.base.M; // Should be base.M ->M : typeof base.M ->X.Y.base.M : typeof base.M -->X.Y.base : typeof base -->X.Y : typeof Y -+>M : any -+>X.Y.base.M : any -+>X.Y.base : any -+>X.Y : any ++>M : typeof M ++>X.Y.base.M : typeof M + >X.Y.base : typeof base + >X.Y : typeof Y >X : typeof X -->Y : typeof Y -->base : typeof base + >Y : typeof Y + >base : typeof base ->M : typeof base.M -+>Y : any -+>base : any -+>M : any ++>M : typeof M export var E = X.Y.base.E; // Should be base.E ->E : typeof base.E ->X.Y.base.E : typeof base.E -->X.Y.base : typeof base -->X.Y : typeof Y -+>E : any -+>X.Y.base.E : any -+>X.Y.base : any -+>X.Y : any ++>E : typeof E ++>X.Y.base.E : typeof E + >X.Y.base : typeof base + >X.Y : typeof Y >X : typeof X -->Y : typeof Y -->base : typeof base + >Y : typeof Y + >base : typeof base ->E : typeof base.E -+>Y : any -+>base : any -+>E : any ++>E : typeof E } diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types index e8369f4cc0..a1721a5318 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types @@ -42,7 +42,7 @@ module M.P { >C : C export enum D { ->D : D.f +>D : D f >f : D.f diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types.diff index f6e67bf0da..6f5c4caa3e 100644 --- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types.diff +++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types.diff @@ -9,14 +9,7 @@ export module D { >D : typeof D -@@= skipped -35, +37 lines =@@ - >C : C - - export enum D { -->D : D -+>D : D.f - - f +@@= skipped -41, +43 lines =@@ >f : D.f } export var v: M.D; // ok diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.types b/testdata/baselines/reference/submodule/compiler/dottedModuleName.types index df787c08f6..c186ffc3ae 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.types +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName.types @@ -44,7 +44,7 @@ module M.N { export var v=f(10); >v : any >f(10) : any ->f : any +>f : (x: number) => any >10 : 10 } } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.types.diff b/testdata/baselines/reference/submodule/compiler/dottedModuleName.types.diff deleted file mode 100644 index 656e6bde03..0000000000 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.dottedModuleName.types -+++ new.dottedModuleName.types -@@= skipped -43, +43 lines =@@ - export var v=f(10); - >v : any - >f(10) : any -->f : (x: number) => any -+>f : any - >10 : 10 - } - } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types index 5c4e9b8151..e081ef3f2e 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types @@ -34,12 +34,12 @@ var tmpOK = AA.B.x; >x : number var tmpError = A.B.x; ->tmpError : any ->A.B.x : any ->A.B : any +>tmpError : number +>A.B.x : number +>A.B : typeof B >A : typeof A ->B : any ->x : any +>B : typeof B +>x : number module A.B.C @@ -67,15 +67,15 @@ module M >A : typeof A import X2 = A.B; ->X2 : any +>X2 : typeof B >A : typeof A ->B : any +>B : typeof B import X3 = A.B.C; ->X3 : any +>X3 : typeof C >A : typeof A ->B : any ->C : any +>B : typeof B +>C : typeof C } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types.diff b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types.diff index 0b1518d49f..0e10509888 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types.diff @@ -12,20 +12,16 @@ >x : number var tmpError = A.B.x; -->tmpError : number -->A.B.x : number + >tmpError : number + >A.B.x : number ->A.B : typeof A.B -+>tmpError : any -+>A.B.x : any -+>A.B : any ++>A.B : typeof B >A : typeof A ->B : typeof A.B -->x : number -+>B : any -+>x : any ++>B : typeof B + >x : number - module A.B.C @@= skipped -30, +30 lines =@@ @@ -44,19 +40,19 @@ ->X2 : typeof X1.B ->A : typeof X1 ->B : typeof X1.B -+>X2 : any ++>X2 : typeof B +>A : typeof A -+>B : any ++>B : typeof B import X3 = A.B.C; ->X3 : typeof X2.C ->A : typeof X1 ->B : typeof X1.B ->C : typeof X2.C -+>X3 : any ++>X3 : typeof C +>A : typeof A -+>B : any -+>C : any ++>B : typeof B ++>C : typeof C } diff --git a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.types b/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.types index 1230b7a015..1bb2fff499 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.types +++ b/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.types @@ -11,15 +11,15 @@ export namespace A.B.C { } export function bar() { ->bar : () => any +>bar : () => void return A.B.C.foo(); ->A.B.C.foo() : any ->A.B.C.foo : any ->A.B.C : any ->A.B : any +>A.B.C.foo() : void +>A.B.C.foo : () => void +>A.B.C : typeof C +>A.B : typeof B >A : typeof A ->B : any ->C : any ->foo : any +>B : typeof B +>C : typeof C +>foo : () => void } diff --git a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.types.diff b/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.types.diff index 58f470947b..089e9236ec 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.types.diff +++ b/testdata/baselines/reference/submodule/compiler/dottedNamesInSystem.types.diff @@ -1,26 +1,17 @@ --- old.dottedNamesInSystem.types +++ new.dottedNamesInSystem.types -@@= skipped -10, +10 lines =@@ - } - - export function bar() { -->bar : () => void -+>bar : () => any - +@@= skipped -15, +15 lines =@@ return A.B.C.foo(); -->A.B.C.foo() : void -->A.B.C.foo : () => void + >A.B.C.foo() : void + >A.B.C.foo : () => void ->A.B.C : typeof A.B.C ->A.B : typeof A.B -+>A.B.C.foo() : any -+>A.B.C.foo : any -+>A.B.C : any -+>A.B : any ++>A.B.C : typeof C ++>A.B : typeof B >A : typeof A ->B : typeof A.B ->C : typeof A.B.C -->foo : () => void -+>B : any -+>C : any -+>foo : any ++>B : typeof B ++>C : typeof C + >foo : () => void } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.types b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.types index c949104b5b..5fa6b81c0c 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.types @@ -2,7 +2,7 @@ === duplicateIdentifierEnum_A.ts === enum A { ->A : A.bar +>A : A bar >bar : A.bar @@ -21,7 +21,7 @@ interface B { >foo : number } const enum B { ->B : B.bar +>B : B bar >bar : B.bar @@ -39,7 +39,7 @@ function C() { } enum D { ->D : D.bar +>D : D bar >bar : D.bar @@ -59,7 +59,7 @@ function D() { >0 : 0 } enum E { ->E : E.bar +>E : E bar >bar : E.bar diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.types.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.types.diff index 470ca7d3d9..bde24dacbe 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.types.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.types.diff @@ -1,15 +1,6 @@ --- old.duplicateIdentifierEnum.types +++ new.duplicateIdentifierEnum.types -@@= skipped -1, +1 lines =@@ - - === duplicateIdentifierEnum_A.ts === - enum A { -->A : A -+>A : A.bar - - bar - >bar : A.bar -@@= skipped -13, +13 lines =@@ +@@= skipped -14, +14 lines =@@ } interface B { @@ -18,27 +9,3 @@ foo: number; >foo : number } - const enum B { -->B : B -+>B : B.bar - - bar - >bar : B.bar -@@= skipped -22, +24 lines =@@ - } - - enum D { -->D : D -+>D : D.bar - - bar - >bar : D.bar -@@= skipped -20, +20 lines =@@ - >0 : 0 - } - enum E { -->E : E -+>E : E.bar - - bar - >bar : E.bar diff --git a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.types b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.types index 1b0e8e42be..94d47b3a8d 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.types @@ -2,7 +2,7 @@ === duplicateLocalVariable4.ts === enum E{ ->E : E.a +>E : E a >a : E.a @@ -14,7 +14,7 @@ var x = E; var x = E.a; >x : typeof E ->E.a : E.a +>E.a : E >E : typeof E ->a : E.a +>a : E diff --git a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.types.diff b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.types.diff deleted file mode 100644 index 1da94a4410..0000000000 --- a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable4.types.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.duplicateLocalVariable4.types -+++ new.duplicateLocalVariable4.types -@@= skipped -1, +1 lines =@@ - - === duplicateLocalVariable4.ts === - enum E{ -->E : E -+>E : E.a - - a - >a : E.a -@@= skipped -12, +12 lines =@@ - - var x = E.a; - >x : typeof E -->E.a : E -+>E.a : E.a - >E : typeof E -->a : E -+>a : E.a - diff --git a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.types b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.types index 3c20f538f3..5c2ad0e175 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.types @@ -10,12 +10,12 @@ const s = "s"; >"s" : "s" enum E1 { A = "ENUM_KEY" } ->E1 : E1.A +>E1 : E1 >A : E1.A >"ENUM_KEY" : "ENUM_KEY" enum E2 { B } ->E2 : E2.B +>E2 : E2 >B : E2.B const t1 = { @@ -54,16 +54,16 @@ const t3 = { [E1.A]: 1, >[E1.A] : number ->E1.A : E1.A +>E1.A : E1 >E1 : typeof E1 ->A : E1.A +>A : E1 >1 : 1 [E1.A]: 1, // duplicate >[E1.A] : number ->E1.A : E1.A +>E1.A : E1 >E1 : typeof E1 ->A : E1.A +>A : E1 >1 : 1 } @@ -73,16 +73,16 @@ const t4 = { [E2.B]: 1, >[E2.B] : number ->E2.B : E2.B +>E2.B : E2 >E2 : typeof E2 ->B : E2.B +>B : E2 >1 : 1 [E2.B]: 1, // duplicate >[E2.B] : number ->E2.B : E2.B +>E2.B : E2 >E2 : typeof E2 ->B : E2.B +>B : E2 >1 : 1 } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.types.diff b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.types.diff index aef31a19b7..988ec33ce6 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.types.diff @@ -1,17 +1,6 @@ --- old.duplicateObjectLiteralProperty_computedName2.types +++ new.duplicateObjectLiteralProperty_computedName2.types -@@= skipped -9, +9 lines =@@ - >"s" : "s" - - enum E1 { A = "ENUM_KEY" } -->E1 : E1 -+>E1 : E1.A - >A : E1.A - >"ENUM_KEY" : "ENUM_KEY" - - enum E2 { B } -->E2 : E2 -+>E2 : E2.B +@@= skipped -18, +18 lines =@@ >B : E2.B const t1 = { @@ -22,25 +11,7 @@ [n]: 1, >[n] : number -@@= skipped -44, +44 lines =@@ - - [E1.A]: 1, - >[E1.A] : number -->E1.A : E1 -+>E1.A : E1.A - >E1 : typeof E1 -->A : E1 -+>A : E1.A - >1 : 1 - - [E1.A]: 1, // duplicate - >[E1.A] : number -->E1.A : E1 -+>E1.A : E1.A - >E1 : typeof E1 -->A : E1 -+>A : E1.A - >1 : 1 +@@= skipped -49, +49 lines =@@ } const t4 = { @@ -51,20 +22,3 @@ [E2.B]: 1, >[E2.B] : number -->E2.B : E2 -+>E2.B : E2.B - >E2 : typeof E2 -->B : E2 -+>B : E2.B - >1 : 1 - - [E2.B]: 1, // duplicate - >[E2.B] : number -->E2.B : E2 -+>E2.B : E2.B - >E2 : typeof E2 -->B : E2 -+>B : E2.B - >1 : 1 - } - diff --git a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.types b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.types index c860242e9e..1f7cd42402 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.types @@ -10,12 +10,12 @@ export const s = "s"; >"s" : "s" export enum E1 { A = "ENUM_KEY" } ->E1 : E1.A +>E1 : E1 >A : E1.A >"ENUM_KEY" : "ENUM_KEY" export enum E2 { B } ->E2 : E2.B +>E2 : E2 >B : E2.B === b.ts === @@ -66,20 +66,20 @@ const t3 = { [keys.E1.A]: 1, >[keys.E1.A] : number ->keys.E1.A : E1.A +>keys.E1.A : E1 >keys.E1 : typeof E1 >keys : typeof import("a") >E1 : typeof E1 ->A : E1.A +>A : E1 >1 : 1 [keys.E1.A]: 1, // duplicate >[keys.E1.A] : number ->keys.E1.A : E1.A +>keys.E1.A : E1 >keys.E1 : typeof E1 >keys : typeof import("a") >E1 : typeof E1 ->A : E1.A +>A : E1 >1 : 1 } @@ -89,20 +89,20 @@ const t4 = { [keys.E2.B]: 1, >[keys.E2.B] : number ->keys.E2.B : E2.B +>keys.E2.B : E2 >keys.E2 : typeof E2 >keys : typeof import("a") >E2 : typeof E2 ->B : E2.B +>B : E2 >1 : 1 [keys.E2.B]: 1, // duplicate >[keys.E2.B] : number ->keys.E2.B : E2.B +>keys.E2.B : E2 >keys.E2 : typeof E2 >keys : typeof import("a") >E2 : typeof E2 ->B : E2.B +>B : E2 >1 : 1 } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.types.diff b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.types.diff index 1d12518a16..f1c64e8650 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.types.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.types.diff @@ -1,18 +1,6 @@ --- old.duplicateObjectLiteralProperty_computedName3.types +++ new.duplicateObjectLiteralProperty_computedName3.types -@@= skipped -9, +9 lines =@@ - >"s" : "s" - - export enum E1 { A = "ENUM_KEY" } -->E1 : E1 -+>E1 : E1.A - >A : E1.A - >"ENUM_KEY" : "ENUM_KEY" - - export enum E2 { B } -->E2 : E2 -+>E2 : E2.B - >B : E2.B +@@= skipped -19, +19 lines =@@ === b.ts === import * as keys from "./a"; @@ -41,7 +29,7 @@ >n : 1 >1 : 1 } -@@= skipped -38, +38 lines =@@ +@@= skipped -28, +28 lines =@@ [keys.s]: 1, >[keys.s] : number >keys.s : "s" @@ -67,11 +55,11 @@ ->keys : typeof keys ->E1 : typeof keys.E1 ->A : keys.E1 -+>keys.E1.A : E1.A ++>keys.E1.A : E1 +>keys.E1 : typeof E1 +>keys : typeof import("a") +>E1 : typeof E1 -+>A : E1.A ++>A : E1 >1 : 1 [keys.E1.A]: 1, // duplicate @@ -81,11 +69,11 @@ ->keys : typeof keys ->E1 : typeof keys.E1 ->A : keys.E1 -+>keys.E1.A : E1.A ++>keys.E1.A : E1 +>keys.E1 : typeof E1 +>keys : typeof import("a") +>E1 : typeof E1 -+>A : E1.A ++>A : E1 >1 : 1 } @@ -102,11 +90,11 @@ ->keys : typeof keys ->E2 : typeof keys.E2 ->B : keys.E2 -+>keys.E2.B : E2.B ++>keys.E2.B : E2 +>keys.E2 : typeof E2 +>keys : typeof import("a") +>E2 : typeof E2 -+>B : E2.B ++>B : E2 >1 : 1 [keys.E2.B]: 1, // duplicate @@ -116,11 +104,11 @@ ->keys : typeof keys ->E2 : typeof keys.E2 ->B : keys.E2 -+>keys.E2.B : E2.B ++>keys.E2.B : E2 +>keys.E2 : typeof E2 +>keys : typeof import("a") +>E2 : typeof E2 -+>B : E2.B ++>B : E2 >1 : 1 } diff --git a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types index e4e346cc81..5e78324365 100644 --- a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types +++ b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types @@ -38,10 +38,10 @@ module Microsoft.PeopleAtWork.Model { >raw : any var res = Model.KnockoutExtentions; ->res : any ->Model.KnockoutExtentions : any +>res : typeof KnockoutExtentions +>Model.KnockoutExtentions : typeof KnockoutExtentions >Model : typeof Model ->KnockoutExtentions : any +>KnockoutExtentions : typeof KnockoutExtentions } } } diff --git a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types.diff b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types.diff deleted file mode 100644 index 4258b67808..0000000000 --- a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.emitMemberAccessExpression.types -+++ new.emitMemberAccessExpression.types -@@= skipped -37, +37 lines =@@ - >raw : any - - var res = Model.KnockoutExtentions; -->res : typeof KnockoutExtentions -->Model.KnockoutExtentions : typeof KnockoutExtentions -+>res : any -+>Model.KnockoutExtentions : any - >Model : typeof Model -->KnockoutExtentions : typeof KnockoutExtentions -+>KnockoutExtentions : any - } - } - } diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.types b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.types index 8fa77505c1..d8867a5475 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.types +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.types @@ -5,20 +5,20 @@ namespace M { >M : typeof M export enum MyEnum { ->MyEnum : MyEnum.BAR +>MyEnum : MyEnum BAR >BAR : MyEnum.BAR } export var object2 = { ->object2 : { foo: MyEnum.BAR; } ->{ foo: MyEnum.BAR } : { foo: MyEnum.BAR; } +>object2 : { foo: MyEnum; } +>{ foo: MyEnum.BAR } : { foo: MyEnum; } foo: MyEnum.BAR ->foo : MyEnum.BAR ->MyEnum.BAR : MyEnum.BAR +>foo : MyEnum +>MyEnum.BAR : MyEnum >MyEnum : typeof MyEnum ->BAR : MyEnum.BAR +>BAR : MyEnum }; } @@ -27,38 +27,38 @@ namespace N { >N : typeof N export enum MyEnum { ->MyEnum : MyEnum.FOO +>MyEnum : MyEnum FOO >FOO : MyEnum.FOO }; export var object1 = { ->object1 : { foo: MyEnum.FOO; } ->{ foo: MyEnum.FOO } : { foo: MyEnum.FOO; } +>object1 : { foo: MyEnum; } +>{ foo: MyEnum.FOO } : { foo: MyEnum; } foo: MyEnum.FOO ->foo : MyEnum.FOO ->MyEnum.FOO : MyEnum.FOO +>foo : MyEnum +>MyEnum.FOO : MyEnum >MyEnum : typeof MyEnum ->FOO : MyEnum.FOO +>FOO : MyEnum }; } let broken = [ ->broken : ({ foo: MyEnum.BAR; } | { foo: MyEnum.FOO; })[] ->[ N.object1, M.object2] : ({ foo: MyEnum.BAR; } | { foo: MyEnum.FOO; })[] +>broken : ({ foo: MyEnum; } | { foo: MyEnum; })[] +>[ N.object1, M.object2] : ({ foo: MyEnum; } | { foo: MyEnum; })[] N.object1, ->N.object1 : { foo: MyEnum.FOO; } +>N.object1 : { foo: MyEnum; } >N : typeof N ->object1 : { foo: MyEnum.FOO; } +>object1 : { foo: MyEnum; } M.object2 ->M.object2 : { foo: MyEnum.BAR; } +>M.object2 : { foo: MyEnum; } >M : typeof M ->object2 : { foo: MyEnum.BAR; } +>object2 : { foo: MyEnum; } ]; diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.types.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.types.diff index 58a44d24f9..518e0b762c 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.types.diff +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.types.diff @@ -1,80 +1,27 @@ --- old.enumAssignmentCompat4.types +++ new.enumAssignmentCompat4.types -@@= skipped -4, +4 lines =@@ - >M : typeof M - - export enum MyEnum { -->MyEnum : MyEnum -+>MyEnum : MyEnum.BAR - - BAR - >BAR : MyEnum.BAR - } - export var object2 = { -->object2 : { foo: MyEnum; } -->{ foo: MyEnum.BAR } : { foo: MyEnum; } -+>object2 : { foo: MyEnum.BAR; } -+>{ foo: MyEnum.BAR } : { foo: MyEnum.BAR; } - - foo: MyEnum.BAR -->foo : MyEnum -->MyEnum.BAR : MyEnum -+>foo : MyEnum.BAR -+>MyEnum.BAR : MyEnum.BAR - >MyEnum : typeof MyEnum -->BAR : MyEnum -+>BAR : MyEnum.BAR - - }; - } -@@= skipped -22, +22 lines =@@ - >N : typeof N - - export enum MyEnum { -->MyEnum : MyEnum -+>MyEnum : MyEnum.FOO - - FOO - >FOO : MyEnum.FOO - - }; - export var object1 = { -->object1 : { foo: MyEnum; } -->{ foo: MyEnum.FOO } : { foo: MyEnum; } -+>object1 : { foo: MyEnum.FOO; } -+>{ foo: MyEnum.FOO } : { foo: MyEnum.FOO; } - - foo: MyEnum.FOO -->foo : MyEnum -->MyEnum.FOO : MyEnum -+>foo : MyEnum.FOO -+>MyEnum.FOO : MyEnum.FOO - >MyEnum : typeof MyEnum -->FOO : MyEnum -+>FOO : MyEnum.FOO - - }; +@@= skipped -46, +46 lines =@@ } let broken = [ ->broken : ({ foo: M.MyEnum; } | { foo: N.MyEnum; })[] ->[ N.object1, M.object2] : ({ foo: M.MyEnum; } | { foo: N.MyEnum; })[] -+>broken : ({ foo: MyEnum.BAR; } | { foo: MyEnum.FOO; })[] -+>[ N.object1, M.object2] : ({ foo: MyEnum.BAR; } | { foo: MyEnum.FOO; })[] ++>broken : ({ foo: MyEnum; } | { foo: MyEnum; })[] ++>[ N.object1, M.object2] : ({ foo: MyEnum; } | { foo: MyEnum; })[] N.object1, ->N.object1 : { foo: N.MyEnum; } -+>N.object1 : { foo: MyEnum.FOO; } ++>N.object1 : { foo: MyEnum; } >N : typeof N ->object1 : { foo: N.MyEnum; } -+>object1 : { foo: MyEnum.FOO; } ++>object1 : { foo: MyEnum; } M.object2 ->M.object2 : { foo: M.MyEnum; } -+>M.object2 : { foo: MyEnum.BAR; } ++>M.object2 : { foo: MyEnum; } >M : typeof M ->object2 : { foo: M.MyEnum; } -+>object2 : { foo: MyEnum.BAR; } ++>object2 : { foo: MyEnum; } ]; diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.types b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.types index 74a3d91c03..8b65bd6797 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.types +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.types @@ -5,7 +5,7 @@ namespace first { >first : typeof first export enum E { A = 1 } ->E : E.A +>E : E >A : E.A >1 : 1 } @@ -14,7 +14,7 @@ namespace second { >second : typeof second export enum E { A = 2 } ->E : E.A +>E : E >A : E.A >2 : 2 } @@ -23,8 +23,8 @@ class Base { >Base : Base method(param: first.E) { ->method : (param: E.A) => void ->param : E.A +>method : (param: E) => void +>param : E >first : any } @@ -35,18 +35,18 @@ class Derived extends Base { >Base : Base override method(param: second.E) { ->method : (param: E.A) => void ->param : E.A +>method : (param: E) => void +>param : E >second : any } } function overloadingFunction(): first.E ->overloadingFunction : () => E.A +>overloadingFunction : () => E >first : any function overloadingFunction(): second.E { ->overloadingFunction : () => E.A +>overloadingFunction : () => E >second : any return second.E.B diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.types.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.types.diff index 3571e9d312..726cd51c5b 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.types.diff +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.types.diff @@ -1,31 +1,13 @@ --- old.enumAssignmentCompat7.types +++ new.enumAssignmentCompat7.types -@@= skipped -4, +4 lines =@@ - >first : typeof first - - export enum E { A = 1 } -->E : E -+>E : E.A - >A : E.A - >1 : 1 - } -@@= skipped -9, +9 lines =@@ - >second : typeof second - - export enum E { A = 2 } -->E : E -+>E : E.A - >A : E.A - >2 : 2 - } -@@= skipped -9, +9 lines =@@ +@@= skipped -22, +22 lines =@@ >Base : Base method(param: first.E) { ->method : (param: first.E) => void ->param : first.E -+>method : (param: E.A) => void -+>param : E.A ++>method : (param: E) => void ++>param : E >first : any } @@ -35,20 +17,20 @@ override method(param: second.E) { ->method : (param: second.E) => void ->param : second.E -+>method : (param: E.A) => void -+>param : E.A ++>method : (param: E) => void ++>param : E >second : any } } function overloadingFunction(): first.E ->overloadingFunction : () => first.E -+>overloadingFunction : () => E.A ++>overloadingFunction : () => E >first : any function overloadingFunction(): second.E { ->overloadingFunction : () => first.E -+>overloadingFunction : () => E.A ++>overloadingFunction : () => E >second : any return second.E.B diff --git a/testdata/baselines/reference/submodule/compiler/enumConflictsWithGlobalIdentifier.types b/testdata/baselines/reference/submodule/compiler/enumConflictsWithGlobalIdentifier.types index 2f67fafcbf..77cf11dc90 100644 --- a/testdata/baselines/reference/submodule/compiler/enumConflictsWithGlobalIdentifier.types +++ b/testdata/baselines/reference/submodule/compiler/enumConflictsWithGlobalIdentifier.types @@ -2,7 +2,7 @@ === enumConflictsWithGlobalIdentifier.ts === enum Position { ->Position : Position.IgnoreRulesSpecific +>Position : Position IgnoreRulesSpecific = 0, >IgnoreRulesSpecific : Position.IgnoreRulesSpecific @@ -15,8 +15,8 @@ var x = IgnoreRulesSpecific. var y = Position.IgnoreRulesSpecific; > : any ->y : Position.IgnoreRulesSpecific ->Position.IgnoreRulesSpecific : Position.IgnoreRulesSpecific +>y : Position +>Position.IgnoreRulesSpecific : Position >Position : typeof Position ->IgnoreRulesSpecific : Position.IgnoreRulesSpecific +>IgnoreRulesSpecific : Position diff --git a/testdata/baselines/reference/submodule/compiler/enumConflictsWithGlobalIdentifier.types.diff b/testdata/baselines/reference/submodule/compiler/enumConflictsWithGlobalIdentifier.types.diff deleted file mode 100644 index 7f1eb50cf8..0000000000 --- a/testdata/baselines/reference/submodule/compiler/enumConflictsWithGlobalIdentifier.types.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.enumConflictsWithGlobalIdentifier.types -+++ new.enumConflictsWithGlobalIdentifier.types -@@= skipped -1, +1 lines =@@ - - === enumConflictsWithGlobalIdentifier.ts === - enum Position { -->Position : Position -+>Position : Position.IgnoreRulesSpecific - - IgnoreRulesSpecific = 0, - >IgnoreRulesSpecific : Position.IgnoreRulesSpecific -@@= skipped -13, +13 lines =@@ - - var y = Position.IgnoreRulesSpecific; - > : any -->y : Position -->Position.IgnoreRulesSpecific : Position -+>y : Position.IgnoreRulesSpecific -+>Position.IgnoreRulesSpecific : Position.IgnoreRulesSpecific - >Position : typeof Position -->IgnoreRulesSpecific : Position -+>IgnoreRulesSpecific : Position.IgnoreRulesSpecific - diff --git a/testdata/baselines/reference/submodule/compiler/enumFromExternalModule.types b/testdata/baselines/reference/submodule/compiler/enumFromExternalModule.types index 33226a5a39..0cb447b48e 100644 --- a/testdata/baselines/reference/submodule/compiler/enumFromExternalModule.types +++ b/testdata/baselines/reference/submodule/compiler/enumFromExternalModule.types @@ -6,15 +6,15 @@ import f = require('./enumFromExternalModule_0'); >f : typeof import("enumFromExternalModule_0") var x = f.Mode.Open; ->x : Mode.Open ->f.Mode.Open : Mode.Open +>x : Mode +>f.Mode.Open : Mode >f.Mode : typeof Mode >f : typeof import("enumFromExternalModule_0") >Mode : typeof Mode ->Open : Mode.Open +>Open : Mode === enumFromExternalModule_0.ts === export enum Mode { Open } ->Mode : Mode.Open +>Mode : Mode >Open : Mode.Open diff --git a/testdata/baselines/reference/submodule/compiler/enumFromExternalModule.types.diff b/testdata/baselines/reference/submodule/compiler/enumFromExternalModule.types.diff index b9f7fd8566..79be357968 100644 --- a/testdata/baselines/reference/submodule/compiler/enumFromExternalModule.types.diff +++ b/testdata/baselines/reference/submodule/compiler/enumFromExternalModule.types.diff @@ -14,16 +14,12 @@ ->f : typeof f ->Mode : typeof f.Mode ->Open : f.Mode -+>x : Mode.Open -+>f.Mode.Open : Mode.Open ++>x : Mode ++>f.Mode.Open : Mode +>f.Mode : typeof Mode +>f : typeof import("enumFromExternalModule_0") +>Mode : typeof Mode -+>Open : Mode.Open ++>Open : Mode === enumFromExternalModule_0.ts === export enum Mode { Open } -->Mode : Mode -+>Mode : Mode.Open - >Open : Mode.Open - diff --git a/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.types b/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.types index 87da8a774a..e7e7ca1a19 100644 --- a/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.types +++ b/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.types @@ -8,6 +8,6 @@ class X { } >C : C enum X { MyVal } ->X : X.MyVal +>X : X >MyVal : X.MyVal diff --git a/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.types.diff b/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.types.diff index e3d1f0da92..07f45f06de 100644 --- a/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.types.diff +++ b/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.types.diff @@ -9,7 +9,4 @@ +>C : C enum X { MyVal } -->X : X -+>X : X.MyVal - >MyVal : X.MyVal - + >X : X diff --git a/testdata/baselines/reference/submodule/compiler/enumMemberResolution.types b/testdata/baselines/reference/submodule/compiler/enumMemberResolution.types index de7c1e6b67..f7917566bd 100644 --- a/testdata/baselines/reference/submodule/compiler/enumMemberResolution.types +++ b/testdata/baselines/reference/submodule/compiler/enumMemberResolution.types @@ -2,7 +2,7 @@ === enumMemberResolution.ts === enum Position2 { ->Position2 : Position2.IgnoreRulesSpecific +>Position2 : Position2 IgnoreRulesSpecific = 0 >IgnoreRulesSpecific : Position2.IgnoreRulesSpecific @@ -19,8 +19,8 @@ var y = 1; >1 : 1 var z = Position2.IgnoreRulesSpecific; // no error ->z : Position2.IgnoreRulesSpecific ->Position2.IgnoreRulesSpecific : Position2.IgnoreRulesSpecific +>z : Position2 +>Position2.IgnoreRulesSpecific : Position2 >Position2 : typeof Position2 ->IgnoreRulesSpecific : Position2.IgnoreRulesSpecific +>IgnoreRulesSpecific : Position2 diff --git a/testdata/baselines/reference/submodule/compiler/enumMemberResolution.types.diff b/testdata/baselines/reference/submodule/compiler/enumMemberResolution.types.diff deleted file mode 100644 index fab83b1cbd..0000000000 --- a/testdata/baselines/reference/submodule/compiler/enumMemberResolution.types.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.enumMemberResolution.types -+++ new.enumMemberResolution.types -@@= skipped -1, +1 lines =@@ - - === enumMemberResolution.ts === - enum Position2 { -->Position2 : Position2 -+>Position2 : Position2.IgnoreRulesSpecific - - IgnoreRulesSpecific = 0 - >IgnoreRulesSpecific : Position2.IgnoreRulesSpecific -@@= skipped -17, +17 lines =@@ - >1 : 1 - - var z = Position2.IgnoreRulesSpecific; // no error -->z : Position2 -->Position2.IgnoreRulesSpecific : Position2 -+>z : Position2.IgnoreRulesSpecific -+>Position2.IgnoreRulesSpecific : Position2.IgnoreRulesSpecific - >Position2 : typeof Position2 -->IgnoreRulesSpecific : Position2 -+>IgnoreRulesSpecific : Position2.IgnoreRulesSpecific - diff --git a/testdata/baselines/reference/submodule/compiler/enumOperations.types b/testdata/baselines/reference/submodule/compiler/enumOperations.types index eb3830af93..1d345d293c 100644 --- a/testdata/baselines/reference/submodule/compiler/enumOperations.types +++ b/testdata/baselines/reference/submodule/compiler/enumOperations.types @@ -2,15 +2,15 @@ === enumOperations.ts === enum Enum { None = 0 } ->Enum : Enum.None +>Enum : Enum >None : Enum.None >0 : 0 var enumType: Enum = Enum.None; ->enumType : Enum.None ->Enum.None : Enum.None +>enumType : Enum +>Enum.None : Enum >Enum : typeof Enum ->None : Enum.None +>None : Enum var numberType: number = 0; >numberType : number @@ -22,7 +22,7 @@ var anyType: any = 0; enumType ^ numberType; >enumType ^ numberType : number ->enumType : Enum.None +>enumType : Enum >numberType : number numberType ^ anyType; @@ -32,17 +32,17 @@ numberType ^ anyType; enumType & anyType; >enumType & anyType : number ->enumType : Enum.None +>enumType : Enum >anyType : any enumType | anyType; >enumType | anyType : number ->enumType : Enum.None +>enumType : Enum >anyType : any enumType ^ anyType; >enumType ^ anyType : number ->enumType : Enum.None +>enumType : Enum >anyType : any ~anyType; @@ -51,16 +51,16 @@ enumType ^ anyType; enumType <enumType <enumType : Enum.None +>enumType : Enum >anyType : any enumType >>anyType; >enumType >>anyType : number ->enumType : Enum.None +>enumType : Enum >anyType : any enumType >>>anyType; >enumType >>>anyType : number ->enumType : Enum.None +>enumType : Enum >anyType : any diff --git a/testdata/baselines/reference/submodule/compiler/enumOperations.types.diff b/testdata/baselines/reference/submodule/compiler/enumOperations.types.diff deleted file mode 100644 index 8472ee91ca..0000000000 --- a/testdata/baselines/reference/submodule/compiler/enumOperations.types.diff +++ /dev/null @@ -1,72 +0,0 @@ ---- old.enumOperations.types -+++ new.enumOperations.types -@@= skipped -1, +1 lines =@@ - - === enumOperations.ts === - enum Enum { None = 0 } -->Enum : Enum -+>Enum : Enum.None - >None : Enum.None - >0 : 0 - - var enumType: Enum = Enum.None; -->enumType : Enum -->Enum.None : Enum -+>enumType : Enum.None -+>Enum.None : Enum.None - >Enum : typeof Enum -->None : Enum -+>None : Enum.None - - var numberType: number = 0; - >numberType : number -@@= skipped -20, +20 lines =@@ - - enumType ^ numberType; - >enumType ^ numberType : number -->enumType : Enum -+>enumType : Enum.None - >numberType : number - - numberType ^ anyType; -@@= skipped -10, +10 lines =@@ - - enumType & anyType; - >enumType & anyType : number -->enumType : Enum -+>enumType : Enum.None - >anyType : any - - enumType | anyType; - >enumType | anyType : number -->enumType : Enum -+>enumType : Enum.None - >anyType : any - - enumType ^ anyType; - >enumType ^ anyType : number -->enumType : Enum -+>enumType : Enum.None - >anyType : any - - ~anyType; -@@= skipped -19, +19 lines =@@ - - enumType <enumType <enumType : Enum -+>enumType : Enum.None - >anyType : any - - enumType >>anyType; - >enumType >>anyType : number -->enumType : Enum -+>enumType : Enum.None - >anyType : any - - enumType >>>anyType; - >enumType >>>anyType : number -->enumType : Enum -+>enumType : Enum.None - >anyType : any - diff --git a/testdata/baselines/reference/submodule/compiler/enumWithExport.types b/testdata/baselines/reference/submodule/compiler/enumWithExport.types index 315094c0ec..9a01a81245 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithExport.types +++ b/testdata/baselines/reference/submodule/compiler/enumWithExport.types @@ -9,7 +9,7 @@ namespace x { >123 : 123 } enum x { ->x : x.z +>x : x z = y >z : x.z diff --git a/testdata/baselines/reference/submodule/compiler/enumWithExport.types.diff b/testdata/baselines/reference/submodule/compiler/enumWithExport.types.diff deleted file mode 100644 index 6697d2a158..0000000000 --- a/testdata/baselines/reference/submodule/compiler/enumWithExport.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.enumWithExport.types -+++ new.enumWithExport.types -@@= skipped -8, +8 lines =@@ - >123 : 123 - } - enum x { -->x : x -+>x : x.z - - z = y - >z : x.z diff --git a/testdata/baselines/reference/submodule/compiler/enumWithInfinityProperty.types b/testdata/baselines/reference/submodule/compiler/enumWithInfinityProperty.types index 8d7e719de2..61f3292aa5 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithInfinityProperty.types +++ b/testdata/baselines/reference/submodule/compiler/enumWithInfinityProperty.types @@ -2,7 +2,7 @@ === enumWithInfinityProperty.ts === enum A { ->A : A.Infinity +>A : A Infinity = 1 >Infinity : A.Infinity diff --git a/testdata/baselines/reference/submodule/compiler/enumWithInfinityProperty.types.diff b/testdata/baselines/reference/submodule/compiler/enumWithInfinityProperty.types.diff deleted file mode 100644 index 507a5cb932..0000000000 --- a/testdata/baselines/reference/submodule/compiler/enumWithInfinityProperty.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.enumWithInfinityProperty.types -+++ new.enumWithInfinityProperty.types -@@= skipped -1, +1 lines =@@ - - === enumWithInfinityProperty.ts === - enum A { -->A : A -+>A : A.Infinity - - Infinity = 1 - >Infinity : A.Infinity diff --git a/testdata/baselines/reference/submodule/compiler/enumWithNaNProperty.types b/testdata/baselines/reference/submodule/compiler/enumWithNaNProperty.types index 968d4b7569..819cb02f7f 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithNaNProperty.types +++ b/testdata/baselines/reference/submodule/compiler/enumWithNaNProperty.types @@ -2,7 +2,7 @@ === enumWithNaNProperty.ts === enum A { ->A : A.NaN +>A : A NaN = 1 >NaN : A.NaN diff --git a/testdata/baselines/reference/submodule/compiler/enumWithNaNProperty.types.diff b/testdata/baselines/reference/submodule/compiler/enumWithNaNProperty.types.diff deleted file mode 100644 index 401beecd4f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/enumWithNaNProperty.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.enumWithNaNProperty.types -+++ new.enumWithNaNProperty.types -@@= skipped -1, +1 lines =@@ - - === enumWithNaNProperty.ts === - enum A { -->A : A -+>A : A.NaN - - NaN = 1 - >NaN : A.NaN diff --git a/testdata/baselines/reference/submodule/compiler/enumWithNegativeInfinityProperty.types b/testdata/baselines/reference/submodule/compiler/enumWithNegativeInfinityProperty.types index 772dd2ed03..899fd28638 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithNegativeInfinityProperty.types +++ b/testdata/baselines/reference/submodule/compiler/enumWithNegativeInfinityProperty.types @@ -2,7 +2,7 @@ === enumWithNegativeInfinityProperty.ts === enum A { ->A : A."-Infinity" +>A : A "-Infinity" = 1 >"-Infinity" : A."-Infinity" diff --git a/testdata/baselines/reference/submodule/compiler/enumWithNegativeInfinityProperty.types.diff b/testdata/baselines/reference/submodule/compiler/enumWithNegativeInfinityProperty.types.diff index e323b90090..4c3c46a50b 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithNegativeInfinityProperty.types.diff +++ b/testdata/baselines/reference/submodule/compiler/enumWithNegativeInfinityProperty.types.diff @@ -1,11 +1,7 @@ --- old.enumWithNegativeInfinityProperty.types +++ new.enumWithNegativeInfinityProperty.types -@@= skipped -1, +1 lines =@@ - - === enumWithNegativeInfinityProperty.ts === - enum A { -->A : A -+>A : A."-Infinity" +@@= skipped -4, +4 lines =@@ + >A : A "-Infinity" = 1 ->"-Infinity" : (typeof A)["-Infinity"] diff --git a/testdata/baselines/reference/submodule/compiler/enumWithParenthesizedInitializer1.types b/testdata/baselines/reference/submodule/compiler/enumWithParenthesizedInitializer1.types index cc69b2885d..b64738c4b4 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithParenthesizedInitializer1.types +++ b/testdata/baselines/reference/submodule/compiler/enumWithParenthesizedInitializer1.types @@ -2,7 +2,7 @@ === enumWithParenthesizedInitializer1.ts === enum E { ->E : E.e +>E : E e = -(3 >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/enumWithParenthesizedInitializer1.types.diff b/testdata/baselines/reference/submodule/compiler/enumWithParenthesizedInitializer1.types.diff deleted file mode 100644 index d8691bc98f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/enumWithParenthesizedInitializer1.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.enumWithParenthesizedInitializer1.types -+++ new.enumWithParenthesizedInitializer1.types -@@= skipped -1, +1 lines =@@ - - === enumWithParenthesizedInitializer1.ts === - enum E { -->E : E -+>E : E.e - - e = -(3 - >e : E.e diff --git a/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName1.types b/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName1.types index f1814326ac..43f47cb8dd 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName1.types +++ b/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName1.types @@ -2,7 +2,7 @@ === enumWithQuotedElementName1.ts === enum E { ->E : E.'fo"o' +>E : E 'fo"o', >'fo"o' : E.'fo"o' diff --git a/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName1.types.diff b/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName1.types.diff index 7a24a16d52..02c1416cb7 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName1.types.diff +++ b/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName1.types.diff @@ -1,11 +1,7 @@ --- old.enumWithQuotedElementName1.types +++ new.enumWithQuotedElementName1.types -@@= skipped -1, +1 lines =@@ - - === enumWithQuotedElementName1.ts === - enum E { -->E : E -+>E : E.'fo"o' +@@= skipped -4, +4 lines =@@ + >E : E 'fo"o', ->'fo"o' : (typeof E)["fo\"o"] diff --git a/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName2.types b/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName2.types index 40cb901745..899a60b998 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName2.types +++ b/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName2.types @@ -2,7 +2,7 @@ === enumWithQuotedElementName2.ts === enum E { ->E : E."fo'o" +>E : E "fo'o", >"fo'o" : E."fo'o" diff --git a/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName2.types.diff b/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName2.types.diff index 812749c45d..8400d74268 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/enumWithQuotedElementName2.types.diff @@ -1,11 +1,7 @@ --- old.enumWithQuotedElementName2.types +++ new.enumWithQuotedElementName2.types -@@= skipped -1, +1 lines =@@ - - === enumWithQuotedElementName2.ts === - enum E { -->E : E -+>E : E."fo'o" +@@= skipped -4, +4 lines =@@ + >E : E "fo'o", ->"fo'o" : (typeof E)["fo'o"] diff --git a/testdata/baselines/reference/submodule/compiler/enumWithUnicodeEscape1.types b/testdata/baselines/reference/submodule/compiler/enumWithUnicodeEscape1.types index 882704270c..32c7939af2 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithUnicodeEscape1.types +++ b/testdata/baselines/reference/submodule/compiler/enumWithUnicodeEscape1.types @@ -2,7 +2,7 @@ === enumWithUnicodeEscape1.ts === enum E { ->E : E.'gold \u2730' +>E : E 'gold \u2730' >'gold \u2730' : E.'gold \u2730' diff --git a/testdata/baselines/reference/submodule/compiler/enumWithUnicodeEscape1.types.diff b/testdata/baselines/reference/submodule/compiler/enumWithUnicodeEscape1.types.diff index ee6d57c60f..bff94c2247 100644 --- a/testdata/baselines/reference/submodule/compiler/enumWithUnicodeEscape1.types.diff +++ b/testdata/baselines/reference/submodule/compiler/enumWithUnicodeEscape1.types.diff @@ -1,11 +1,7 @@ --- old.enumWithUnicodeEscape1.types +++ new.enumWithUnicodeEscape1.types -@@= skipped -1, +1 lines =@@ - - === enumWithUnicodeEscape1.ts === - enum E { -->E : E -+>E : E.'gold \u2730' +@@= skipped -4, +4 lines =@@ + >E : E 'gold \u2730' ->'gold \u2730' : (typeof E)["gold \u2730"] diff --git a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations1.types b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations1.types index 3ea1ec0fd8..2998261838 100644 --- a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations1.types +++ b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations1.types @@ -2,21 +2,21 @@ === enumsWithMultipleDeclarations1.ts === enum E { ->E : E.A +>E : E A >A : E.A } enum E { ->E : E.A +>E : E B >B : E.A } enum E { ->E : E.A +>E : E C >C : E.A diff --git a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations1.types.diff b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations1.types.diff deleted file mode 100644 index 49934ff638..0000000000 --- a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations1.types.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- old.enumsWithMultipleDeclarations1.types -+++ new.enumsWithMultipleDeclarations1.types -@@= skipped -1, +1 lines =@@ - - === enumsWithMultipleDeclarations1.ts === - enum E { -->E : E -+>E : E.A - - A - >A : E.A - } - - enum E { -->E : E -+>E : E.A - - B - >B : E.A - } - - enum E { -->E : E -+>E : E.A - - C - >C : E.A diff --git a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types index 4e9d1b7d28..cc597efab4 100644 --- a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types +++ b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types @@ -6,7 +6,7 @@ module E { } enum E { ->E : E.A +>E : E A >A : E.A diff --git a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types.diff b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types.diff index 93aa7903a6..74fca5d734 100644 --- a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types.diff +++ b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types.diff @@ -8,8 +8,3 @@ } enum E { -->E : E -+>E : E.A - - A - >A : E.A diff --git a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.types b/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.types index 369ddba466..ad94375f83 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.types +++ b/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.types @@ -77,25 +77,25 @@ module MsPortalFx.ViewModels { * For some reason javascript code is emitted for this re-exported const enum. */ export import ReExportedEnum = Dialogs.DialogResult; ->ReExportedEnum : any ->Dialogs : any ->DialogResult : any +>ReExportedEnum : typeof DialogResult +>Dialogs : typeof Dialogs +>DialogResult : DialogResult /** * Not exported to show difference. No javascript is emmitted (as expected) */ import DialogButtons = Dialogs.MessageBoxButtons; ->DialogButtons : any ->Dialogs : any ->MessageBoxButtons : any +>DialogButtons : typeof MessageBoxButtons +>Dialogs : typeof Dialogs +>MessageBoxButtons : MessageBoxButtons /** * Re-exporting a function type to show difference. No javascript is emmitted (as expected) */ export import Callback = Dialogs.DialogResultCallback; >Callback : any ->Dialogs : any ->DialogResultCallback : any +>Dialogs : typeof Dialogs +>DialogResultCallback : DialogResultCallback export class SomeUsagesOfTheseConsts { >SomeUsagesOfTheseConsts : SomeUsagesOfTheseConsts @@ -103,30 +103,30 @@ module MsPortalFx.ViewModels { constructor() { // these do get replaced by the const value const value1 = ReExportedEnum.Cancel; ->value1 : any ->ReExportedEnum.Cancel : any ->ReExportedEnum : any ->Cancel : any +>value1 : DialogResult.Cancel +>ReExportedEnum.Cancel : DialogResult.Cancel +>ReExportedEnum : typeof DialogResult +>Cancel : DialogResult.Cancel console.log(value1); >console.log(value1) : void >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->value1 : any +>value1 : DialogResult.Cancel const value2 = DialogButtons.OKCancel; ->value2 : any ->DialogButtons.OKCancel : any ->DialogButtons : any ->OKCancel : any +>value2 : MessageBoxButtons.OKCancel +>DialogButtons.OKCancel : MessageBoxButtons.OKCancel +>DialogButtons : typeof MessageBoxButtons +>OKCancel : MessageBoxButtons.OKCancel console.log(value2); >console.log(value2) : void >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->value2 : any +>value2 : MessageBoxButtons.OKCancel } } } diff --git a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.types.diff b/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.types.diff index 86186caf69..3880083efa 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.types.diff +++ b/testdata/baselines/reference/submodule/compiler/exportImportCanSubstituteConstEnumForValue.types.diff @@ -14,36 +14,33 @@ */ export import ReExportedEnum = Dialogs.DialogResult; ->ReExportedEnum : typeof ReExportedEnum -->Dialogs : typeof Dialogs ++>ReExportedEnum : typeof DialogResult + >Dialogs : typeof Dialogs ->DialogResult : ReExportedEnum -+>ReExportedEnum : any -+>Dialogs : any -+>DialogResult : any ++>DialogResult : DialogResult /** * Not exported to show difference. No javascript is emmitted (as expected) */ import DialogButtons = Dialogs.MessageBoxButtons; ->DialogButtons : typeof DialogButtons -->Dialogs : typeof Dialogs ++>DialogButtons : typeof MessageBoxButtons + >Dialogs : typeof Dialogs ->MessageBoxButtons : DialogButtons -+>DialogButtons : any -+>Dialogs : any -+>MessageBoxButtons : any ++>MessageBoxButtons : MessageBoxButtons /** * Re-exporting a function type to show difference. No javascript is emmitted (as expected) - */ +@@= skipped -18, +18 lines =@@ export import Callback = Dialogs.DialogResultCallback; >Callback : any -->Dialogs : typeof Dialogs + >Dialogs : typeof Dialogs ->DialogResultCallback : Callback -+>Dialogs : any -+>DialogResultCallback : any ++>DialogResultCallback : DialogResultCallback export class SomeUsagesOfTheseConsts { >SomeUsagesOfTheseConsts : SomeUsagesOfTheseConsts -@@= skipped -26, +26 lines =@@ +@@= skipped -8, +8 lines =@@ constructor() { // these do get replaced by the const value const value1 = ReExportedEnum.Cancel; @@ -51,10 +48,10 @@ ->ReExportedEnum.Cancel : ReExportedEnum.Cancel ->ReExportedEnum : typeof ReExportedEnum ->Cancel : ReExportedEnum.Cancel -+>value1 : any -+>ReExportedEnum.Cancel : any -+>ReExportedEnum : any -+>Cancel : any ++>value1 : DialogResult.Cancel ++>ReExportedEnum.Cancel : DialogResult.Cancel ++>ReExportedEnum : typeof DialogResult ++>Cancel : DialogResult.Cancel console.log(value1); >console.log(value1) : void @@ -62,17 +59,17 @@ >console : Console >log : (...data: any[]) => void ->value1 : ReExportedEnum.Cancel -+>value1 : any ++>value1 : DialogResult.Cancel const value2 = DialogButtons.OKCancel; ->value2 : DialogButtons.OKCancel ->DialogButtons.OKCancel : DialogButtons.OKCancel ->DialogButtons : typeof DialogButtons ->OKCancel : DialogButtons.OKCancel -+>value2 : any -+>DialogButtons.OKCancel : any -+>DialogButtons : any -+>OKCancel : any ++>value2 : MessageBoxButtons.OKCancel ++>DialogButtons.OKCancel : MessageBoxButtons.OKCancel ++>DialogButtons : typeof MessageBoxButtons ++>OKCancel : MessageBoxButtons.OKCancel console.log(value2); >console.log(value2) : void @@ -80,7 +77,7 @@ >console : Console >log : (...data: any[]) => void ->value2 : DialogButtons.OKCancel -+>value2 : any ++>value2 : MessageBoxButtons.OKCancel } } } diff --git a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types index ca5863c84d..76f03599da 100644 --- a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types +++ b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types @@ -27,9 +27,9 @@ module foo.Baz { >g : () => void Bar.f(); ->Bar.f() : any ->Bar.f : any ->Bar : any ->f : any +>Bar.f() : void +>Bar.f : () => void +>Bar : typeof Bar +>f : () => void } } diff --git a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types.diff b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types.diff deleted file mode 100644 index 125e06d5ed..0000000000 --- a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.functionMergedWithModule.types -+++ new.functionMergedWithModule.types -@@= skipped -26, +26 lines =@@ - >g : () => void - - Bar.f(); -->Bar.f() : void -->Bar.f : () => void -->Bar : typeof Bar -->f : () => void -+>Bar.f() : any -+>Bar.f : any -+>Bar : any -+>f : any - } - } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types index 9b29a7f7bd..8f27f17b7e 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types +++ b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types @@ -155,20 +155,20 @@ module PortalFx.ViewModels.Controls.Validators { export class Validator extends Portal.Controls.Validators.Validator { >Validator : Validator >TValue : TValue ->Portal.Controls.Validators.Validator : any ->Portal.Controls.Validators : any ->Portal.Controls : any +>Portal.Controls.Validators.Validator : Validator +>Portal.Controls.Validators : typeof Validators +>Portal.Controls : typeof Controls >Portal : typeof Portal ->Controls : any ->Validators : any ->Validator : any +>Controls : typeof Controls +>Validators : typeof Validators +>Validator : typeof Validator constructor(message?: string) { >message : string super(message); >super(message) : void ->super : any +>super : typeof Validator >message : string } } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types.diff b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types.diff index f68e3d6088..732822dd59 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types.diff +++ b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types.diff @@ -60,16 +60,16 @@ ->Portal.Controls.Validators : typeof Portal.Controls.Validators ->Portal.Controls : typeof Portal.Controls +>TValue : TValue -+>Portal.Controls.Validators.Validator : any -+>Portal.Controls.Validators : any -+>Portal.Controls : any ++>Portal.Controls.Validators.Validator : Validator ++>Portal.Controls.Validators : typeof Validators ++>Portal.Controls : typeof Controls >Portal : typeof Portal ->Controls : typeof Portal.Controls ->Validators : typeof Portal.Controls.Validators ->Validator : typeof Portal.Controls.Validators.Validator -+>Controls : any -+>Validators : any -+>Validator : any ++>Controls : typeof Controls ++>Validators : typeof Validators ++>Validator : typeof Validator constructor(message?: string) { >message : string @@ -77,7 +77,7 @@ super(message); >super(message) : void ->super : typeof Portal.Controls.Validators.Validator -+>super : any ++>super : typeof Validator >message : string } } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types index 77618e0b61..0fa3ef898b 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types @@ -50,14 +50,14 @@ module EndGate.Tweening { export class NumberTween extends Tween{ >NumberTween : NumberTween ->Tween : any +>Tween : Tween constructor(from: number) { >from : number super(from); >super(from) : void ->super : any +>super : typeof Tween >from : number } } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types.diff b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types.diff index 71d84a3c89..042e975814 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types.diff +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types.diff @@ -27,20 +27,3 @@ private _from: T; >_from : T -@@= skipped -27, +28 lines =@@ - - export class NumberTween extends Tween{ - >NumberTween : NumberTween -->Tween : Tween -+>Tween : any - - constructor(from: number) { - >from : number - - super(from); - >super(from) : void -->super : typeof Tween -+>super : any - >from : number - } - } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types index ba599570af..9c9fb4bfd5 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types @@ -49,14 +49,14 @@ module EndGate.Tweening { export class NumberTween extends Tween{ >NumberTween : NumberTween ->Tween : any +>Tween : Tween constructor(from: number) { >from : number super(from); >super(from) : void ->super : any +>super : typeof Tween >from : number } } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types.diff b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types.diff index 93b1e17afd..f5717f6de2 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types.diff @@ -27,20 +27,3 @@ private _from: T; >_from : T -@@= skipped -26, +27 lines =@@ - - export class NumberTween extends Tween{ - >NumberTween : NumberTween -->Tween : Tween -+>Tween : any - - constructor(from: number) { - >from : number - - super(from); - >super(from) : void -->super : typeof Tween -+>super : any - >from : number - } - } diff --git a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types index b25bf0cf8a..cfa14ee327 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types +++ b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types @@ -7,9 +7,9 @@ namespace SomeOther.Thing { >Thing : typeof Thing import Internal = My.Internal; ->Internal : any +>Internal : typeof Internal >My : typeof My ->Internal : any +>Internal : typeof Internal export class Foo { >Foo : Foo @@ -20,18 +20,18 @@ namespace SomeOther.Thing { constructor() { Internal.getThing(); ->Internal.getThing() : any ->Internal.getThing : any ->Internal : any ->getThing : any +>Internal.getThing() : void +>Internal.getThing : () => void +>Internal : typeof Internal +>getThing : () => void Internal.WhichThing.A ? "foo" : "bar"; >Internal.WhichThing.A ? "foo" : "bar" : "bar" | "foo" ->Internal.WhichThing.A : any ->Internal.WhichThing : any ->Internal : any ->WhichThing : any ->A : any +>Internal.WhichThing.A : WhichThing.A +>Internal.WhichThing : typeof WhichThing +>Internal : typeof Internal +>WhichThing : typeof WhichThing +>A : WhichThing.A >"foo" : "foo" >"bar" : "bar" } diff --git a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types.diff b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types.diff index f456fb23f6..ae373927c7 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types.diff +++ b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types.diff @@ -1,16 +1,6 @@ --- old.importAliasFromNamespace.types +++ new.importAliasFromNamespace.types -@@= skipped -6, +6 lines =@@ - >Thing : typeof Thing - - import Internal = My.Internal; -->Internal : typeof Internal -+>Internal : any - >My : typeof My -->Internal : typeof Internal -+>Internal : any - - export class Foo { +@@= skipped -14, +14 lines =@@ >Foo : Foo private _which: Internal.WhichThing; @@ -19,29 +9,21 @@ >Internal : any constructor() { - Internal.getThing(); -->Internal.getThing() : void -->Internal.getThing : () => void -->Internal : typeof Internal -->getThing : () => void -+>Internal.getThing() : any -+>Internal.getThing : any -+>Internal : any -+>getThing : any +@@= skipped -11, +11 lines =@@ + >getThing : () => void Internal.WhichThing.A ? "foo" : "bar"; ->Internal.WhichThing.A ? "foo" : "bar" : "foo" | "bar" ->Internal.WhichThing.A : Internal.WhichThing.A ->Internal.WhichThing : typeof Internal.WhichThing -->Internal : typeof Internal ++>Internal.WhichThing.A ? "foo" : "bar" : "bar" | "foo" ++>Internal.WhichThing.A : WhichThing.A ++>Internal.WhichThing : typeof WhichThing + >Internal : typeof Internal ->WhichThing : typeof Internal.WhichThing ->A : Internal.WhichThing.A -+>Internal.WhichThing.A ? "foo" : "bar" : "bar" | "foo" -+>Internal.WhichThing.A : any -+>Internal.WhichThing : any -+>Internal : any -+>WhichThing : any -+>A : any ++>WhichThing : typeof WhichThing ++>A : WhichThing.A >"foo" : "foo" >"bar" : "bar" } diff --git a/testdata/baselines/reference/submodule/compiler/importElisionEnum.types b/testdata/baselines/reference/submodule/compiler/importElisionEnum.types index 476bb20165..92bf833ff3 100644 --- a/testdata/baselines/reference/submodule/compiler/importElisionEnum.types +++ b/testdata/baselines/reference/submodule/compiler/importElisionEnum.types @@ -24,7 +24,7 @@ import { MyEnum as MyEnumFromModule } from "./enum"; >MyEnumFromModule : typeof MyEnum enum MyEnum { ->MyEnum : MyEnum.a +>MyEnum : MyEnum a = MyEnumFromModule.a >a : MyEnum.a diff --git a/testdata/baselines/reference/submodule/compiler/importElisionEnum.types.diff b/testdata/baselines/reference/submodule/compiler/importElisionEnum.types.diff index a5f47ea746..7972ecaa58 100644 --- a/testdata/baselines/reference/submodule/compiler/importElisionEnum.types.diff +++ b/testdata/baselines/reference/submodule/compiler/importElisionEnum.types.diff @@ -10,8 +10,7 @@ +>MyEnumFromModule : typeof MyEnum enum MyEnum { -->MyEnum : MyEnum -+>MyEnum : MyEnum.a + >MyEnum : MyEnum a = MyEnumFromModule.a >a : MyEnum.a diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types index b2059391a6..2733bb81fd 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types @@ -15,8 +15,8 @@ module a.e.f { >f : any import g = b.c; ->g : any ->b : any ->c : any +>g : typeof c +>b : typeof b +>c : typeof c } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types.diff b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types.diff index 8063ba50ed..a03e9a6e9d 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types.diff +++ b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types.diff @@ -10,10 +10,9 @@ + import g = b.c; ->g : typeof g -->b : typeof b ++>g : typeof c + >b : typeof b ->c : typeof g -+>g : any -+>b : any -+>c : any ++>c : typeof c } diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsEnums.types b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsEnums.types index 2ade3c46dc..0b9243277f 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsEnums.types +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsEnums.types @@ -50,7 +50,7 @@ enum F { enum Flag { ->Flag : Flag.A +>Flag : Flag A = 1 >> 1, >A : Flag.A @@ -73,24 +73,24 @@ enum Flag { AB = A | B, >AB : Flag.A >A | B : number ->A : Flag.A ->B : Flag.A +>A : Flag +>B : Flag ABC = Flag.AB | C, >ABC : Flag.A >Flag.AB | C : number ->Flag.AB : Flag.A +>Flag.AB : Flag >Flag : typeof Flag ->AB : Flag.A ->C : Flag.A +>AB : Flag +>C : Flag AC = Flag["A"] | C, >AC : Flag.A >Flag["A"] | C : number ->Flag["A"] : Flag.A +>Flag["A"] : Flag >Flag : typeof Flag >"A" : "A" ->C : Flag.A +>C : Flag } const EV = 1; @@ -113,15 +113,15 @@ enum ExtFlags { ABCD = Flag.ABC | D, >ABCD : ExtFlags.D >Flag.ABC | D : number ->Flag.ABC : Flag.A +>Flag.ABC : Flag >Flag : typeof Flag ->ABC : Flag.A +>ABC : Flag >D : ExtFlags.D AC = Flag["A"] | D, >AC : ExtFlags.D >Flag["A"] | D : number ->Flag["A"] : Flag.A +>Flag["A"] : Flag >Flag : typeof Flag >"A" : "A" >D : ExtFlags.D diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsEnums.types.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsEnums.types.diff deleted file mode 100644 index b01a53af79..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsEnums.types.diff +++ /dev/null @@ -1,62 +0,0 @@ ---- old.isolatedDeclarationErrorsEnums.types -+++ new.isolatedDeclarationErrorsEnums.types -@@= skipped -49, +49 lines =@@ - - - enum Flag { -->Flag : Flag -+>Flag : Flag.A - - A = 1 >> 1, - >A : Flag.A -@@= skipped -23, +23 lines =@@ - AB = A | B, - >AB : Flag.A - >A | B : number -->A : Flag -->B : Flag -+>A : Flag.A -+>B : Flag.A - - ABC = Flag.AB | C, - >ABC : Flag.A - >Flag.AB | C : number -->Flag.AB : Flag -+>Flag.AB : Flag.A - >Flag : typeof Flag -->AB : Flag -->C : Flag -+>AB : Flag.A -+>C : Flag.A - - AC = Flag["A"] | C, - >AC : Flag.A - >Flag["A"] | C : number -->Flag["A"] : Flag -+>Flag["A"] : Flag.A - >Flag : typeof Flag - >"A" : "A" -->C : Flag -+>C : Flag.A - } - - const EV = 1; -@@= skipped -40, +40 lines =@@ - ABCD = Flag.ABC | D, - >ABCD : ExtFlags.D - >Flag.ABC | D : number -->Flag.ABC : Flag -+>Flag.ABC : Flag.A - >Flag : typeof Flag -->ABC : Flag -+>ABC : Flag.A - >D : ExtFlags.D - - AC = Flag["A"] | D, - >AC : ExtFlags.D - >Flag["A"] | D : number -->Flag["A"] : Flag -+>Flag["A"] : Flag.A - >Flag : typeof Flag - >"A" : "A" - >D : ExtFlags.D diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types index 183686c48d..c7f0aaf0eb 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types @@ -166,7 +166,7 @@ const str: string = ""; >"" : "" enum E { ->E : E.V +>E : E V = 10, >V : E.V @@ -202,9 +202,9 @@ export const oWithComputedProperties = { [E.V]: 1, >[E.V] : number ->E.V : E.V +>E.V : E >E : typeof E ->V : E.V +>V : E >1 : 1 [str]: 0, diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types.diff index 67d851d14a..80e919029f 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types.diff +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types.diff @@ -36,15 +36,7 @@ >v : T >v : T -@@= skipped -13, +14 lines =@@ - >"" : "" - - enum E { -->E : E -+>E : E.V - - V = 10, - >V : E.V +@@= skipped -20, +21 lines =@@ >10 : 10 } export const oWithComputedProperties = { @@ -55,19 +47,7 @@ [1]: 1, >[1] : number -@@= skipped -36, +36 lines =@@ - - [E.V]: 1, - >[E.V] : number -->E.V : E -+>E.V : E.V - >E : typeof E -->V : E -+>V : E.V - >1 : 1 - - [str]: 0, -@@= skipped -18, +18 lines =@@ +@@= skipped -47, +47 lines =@@ >1 : 1 export const oWithSpread = { diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesAmbientConstEnum.types b/testdata/baselines/reference/submodule/compiler/isolatedModulesAmbientConstEnum.types index b8f6687ad8..2d50c601ab 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesAmbientConstEnum.types +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesAmbientConstEnum.types @@ -2,13 +2,13 @@ === file1.ts === declare const enum E { X = 1} ->E : E.X +>E : E >X : E.X >1 : 1 export var y = E.X; ->y : E.X ->E.X : E.X +>y : E +>E.X : E >E : typeof E ->X : E.X +>X : E diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesAmbientConstEnum.types.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesAmbientConstEnum.types.diff deleted file mode 100644 index ec4e5cfb87..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesAmbientConstEnum.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.isolatedModulesAmbientConstEnum.types -+++ new.isolatedModulesAmbientConstEnum.types -@@= skipped -1, +1 lines =@@ - - === file1.ts === - declare const enum E { X = 1} -->E : E -+>E : E.X - >X : E.X - >1 : 1 - - export var y = E.X; -->y : E -->E.X : E -+>y : E.X -+>E.X : E.X - >E : typeof E -->X : E -+>X : E.X - diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnum.types b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnum.types index 3444e4c4a2..7e29cd2e3d 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnum.types +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnum.types @@ -9,13 +9,13 @@ console.log(Foo.BAR); >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->Foo.BAR : Foo.BAR +>Foo.BAR : Foo >Foo : typeof Foo ->BAR : Foo.BAR +>BAR : Foo === file2.ts === export const enum Foo { ->Foo : Foo.BAR +>Foo : Foo BAR, >BAR : Foo.BAR diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnum.types.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnum.types.diff deleted file mode 100644 index 092d7a4800..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnum.types.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.isolatedModulesImportConstEnum.types -+++ new.isolatedModulesImportConstEnum.types -@@= skipped -8, +8 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->Foo.BAR : Foo -+>Foo.BAR : Foo.BAR - >Foo : typeof Foo -->BAR : Foo -+>BAR : Foo.BAR - - === file2.ts === - export const enum Foo { -->Foo : Foo -+>Foo : Foo.BAR - - BAR, - >BAR : Foo.BAR diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnumTypeOnly.types b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnumTypeOnly.types index 5a0567eaeb..10c7655acb 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnumTypeOnly.types +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnumTypeOnly.types @@ -2,7 +2,7 @@ === enum.ts === export const enum Foo { Bar } ->Foo : Foo.Bar +>Foo : Foo >Bar : Foo.Bar === index.ts === @@ -10,6 +10,6 @@ import { Foo } from "./enum"; >Foo : typeof Foo function f(foo: Foo) { return; } ->f : (foo: Foo.Bar) => void ->foo : Foo.Bar +>f : (foo: Foo) => void +>foo : Foo diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnumTypeOnly.types.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnumTypeOnly.types.diff deleted file mode 100644 index ad7a1a9b84..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportConstEnumTypeOnly.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.isolatedModulesImportConstEnumTypeOnly.types -+++ new.isolatedModulesImportConstEnumTypeOnly.types -@@= skipped -1, +1 lines =@@ - - === enum.ts === - export const enum Foo { Bar } -->Foo : Foo -+>Foo : Foo.Bar - >Bar : Foo.Bar - - === index.ts === -@@= skipped -8, +8 lines =@@ - >Foo : typeof Foo - - function f(foo: Foo) { return; } -->f : (foo: Foo) => void -->foo : Foo -+>f : (foo: Foo.Bar) => void -+>foo : Foo.Bar - diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesNonAmbientConstEnum.types b/testdata/baselines/reference/submodule/compiler/isolatedModulesNonAmbientConstEnum.types index 334f9247a6..2dad7a59de 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesNonAmbientConstEnum.types +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesNonAmbientConstEnum.types @@ -2,15 +2,15 @@ === file1.ts === const enum E { X = 100 }; ->E : E.X +>E : E >X : E.X >100 : 100 var e = E.X; ->e : E.X ->E.X : E.X +>e : E +>E.X : E >E : typeof E ->X : E.X +>X : E export var x; >x : any diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesNonAmbientConstEnum.types.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesNonAmbientConstEnum.types.diff deleted file mode 100644 index 65001db967..0000000000 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesNonAmbientConstEnum.types.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.isolatedModulesNonAmbientConstEnum.types -+++ new.isolatedModulesNonAmbientConstEnum.types -@@= skipped -1, +1 lines =@@ - - === file1.ts === - const enum E { X = 100 }; -->E : E -+>E : E.X - >X : E.X - >100 : 100 - - var e = E.X; -->e : E -->E.X : E -+>e : E.X -+>E.X : E.X - >E : typeof E -->X : E -+>X : E.X - - export var x; - >x : any diff --git a/testdata/baselines/reference/submodule/compiler/jsdocAccessEnumType.types b/testdata/baselines/reference/submodule/compiler/jsdocAccessEnumType.types index 32c004ff15..b2876f7741 100644 --- a/testdata/baselines/reference/submodule/compiler/jsdocAccessEnumType.types +++ b/testdata/baselines/reference/submodule/compiler/jsdocAccessEnumType.types @@ -2,7 +2,7 @@ === /a.ts === export enum E { A } ->E : E.A +>E : E >A : E.A === /b.js === @@ -12,7 +12,7 @@ import { E } from "./a"; /** @type {E} */ const e = E.A; >e : E.A ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E diff --git a/testdata/baselines/reference/submodule/compiler/jsdocAccessEnumType.types.diff b/testdata/baselines/reference/submodule/compiler/jsdocAccessEnumType.types.diff index 78923aa852..60058b346c 100644 --- a/testdata/baselines/reference/submodule/compiler/jsdocAccessEnumType.types.diff +++ b/testdata/baselines/reference/submodule/compiler/jsdocAccessEnumType.types.diff @@ -1,23 +1,11 @@ --- old.jsdocAccessEnumType.types +++ new.jsdocAccessEnumType.types -@@= skipped -1, +1 lines =@@ - - === /a.ts === - export enum E { A } -->E : E -+>E : E.A - >A : E.A - - === /b.js === -@@= skipped -9, +9 lines =@@ +@@= skipped -10, +10 lines =@@ /** @type {E} */ const e = E.A; ->e : E -->E.A : E +>e : E.A -+>E.A : E.A + >E.A : E >E : typeof E -->A : E -+>A : E.A - + >A : E diff --git a/testdata/baselines/reference/submodule/compiler/mergeWithImportedType.types b/testdata/baselines/reference/submodule/compiler/mergeWithImportedType.types index 8c8c5f67d4..ab1a65f268 100644 --- a/testdata/baselines/reference/submodule/compiler/mergeWithImportedType.types +++ b/testdata/baselines/reference/submodule/compiler/mergeWithImportedType.types @@ -2,7 +2,7 @@ === f1.ts === export enum E {X} ->E : E.X +>E : E >X : E.X === f2.ts === @@ -10,5 +10,5 @@ import {E} from "./f1"; >E : typeof E export type E = E; ->E : E.X +>E : E diff --git a/testdata/baselines/reference/submodule/compiler/mergeWithImportedType.types.diff b/testdata/baselines/reference/submodule/compiler/mergeWithImportedType.types.diff deleted file mode 100644 index d60f7aee39..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergeWithImportedType.types.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.mergeWithImportedType.types -+++ new.mergeWithImportedType.types -@@= skipped -1, +1 lines =@@ - - === f1.ts === - export enum E {X} -->E : E -+>E : E.X - >X : E.X - - === f2.ts === -@@= skipped -8, +8 lines =@@ - >E : typeof E - - export type E = E; -->E : E -+>E : E.X - diff --git a/testdata/baselines/reference/submodule/compiler/mergedDeclarations2.types b/testdata/baselines/reference/submodule/compiler/mergedDeclarations2.types index 6efbf8c331..636f053510 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedDeclarations2.types +++ b/testdata/baselines/reference/submodule/compiler/mergedDeclarations2.types @@ -2,17 +2,17 @@ === mergedDeclarations2.ts === enum Foo { ->Foo : Foo.b +>Foo : Foo b >b : Foo.b } enum Foo { ->Foo : Foo.b +>Foo : Foo a = b >a : Foo.b ->b : Foo.b +>b : Foo } module Foo { diff --git a/testdata/baselines/reference/submodule/compiler/mergedDeclarations2.types.diff b/testdata/baselines/reference/submodule/compiler/mergedDeclarations2.types.diff deleted file mode 100644 index 14df3bdd9a..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedDeclarations2.types.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.mergedDeclarations2.types -+++ new.mergedDeclarations2.types -@@= skipped -1, +1 lines =@@ - - === mergedDeclarations2.ts === - enum Foo { -->Foo : Foo -+>Foo : Foo.b - - b - >b : Foo.b - } - enum Foo { -->Foo : Foo -+>Foo : Foo.b - - a = b - >a : Foo.b -->b : Foo -+>b : Foo.b - } - - module Foo { diff --git a/testdata/baselines/reference/submodule/compiler/mergedEnumDeclarationCodeGen.types b/testdata/baselines/reference/submodule/compiler/mergedEnumDeclarationCodeGen.types index ad418d8aeb..00210f6045 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedEnumDeclarationCodeGen.types +++ b/testdata/baselines/reference/submodule/compiler/mergedEnumDeclarationCodeGen.types @@ -2,19 +2,19 @@ === mergedEnumDeclarationCodeGen.ts === enum E { ->E : E.a +>E : E a, >a : E.a b = a >b : E.a ->a : E.a +>a : E } enum E { ->E : E.a +>E : E c = a >c : E.a ->a : E.a +>a : E } diff --git a/testdata/baselines/reference/submodule/compiler/mergedEnumDeclarationCodeGen.types.diff b/testdata/baselines/reference/submodule/compiler/mergedEnumDeclarationCodeGen.types.diff deleted file mode 100644 index 496309746c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedEnumDeclarationCodeGen.types.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- old.mergedEnumDeclarationCodeGen.types -+++ new.mergedEnumDeclarationCodeGen.types -@@= skipped -1, +1 lines =@@ - - === mergedEnumDeclarationCodeGen.ts === - enum E { -->E : E -+>E : E.a - - a, - >a : E.a - - b = a - >b : E.a -->a : E -+>a : E.a - } - enum E { -->E : E -+>E : E.a - - c = a - >c : E.a -->a : E -+>a : E.a - } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.types b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.types index 4af4e61f55..c5e63bc819 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.types +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.types @@ -18,9 +18,9 @@ module my.data { >my : any foo.buz(); ->foo.buz() : any ->foo.buz : any ->foo : any ->buz : any +>foo.buz() : void +>foo.buz : () => void +>foo : typeof foo +>buz : () => void } } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.types.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.types.diff index 2f5005377d..827d7f3474 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen2.types.diff @@ -9,16 +9,3 @@ function data(my) { >data : (my: any) => void - >my : any - - foo.buz(); -->foo.buz() : void -->foo.buz : () => void -->foo : typeof foo -->buz : () => void -+>foo.buz() : any -+>foo.buz : any -+>foo : any -+>buz : any - } - } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.types b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.types index 67b16abd01..0d02108982 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.types +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.types @@ -19,7 +19,7 @@ module my.data.foo { >foo : any buz(); ->buz() : any ->buz : any +>buz() : void +>buz : () => void } } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.types.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.types.diff deleted file mode 100644 index ba926c4634..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen3.types.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- old.mergedModuleDeclarationCodeGen3.types -+++ new.mergedModuleDeclarationCodeGen3.types -@@= skipped -18, +18 lines =@@ - >foo : any - - buz(); -->buz() : void -->buz : () => void -+>buz() : any -+>buz : any - } - } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.types b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.types index 8946abbfa3..13c76e18ff 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.types +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.types @@ -33,8 +33,8 @@ module superContain { >data : any foo(); ->foo() : any ->foo : any +>foo() : void +>foo : () => void } } } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.types.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.types.diff deleted file mode 100644 index a62f6a26ba..0000000000 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen4.types.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.mergedModuleDeclarationCodeGen4.types -+++ new.mergedModuleDeclarationCodeGen4.types -@@= skipped -32, +32 lines =@@ - >data : any - - foo(); -->foo() : void -->foo : () => void -+>foo() : any -+>foo : any - } - } - } diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.types b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.types index 548667fb06..82c2d4c45b 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.types +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.types @@ -39,12 +39,12 @@ module M.buz.plop { >buz : () => void export var v3 = doom; // _plop.doom ->v3 : any ->doom : any +>v3 : () => void +>doom : () => void export var v4 = M; // _plop.M ->v4 : typeof M ->M : typeof M +>v4 : () => void +>M : () => void export var v5 = fudge; // fudge >v5 : typeof fudge diff --git a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.types.diff b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.types.diff index 5563db3b55..b830851b7d 100644 --- a/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.types.diff +++ b/testdata/baselines/reference/submodule/compiler/mergedModuleDeclarationCodeGen5.types.diff @@ -27,20 +27,3 @@ // Emit these references as follows var v1 = gunk; // gunk -@@= skipped -12, +12 lines =@@ - >buz : () => void - - export var v3 = doom; // _plop.doom -->v3 : () => void -->doom : () => void -+>v3 : any -+>doom : any - - export var v4 = M; // _plop.M -->v4 : () => void -->M : () => void -+>v4 : typeof M -+>M : typeof M - - export var v5 = fudge; // fudge - >v5 : typeof fudge diff --git a/testdata/baselines/reference/submodule/compiler/methodContainingLocalFunction.types b/testdata/baselines/reference/submodule/compiler/methodContainingLocalFunction.types index a63825b47c..deb49aeff1 100644 --- a/testdata/baselines/reference/submodule/compiler/methodContainingLocalFunction.types +++ b/testdata/baselines/reference/submodule/compiler/methodContainingLocalFunction.types @@ -108,7 +108,7 @@ module M { } enum E { ->E : E.A +>E : E A = (() => { >A : E.A diff --git a/testdata/baselines/reference/submodule/compiler/methodContainingLocalFunction.types.diff b/testdata/baselines/reference/submodule/compiler/methodContainingLocalFunction.types.diff index a0931463c9..ffcb75dc7b 100644 --- a/testdata/baselines/reference/submodule/compiler/methodContainingLocalFunction.types.diff +++ b/testdata/baselines/reference/submodule/compiler/methodContainingLocalFunction.types.diff @@ -39,12 +39,3 @@ >u : U var x: { (): void; }; -@@= skipped -32, +33 lines =@@ - } - - enum E { -->E : E -+>E : E.A - - A = (() => { - >A : E.A diff --git a/testdata/baselines/reference/submodule/compiler/moduleCodeGenTest5.types b/testdata/baselines/reference/submodule/compiler/moduleCodeGenTest5.types index 4628f2cc35..9695ff7789 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleCodeGenTest5.types +++ b/testdata/baselines/reference/submodule/compiler/moduleCodeGenTest5.types @@ -37,25 +37,25 @@ class C2{ } export enum E1 {A=0} ->E1 : E1.A +>E1 : E1 >A : E1.A >0 : 0 var u = E1.A; ->u : E1.A ->E1.A : E1.A +>u : E1 +>E1.A : E1 >E1 : typeof E1 ->A : E1.A +>A : E1 enum E2 {B=0} ->E2 : E2.B +>E2 : E2 >B : E2.B >0 : 0 var v = E2.B; ->v : E2.B ->E2.B : E2.B +>v : E2 +>E2.B : E2 >E2 : typeof E2 ->B : E2.B +>B : E2 diff --git a/testdata/baselines/reference/submodule/compiler/moduleCodeGenTest5.types.diff b/testdata/baselines/reference/submodule/compiler/moduleCodeGenTest5.types.diff deleted file mode 100644 index 9d2e881bc4..0000000000 --- a/testdata/baselines/reference/submodule/compiler/moduleCodeGenTest5.types.diff +++ /dev/null @@ -1,36 +0,0 @@ ---- old.moduleCodeGenTest5.types -+++ new.moduleCodeGenTest5.types -@@= skipped -36, +36 lines =@@ - } - - export enum E1 {A=0} -->E1 : E1 -+>E1 : E1.A - >A : E1.A - >0 : 0 - - var u = E1.A; -->u : E1 -->E1.A : E1 -+>u : E1.A -+>E1.A : E1.A - >E1 : typeof E1 -->A : E1 -+>A : E1.A - - enum E2 {B=0} -->E2 : E2 -+>E2 : E2.B - >B : E2.B - >0 : 0 - - var v = E2.B; -->v : E2 -->E2.B : E2 -+>v : E2.B -+>E2.B : E2.B - >E2 : typeof E2 -->B : E2 -+>B : E2.B - - diff --git a/testdata/baselines/reference/submodule/compiler/moduleExports1.types b/testdata/baselines/reference/submodule/compiler/moduleExports1.types index 565069ba99..bc323ed9f1 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleExports1.types +++ b/testdata/baselines/reference/submodule/compiler/moduleExports1.types @@ -15,21 +15,21 @@ export module TypeScript.Strasse.Street { } var rue = new TypeScript.Strasse.Street.Rue(); ->rue : any ->new TypeScript.Strasse.Street.Rue() : any ->TypeScript.Strasse.Street.Rue : any ->TypeScript.Strasse.Street : any ->TypeScript.Strasse : any +>rue : Rue +>new TypeScript.Strasse.Street.Rue() : Rue +>TypeScript.Strasse.Street.Rue : typeof Rue +>TypeScript.Strasse.Street : typeof Street +>TypeScript.Strasse : typeof Strasse >TypeScript : typeof TypeScript ->Strasse : any ->Street : any ->Rue : any +>Strasse : typeof Strasse +>Street : typeof Street +>Rue : typeof Rue rue.address = "1 Main Street"; >rue.address = "1 Main Street" : "1 Main Street" ->rue.address : any ->rue : any ->address : any +>rue.address : string +>rue : Rue +>address : string >"1 Main Street" : "1 Main Street" void 0; diff --git a/testdata/baselines/reference/submodule/compiler/moduleExports1.types.diff b/testdata/baselines/reference/submodule/compiler/moduleExports1.types.diff index 710d2b33d6..061da8ea57 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleExports1.types.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleExports1.types.diff @@ -9,27 +9,24 @@ ->TypeScript.Strasse.Street.Rue : typeof TypeScript.Strasse.Street.Rue ->TypeScript.Strasse.Street : typeof TypeScript.Strasse.Street ->TypeScript.Strasse : typeof TypeScript.Strasse -+>rue : any -+>new TypeScript.Strasse.Street.Rue() : any -+>TypeScript.Strasse.Street.Rue : any -+>TypeScript.Strasse.Street : any -+>TypeScript.Strasse : any ++>rue : Rue ++>new TypeScript.Strasse.Street.Rue() : Rue ++>TypeScript.Strasse.Street.Rue : typeof Rue ++>TypeScript.Strasse.Street : typeof Street ++>TypeScript.Strasse : typeof Strasse >TypeScript : typeof TypeScript ->Strasse : typeof TypeScript.Strasse ->Street : typeof TypeScript.Strasse.Street ->Rue : typeof TypeScript.Strasse.Street.Rue -+>Strasse : any -+>Street : any -+>Rue : any ++>Strasse : typeof Strasse ++>Street : typeof Street ++>Rue : typeof Rue rue.address = "1 Main Street"; >rue.address = "1 Main Street" : "1 Main Street" -->rue.address : string + >rue.address : string ->rue : TypeScript.Strasse.Street.Rue -->address : string -+>rue.address : any -+>rue : any -+>address : any ++>rue : Rue + >address : string >"1 Main Street" : "1 Main Street" - void 0; diff --git a/testdata/baselines/reference/submodule/compiler/moduleImport.types b/testdata/baselines/reference/submodule/compiler/moduleImport.types index 9ef5d7589a..630a796184 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleImport.types +++ b/testdata/baselines/reference/submodule/compiler/moduleImport.types @@ -34,10 +34,10 @@ module X { >X : typeof X import ABC = A.B.C; ->ABC : any +>ABC : typeof C >A : typeof A ->B : any ->C : any +>B : typeof B +>C : typeof C export function pong(x: number) { >pong : (x: number) => void @@ -47,10 +47,10 @@ module X { >x > 0 : boolean >x : number >0 : 0 ->ABC.ping(x-1) : any ->ABC.ping : any ->ABC : any ->ping : any +>ABC.ping(x-1) : void +>ABC.ping : (x: number) => void +>ABC : typeof C +>ping : (x: number) => void >x-1 : number >x : number >1 : 1 diff --git a/testdata/baselines/reference/submodule/compiler/moduleImport.types.diff b/testdata/baselines/reference/submodule/compiler/moduleImport.types.diff index d83beec53a..0474848be4 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleImport.types.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleImport.types.diff @@ -5,27 +5,21 @@ import ABC = A.B.C; ->ABC : typeof ABC -+>ABC : any ++>ABC : typeof C >A : typeof A ->B : typeof A.B ->C : typeof ABC -+>B : any -+>C : any ++>B : typeof B ++>C : typeof C export function pong(x: number) { >pong : (x: number) => void -@@= skipped -13, +13 lines =@@ - >x > 0 : boolean - >x : number +@@= skipped -15, +15 lines =@@ >0 : 0 -->ABC.ping(x-1) : void -->ABC.ping : (x: number) => void + >ABC.ping(x-1) : void + >ABC.ping : (x: number) => void ->ABC : typeof ABC -->ping : (x: number) => void -+>ABC.ping(x-1) : any -+>ABC.ping : any -+>ABC : any -+>ping : any ++>ABC : typeof C + >ping : (x: number) => void >x-1 : number >x : number - >1 : 1 diff --git a/testdata/baselines/reference/submodule/compiler/moduleLocalImportNotIncorrectlyRedirected.types b/testdata/baselines/reference/submodule/compiler/moduleLocalImportNotIncorrectlyRedirected.types index 935b4b84e1..31d0c33e76 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleLocalImportNotIncorrectlyRedirected.types +++ b/testdata/baselines/reference/submodule/compiler/moduleLocalImportNotIncorrectlyRedirected.types @@ -16,7 +16,7 @@ export interface ISpinButton {} export * from './positioning/index'; === node_modules/troublesome-lib/lib/utilities/positioning/index.d.ts === export declare enum Position { ->Position : Position.top +>Position : Position top, >top : Position.top diff --git a/testdata/baselines/reference/submodule/compiler/moduleLocalImportNotIncorrectlyRedirected.types.diff b/testdata/baselines/reference/submodule/compiler/moduleLocalImportNotIncorrectlyRedirected.types.diff index 7f7a34283d..75c4a51dd5 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleLocalImportNotIncorrectlyRedirected.types.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleLocalImportNotIncorrectlyRedirected.types.diff @@ -9,10 +9,3 @@ === node_modules/troublesome-lib/lib/utilities/positioning.d.ts === export * from './positioning/index'; - === node_modules/troublesome-lib/lib/utilities/positioning/index.d.ts === - export declare enum Position { -->Position : Position -+>Position : Position.top - - top, - >top : Position.top diff --git a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.types b/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.types index 1c7cdf0c15..ec5b0bf740 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.types +++ b/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.types @@ -29,14 +29,14 @@ module TypeScript { >PositionedElement : PositionedElement public childIndex(child: ISyntaxElement) { ->childIndex : (child: ISyntaxElement) => any +>childIndex : (child: ISyntaxElement) => void >child : ISyntaxElement return Syntax.childIndex(); ->Syntax.childIndex() : any ->Syntax.childIndex : any ->Syntax : any ->childIndex : any +>Syntax.childIndex() : void +>Syntax.childIndex : () => void +>Syntax : typeof Syntax +>childIndex : () => void } } diff --git a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.types.diff b/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.types.diff index ed10958976..50b62b4f15 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.types.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation1.types.diff @@ -11,21 +11,3 @@ export class PositionedElement { >PositionedElement : PositionedElement - - public childIndex(child: ISyntaxElement) { -->childIndex : (child: ISyntaxElement) => void -+>childIndex : (child: ISyntaxElement) => any - >child : ISyntaxElement - - return Syntax.childIndex(); -->Syntax.childIndex() : void -->Syntax.childIndex : () => void -->Syntax : typeof Syntax -->childIndex : () => void -+>Syntax.childIndex() : any -+>Syntax.childIndex : any -+>Syntax : any -+>childIndex : any - } - } - diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.types b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.types index ec443556dd..072e4efc3c 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.types +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.types @@ -17,16 +17,16 @@ module A.M { >M : typeof M import M = Z.M; ->M : any +>M : typeof M >Z : typeof Z ->M : any +>M : typeof M export function bar() { >bar : () => void } M.bar(); // Should call Z.M.bar ->M.bar() : any ->M.bar : any ->M : any ->bar : any +>M.bar() : string +>M.bar : () => string +>M : typeof M +>bar : () => string } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.types.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.types.diff index 4bab8995ee..888ce5af23 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.types.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt.types.diff @@ -8,22 +8,4 @@ +>M : typeof M import M = Z.M; -->M : typeof M -+>M : any - >Z : typeof Z -->M : typeof M -+>M : any - - export function bar() { - >bar : () => void - } - M.bar(); // Should call Z.M.bar -->M.bar() : string -->M.bar : () => string -->M : typeof M -->bar : () => string -+>M.bar() : any -+>M.bar : any -+>M : any -+>bar : any - } + >M : typeof M diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.types b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.types index 587a417630..123300496a 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.types +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.types @@ -17,16 +17,16 @@ module A.M { >M : typeof M export import M = Z.M; ->M : any +>M : typeof M >Z : typeof Z ->M : any +>M : typeof M export function bar() { >bar : () => void } M.bar(); // Should call Z.M.bar ->M.bar() : any ->M.bar : any ->M : any ->bar : any +>M.bar() : string +>M.bar : () => string +>M : typeof M +>bar : () => string } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.types.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.types.diff index 4171828994..d6ff02d6e2 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt2.types.diff @@ -8,22 +8,4 @@ +>M : typeof M export import M = Z.M; -->M : typeof M -+>M : any - >Z : typeof Z -->M : typeof M -+>M : any - - export function bar() { - >bar : () => void - } - M.bar(); // Should call Z.M.bar -->M.bar() : string -->M.bar : () => string -->M : typeof M -->bar : () => string -+>M.bar() : any -+>M.bar : any -+>M : any -+>bar : any - } + >M : typeof M diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.types b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.types index b625315f71..cbdb699fb1 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.types +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.types @@ -20,16 +20,16 @@ module A.M { >M : M import M = Z.M; ->M : any +>M : typeof M >Z : typeof Z ->M : any +>M : typeof M export function bar() { >bar : () => void } M.bar(); // Should call Z.M.bar ->M.bar() : any ->M.bar : any ->M : any ->bar : any +>M.bar() : string +>M.bar : () => string +>M : typeof M +>bar : () => string } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.types.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.types.diff index 1945d17f85..f8bcfd3340 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.types.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt4.types.diff @@ -11,22 +11,5 @@ +>M : M + import M = Z.M; -->M : typeof M -+>M : any + >M : typeof M >Z : typeof Z -->M : typeof M -+>M : any - - export function bar() { - >bar : () => void - } - M.bar(); // Should call Z.M.bar -->M.bar() : string -->M.bar : () => string -->M : typeof M -->bar : () => string -+>M.bar() : any -+>M.bar : any -+>M : any -+>bar : any - } diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.types b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.types index 2ddfb2aa99..da331ef1eb 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.types +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.types @@ -17,9 +17,9 @@ module A.M { >M : typeof M import M = Z.M; ->M : any +>M : typeof M >Z : typeof Z ->M : any +>M : typeof M export function bar() { >bar : () => void diff --git a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.types.diff b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.types.diff index f91ab248ff..1a82a63ae1 100644 --- a/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.types.diff +++ b/testdata/baselines/reference/submodule/compiler/moduleSharesNameWithImportDeclarationInsideIt6.types.diff @@ -8,11 +8,4 @@ +>M : typeof M import M = Z.M; -->M : typeof M -+>M : any - >Z : typeof Z -->M : typeof M -+>M : any - - export function bar() { - >bar : () => void + >M : typeof M diff --git a/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.types b/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.types index 4bc42c259b..9b15447ae2 100644 --- a/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.types +++ b/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.types @@ -39,16 +39,16 @@ const ab2: A2 & B2 = {} as C2; // Error >{} : {} enum E { A = "A" } ->E : E.A +>E : E >A : E.A >"A" : "A" let x: { nope?: any } = E.A; // Error >x : { nope?: any; } >nope : any ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E let y: { nope?: any } = "A"; // Error >y : { nope?: any; } diff --git a/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.types.diff b/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.types.diff index ba76696845..ff129553ac 100644 --- a/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.types.diff +++ b/testdata/baselines/reference/submodule/compiler/nestedExcessPropertyChecking.types.diff @@ -15,27 +15,7 @@ >b : string | undefined type C1 = { x: { c: string } }; -@@= skipped -36, +36 lines =@@ - >{} : {} - - enum E { A = "A" } -->E : E -+>E : E.A - >A : E.A - >"A" : "A" - - let x: { nope?: any } = E.A; // Error - >x : { nope?: any; } - >nope : any -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - let y: { nope?: any } = "A"; // Error - >y : { nope?: any; } -@@= skipped -26, +26 lines =@@ +@@= skipped -62, +62 lines =@@ } const foo1: Partial<{ something: any }> & { variables: { diff --git a/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.types b/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.types index bece5b4ba2..4cde022855 100644 --- a/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.types +++ b/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.types @@ -44,7 +44,7 @@ class CrashTrigger extends Mixin(Empty) { >trigger : () => void new Concrete(); ->new Concrete() : Concrete +>new Concrete() : any >Concrete : typeof Concrete } } diff --git a/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.types.diff b/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.types.diff index b1a772ccc9..7bad29628b 100644 --- a/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.types.diff +++ b/testdata/baselines/reference/submodule/compiler/noCrashOnMixin.types.diff @@ -30,11 +30,3 @@ >Empty : typeof Empty public trigger() { - >trigger : () => void - - new Concrete(); -->new Concrete() : any -+>new Concrete() : Concrete - >Concrete : typeof Concrete - } - } diff --git a/testdata/baselines/reference/submodule/compiler/noCrashUMDMergedWithGlobalValue.types b/testdata/baselines/reference/submodule/compiler/noCrashUMDMergedWithGlobalValue.types index 1e9b21fb7a..449af5b695 100644 --- a/testdata/baselines/reference/submodule/compiler/noCrashUMDMergedWithGlobalValue.types +++ b/testdata/baselines/reference/submodule/compiler/noCrashUMDMergedWithGlobalValue.types @@ -9,11 +9,11 @@ export type Action = "PUSH" | "POP" | "REPLACE"; === /main.ts === interface SomeInterface { ->SomeInterface : "/other" +>SomeInterface : import("/other") readonly length: number; >length : number } declare const value: SomeInterface; ->value : "/other" +>value : import("/other") diff --git a/testdata/baselines/reference/submodule/compiler/noCrashUMDMergedWithGlobalValue.types.diff b/testdata/baselines/reference/submodule/compiler/noCrashUMDMergedWithGlobalValue.types.diff index 959920216a..8d946c98a6 100644 --- a/testdata/baselines/reference/submodule/compiler/noCrashUMDMergedWithGlobalValue.types.diff +++ b/testdata/baselines/reference/submodule/compiler/noCrashUMDMergedWithGlobalValue.types.diff @@ -4,12 +4,8 @@ === /main.ts === interface SomeInterface { -+>SomeInterface : "/other" ++>SomeInterface : import("/other") + readonly length: number; >length : number } - declare const value: SomeInterface; -->value : import("/other") -+>value : "/other" - diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexing.types b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexing.types index 132147b0a5..d1e28ef3a6 100644 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexing.types +++ b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexing.types @@ -2,7 +2,7 @@ === noImplicitAnyIndexing.ts === enum MyEmusEnum { ->MyEmusEnum : MyEmusEnum.emu +>MyEmusEnum : MyEmusEnum emu >emu : MyEmusEnum.emu @@ -20,9 +20,9 @@ var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu] >strRepresentation2 : string >MyEmusEnum[MyEmusEnum.emu] : string >MyEmusEnum : typeof MyEmusEnum ->MyEmusEnum.emu : MyEmusEnum.emu +>MyEmusEnum.emu : MyEmusEnum >MyEmusEnum : typeof MyEmusEnum ->emu : MyEmusEnum.emu +>emu : MyEmusEnum // Should be implicit 'any' ; property access fails, no string indexer. var strRepresentation3 = MyEmusEnum["monehh"]; @@ -33,8 +33,8 @@ var strRepresentation3 = MyEmusEnum["monehh"]; // Should be okay; should be a MyEmusEnum var strRepresentation4 = MyEmusEnum["emu"]; ->strRepresentation4 : MyEmusEnum.emu ->MyEmusEnum["emu"] : MyEmusEnum.emu +>strRepresentation4 : MyEmusEnum +>MyEmusEnum["emu"] : MyEmusEnum >MyEmusEnum : typeof MyEmusEnum >"emu" : "emu" @@ -111,9 +111,9 @@ var mResult1 = m[MyEmusEnum.emu]; >mResult1 : number >m[MyEmusEnum.emu] : number >m : MyMap ->MyEmusEnum.emu : MyEmusEnum.emu +>MyEmusEnum.emu : MyEmusEnum >MyEmusEnum : typeof MyEmusEnum ->emu : MyEmusEnum.emu +>emu : MyEmusEnum var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; >mResult2 : number @@ -121,9 +121,9 @@ var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; >m : MyMap >MyEmusEnum[MyEmusEnum.emu] : string >MyEmusEnum : typeof MyEmusEnum ->MyEmusEnum.emu : MyEmusEnum.emu +>MyEmusEnum.emu : MyEmusEnum >MyEmusEnum : typeof MyEmusEnum ->emu : MyEmusEnum.emu +>emu : MyEmusEnum var mResult3 = m[hi]; >mResult3 : number diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexing.types.diff b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexing.types.diff index 495b3fc8f3..35de4a219a 100644 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexing.types.diff +++ b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexing.types.diff @@ -1,38 +1,6 @@ --- old.noImplicitAnyIndexing.types +++ new.noImplicitAnyIndexing.types -@@= skipped -1, +1 lines =@@ - - === noImplicitAnyIndexing.ts === - enum MyEmusEnum { -->MyEmusEnum : MyEmusEnum -+>MyEmusEnum : MyEmusEnum.emu - - emu - >emu : MyEmusEnum.emu -@@= skipped -18, +18 lines =@@ - >strRepresentation2 : string - >MyEmusEnum[MyEmusEnum.emu] : string - >MyEmusEnum : typeof MyEmusEnum -->MyEmusEnum.emu : MyEmusEnum -+>MyEmusEnum.emu : MyEmusEnum.emu - >MyEmusEnum : typeof MyEmusEnum -->emu : MyEmusEnum -+>emu : MyEmusEnum.emu - - // Should be implicit 'any' ; property access fails, no string indexer. - var strRepresentation3 = MyEmusEnum["monehh"]; -@@= skipped -13, +13 lines =@@ - - // Should be okay; should be a MyEmusEnum - var strRepresentation4 = MyEmusEnum["emu"]; -->strRepresentation4 : MyEmusEnum -->MyEmusEnum["emu"] : MyEmusEnum -+>strRepresentation4 : MyEmusEnum.emu -+>MyEmusEnum["emu"] : MyEmusEnum.emu - >MyEmusEnum : typeof MyEmusEnum - >"emu" : "emu" - -@@= skipped -45, +45 lines =@@ +@@= skipped -77, +77 lines =@@ >hi : any interface MyMap { @@ -42,27 +10,3 @@ [key: string]: T; >key : string } -@@= skipped -30, +33 lines =@@ - >mResult1 : number - >m[MyEmusEnum.emu] : number - >m : MyMap -->MyEmusEnum.emu : MyEmusEnum -+>MyEmusEnum.emu : MyEmusEnum.emu - >MyEmusEnum : typeof MyEmusEnum -->emu : MyEmusEnum -+>emu : MyEmusEnum.emu - - var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; - >mResult2 : number -@@= skipped -10, +10 lines =@@ - >m : MyMap - >MyEmusEnum[MyEmusEnum.emu] : string - >MyEmusEnum : typeof MyEmusEnum -->MyEmusEnum.emu : MyEmusEnum -+>MyEmusEnum.emu : MyEmusEnum.emu - >MyEmusEnum : typeof MyEmusEnum -->emu : MyEmusEnum -+>emu : MyEmusEnum.emu - - var mResult3 = m[hi]; - >mResult3 : number diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types index 87cfe75eb5..51d93b7504 100644 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types +++ b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types @@ -2,7 +2,7 @@ === noImplicitAnyIndexingSuppressed.ts === enum MyEmusEnum { ->MyEmusEnum : MyEmusEnum.emu +>MyEmusEnum : MyEmusEnum emu >emu : MyEmusEnum.emu @@ -20,9 +20,9 @@ var strRepresentation2 = MyEmusEnum[MyEmusEnum.emu] >strRepresentation2 : string >MyEmusEnum[MyEmusEnum.emu] : string >MyEmusEnum : typeof MyEmusEnum ->MyEmusEnum.emu : MyEmusEnum.emu +>MyEmusEnum.emu : MyEmusEnum >MyEmusEnum : typeof MyEmusEnum ->emu : MyEmusEnum.emu +>emu : MyEmusEnum // Should be okay, as we suppress implicit 'any' property access checks var strRepresentation3 = MyEmusEnum["monehh"]; @@ -33,8 +33,8 @@ var strRepresentation3 = MyEmusEnum["monehh"]; // Should be okay; should be a MyEmusEnum var strRepresentation4 = MyEmusEnum["emu"]; ->strRepresentation4 : MyEmusEnum.emu ->MyEmusEnum["emu"] : MyEmusEnum.emu +>strRepresentation4 : MyEmusEnum +>MyEmusEnum["emu"] : MyEmusEnum >MyEmusEnum : typeof MyEmusEnum >"emu" : "emu" @@ -110,9 +110,9 @@ var mResult1 = m[MyEmusEnum.emu]; >mResult1 : number >m[MyEmusEnum.emu] : number >m : MyMap ->MyEmusEnum.emu : MyEmusEnum.emu +>MyEmusEnum.emu : MyEmusEnum >MyEmusEnum : typeof MyEmusEnum ->emu : MyEmusEnum.emu +>emu : MyEmusEnum var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; >mResult2 : number @@ -120,9 +120,9 @@ var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; >m : MyMap >MyEmusEnum[MyEmusEnum.emu] : string >MyEmusEnum : typeof MyEmusEnum ->MyEmusEnum.emu : MyEmusEnum.emu +>MyEmusEnum.emu : MyEmusEnum >MyEmusEnum : typeof MyEmusEnum ->emu : MyEmusEnum.emu +>emu : MyEmusEnum var mResult3 = m[hi]; >mResult3 : number diff --git a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types.diff b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types.diff index 8f905add14..28759527ec 100644 --- a/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types.diff +++ b/testdata/baselines/reference/submodule/compiler/noImplicitAnyIndexingSuppressed.types.diff @@ -1,38 +1,6 @@ --- old.noImplicitAnyIndexingSuppressed.types +++ new.noImplicitAnyIndexingSuppressed.types -@@= skipped -1, +1 lines =@@ - - === noImplicitAnyIndexingSuppressed.ts === - enum MyEmusEnum { -->MyEmusEnum : MyEmusEnum -+>MyEmusEnum : MyEmusEnum.emu - - emu - >emu : MyEmusEnum.emu -@@= skipped -18, +18 lines =@@ - >strRepresentation2 : string - >MyEmusEnum[MyEmusEnum.emu] : string - >MyEmusEnum : typeof MyEmusEnum -->MyEmusEnum.emu : MyEmusEnum -+>MyEmusEnum.emu : MyEmusEnum.emu - >MyEmusEnum : typeof MyEmusEnum -->emu : MyEmusEnum -+>emu : MyEmusEnum.emu - - // Should be okay, as we suppress implicit 'any' property access checks - var strRepresentation3 = MyEmusEnum["monehh"]; -@@= skipped -13, +13 lines =@@ - - // Should be okay; should be a MyEmusEnum - var strRepresentation4 = MyEmusEnum["emu"]; -->strRepresentation4 : MyEmusEnum -->MyEmusEnum["emu"] : MyEmusEnum -+>strRepresentation4 : MyEmusEnum.emu -+>MyEmusEnum["emu"] : MyEmusEnum.emu - >MyEmusEnum : typeof MyEmusEnum - >"emu" : "emu" - -@@= skipped -44, +44 lines =@@ +@@= skipped -76, +76 lines =@@ >hi : any interface MyMap { @@ -42,27 +10,3 @@ [key: string]: T; >key : string } -@@= skipped -30, +33 lines =@@ - >mResult1 : number - >m[MyEmusEnum.emu] : number - >m : MyMap -->MyEmusEnum.emu : MyEmusEnum -+>MyEmusEnum.emu : MyEmusEnum.emu - >MyEmusEnum : typeof MyEmusEnum -->emu : MyEmusEnum -+>emu : MyEmusEnum.emu - - var mResult2 = m[MyEmusEnum[MyEmusEnum.emu]]; - >mResult2 : number -@@= skipped -10, +10 lines =@@ - >m : MyMap - >MyEmusEnum[MyEmusEnum.emu] : string - >MyEmusEnum : typeof MyEmusEnum -->MyEmusEnum.emu : MyEmusEnum -+>MyEmusEnum.emu : MyEmusEnum.emu - >MyEmusEnum : typeof MyEmusEnum -->emu : MyEmusEnum -+>emu : MyEmusEnum.emu - - var mResult3 = m[hi]; - >mResult3 : number diff --git a/testdata/baselines/reference/submodule/compiler/noUnusedLocals_selfReference.types b/testdata/baselines/reference/submodule/compiler/noUnusedLocals_selfReference.types index ba8d25c9de..81779a299e 100644 --- a/testdata/baselines/reference/submodule/compiler/noUnusedLocals_selfReference.types +++ b/testdata/baselines/reference/submodule/compiler/noUnusedLocals_selfReference.types @@ -24,13 +24,13 @@ class C { >C : typeof C } enum E { A = 0, B = E.A } ->E : E.A +>E : E >A : E.A >0 : 0 >B : E.A ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E interface I { x: I }; >I : I diff --git a/testdata/baselines/reference/submodule/compiler/noUnusedLocals_selfReference.types.diff b/testdata/baselines/reference/submodule/compiler/noUnusedLocals_selfReference.types.diff index 23822ad7b4..1ecafce125 100644 --- a/testdata/baselines/reference/submodule/compiler/noUnusedLocals_selfReference.types.diff +++ b/testdata/baselines/reference/submodule/compiler/noUnusedLocals_selfReference.types.diff @@ -1,26 +1,14 @@ --- old.noUnusedLocals_selfReference.types +++ new.noUnusedLocals_selfReference.types -@@= skipped -23, +23 lines =@@ - >C : typeof C - } - enum E { A = 0, B = E.A } -->E : E -+>E : E.A - >A : E.A - >0 : 0 - >B : E.A -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A +@@= skipped -32, +32 lines =@@ + >A : E interface I { x: I }; +>I : I >x : I type T = { x: T }; -@@= skipped -23, +24 lines =@@ +@@= skipped -14, +15 lines =@@ // Previously `T` was considered unused due to merging with the property, // back when all non-blocks were checked for recursion. export interface A { T: T } diff --git a/testdata/baselines/reference/submodule/compiler/nonExportedElementsOfMergedModules.types b/testdata/baselines/reference/submodule/compiler/nonExportedElementsOfMergedModules.types index 3beb7b4ff3..818117bbb0 100644 --- a/testdata/baselines/reference/submodule/compiler/nonExportedElementsOfMergedModules.types +++ b/testdata/baselines/reference/submodule/compiler/nonExportedElementsOfMergedModules.types @@ -5,7 +5,7 @@ module One { >One : typeof One enum A { X } ->A : A.X +>A : A >X : A.X module B { @@ -20,7 +20,7 @@ module One { >One : typeof One enum A { Y } ->A : A.Y +>A : A >Y : A.Y module B { diff --git a/testdata/baselines/reference/submodule/compiler/nonExportedElementsOfMergedModules.types.diff b/testdata/baselines/reference/submodule/compiler/nonExportedElementsOfMergedModules.types.diff deleted file mode 100644 index 6190c4e3d1..0000000000 --- a/testdata/baselines/reference/submodule/compiler/nonExportedElementsOfMergedModules.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.nonExportedElementsOfMergedModules.types -+++ new.nonExportedElementsOfMergedModules.types -@@= skipped -4, +4 lines =@@ - >One : typeof One - - enum A { X } -->A : A -+>A : A.X - >X : A.X - - module B { -@@= skipped -15, +15 lines =@@ - >One : typeof One - - enum A { Y } -->A : A -+>A : A.Y - >Y : A.Y - - module B { diff --git a/testdata/baselines/reference/submodule/compiler/operatorAddNullUndefined.types b/testdata/baselines/reference/submodule/compiler/operatorAddNullUndefined.types index 92e3d73c3c..1a1acd030f 100644 --- a/testdata/baselines/reference/submodule/compiler/operatorAddNullUndefined.types +++ b/testdata/baselines/reference/submodule/compiler/operatorAddNullUndefined.types @@ -2,7 +2,7 @@ === operatorAddNullUndefined.ts === enum E { x } ->E : E.x +>E : E >x : E.x var x1 = null + null; @@ -72,30 +72,30 @@ var x12 = undefined + "test"; var x13 = null + E.x >x13 : any >null + E.x : any ->E.x : E.x +>E.x : E >E : typeof E ->x : E.x +>x : E var x14 = undefined + E.x >x14 : any >undefined + E.x : any >undefined : undefined ->E.x : E.x +>E.x : E >E : typeof E ->x : E.x +>x : E var x15 = E.x + null >x15 : any >E.x + null : any ->E.x : E.x +>E.x : E >E : typeof E ->x : E.x +>x : E var x16 = E.x + undefined >x16 : any >E.x + undefined : any ->E.x : E.x +>E.x : E >E : typeof E ->x : E.x +>x : E >undefined : undefined diff --git a/testdata/baselines/reference/submodule/compiler/operatorAddNullUndefined.types.diff b/testdata/baselines/reference/submodule/compiler/operatorAddNullUndefined.types.diff deleted file mode 100644 index 22a0acd83f..0000000000 --- a/testdata/baselines/reference/submodule/compiler/operatorAddNullUndefined.types.diff +++ /dev/null @@ -1,50 +0,0 @@ ---- old.operatorAddNullUndefined.types -+++ new.operatorAddNullUndefined.types -@@= skipped -1, +1 lines =@@ - - === operatorAddNullUndefined.ts === - enum E { x } -->E : E -+>E : E.x - >x : E.x - - var x1 = null + null; -@@= skipped -70, +70 lines =@@ - var x13 = null + E.x - >x13 : any - >null + E.x : any -->E.x : E -+>E.x : E.x - >E : typeof E -->x : E -+>x : E.x - - var x14 = undefined + E.x - >x14 : any - >undefined + E.x : any - >undefined : undefined -->E.x : E -+>E.x : E.x - >E : typeof E -->x : E -+>x : E.x - - var x15 = E.x + null - >x15 : any - >E.x + null : any -->E.x : E -+>E.x : E.x - >E : typeof E -->x : E -+>x : E.x - - var x16 = E.x + undefined - >x16 : any - >E.x + undefined : any -->E.x : E -+>E.x : E.x - >E : typeof E -->x : E -+>x : E.x - >undefined : undefined - diff --git a/testdata/baselines/reference/submodule/compiler/overshifts.types b/testdata/baselines/reference/submodule/compiler/overshifts.types index 10d644a8d0..e986a8f0d1 100644 --- a/testdata/baselines/reference/submodule/compiler/overshifts.types +++ b/testdata/baselines/reference/submodule/compiler/overshifts.types @@ -326,7 +326,7 @@ enum One { } enum Two { ->Two : Two.A +>Two : Two A = 0xFF_FF_FF_FF >> 1, // ok >A : Two.A diff --git a/testdata/baselines/reference/submodule/compiler/overshifts.types.diff b/testdata/baselines/reference/submodule/compiler/overshifts.types.diff deleted file mode 100644 index 5b9de2b070..0000000000 --- a/testdata/baselines/reference/submodule/compiler/overshifts.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.overshifts.types -+++ new.overshifts.types -@@= skipped -325, +325 lines =@@ - } - - enum Two { -->Two : Two -+>Two : Two.A - - A = 0xFF_FF_FF_FF >> 1, // ok - >A : Two.A diff --git a/testdata/baselines/reference/submodule/compiler/parseEntityNameWithReservedWord.types b/testdata/baselines/reference/submodule/compiler/parseEntityNameWithReservedWord.types index a79eee9cdc..c3e062c281 100644 --- a/testdata/baselines/reference/submodule/compiler/parseEntityNameWithReservedWord.types +++ b/testdata/baselines/reference/submodule/compiler/parseEntityNameWithReservedWord.types @@ -2,13 +2,13 @@ === parseEntityNameWithReservedWord.ts === enum Bool { false } ->Bool : Bool.false +>Bool : Bool >false : Bool.false const x: Bool.false = Bool.false; ->x : Bool.false +>x : Bool >Bool : any ->Bool.false : Bool.false +>Bool.false : Bool >Bool : typeof Bool ->false : Bool.false +>false : Bool diff --git a/testdata/baselines/reference/submodule/compiler/parseEntityNameWithReservedWord.types.diff b/testdata/baselines/reference/submodule/compiler/parseEntityNameWithReservedWord.types.diff deleted file mode 100644 index 171177354b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/parseEntityNameWithReservedWord.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.parseEntityNameWithReservedWord.types -+++ new.parseEntityNameWithReservedWord.types -@@= skipped -1, +1 lines =@@ - - === parseEntityNameWithReservedWord.ts === - enum Bool { false } -->Bool : Bool -+>Bool : Bool.false - >false : Bool.false - - const x: Bool.false = Bool.false; -->x : Bool -+>x : Bool.false - >Bool : any -->Bool.false : Bool -+>Bool.false : Bool.false - >Bool : typeof Bool -->false : Bool -+>false : Bool.false - diff --git a/testdata/baselines/reference/submodule/compiler/preserveConstEnums.types b/testdata/baselines/reference/submodule/compiler/preserveConstEnums.types index e5247ec846..2692010a19 100644 --- a/testdata/baselines/reference/submodule/compiler/preserveConstEnums.types +++ b/testdata/baselines/reference/submodule/compiler/preserveConstEnums.types @@ -2,11 +2,11 @@ === preserveConstEnums.ts === const enum E { ->E : E.Value +>E : E Value = 1, Value2 = Value >Value : E.Value >1 : 1 >Value2 : E.Value ->Value : E.Value +>Value : E } diff --git a/testdata/baselines/reference/submodule/compiler/preserveConstEnums.types.diff b/testdata/baselines/reference/submodule/compiler/preserveConstEnums.types.diff deleted file mode 100644 index 0f2b7e83bd..0000000000 --- a/testdata/baselines/reference/submodule/compiler/preserveConstEnums.types.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.preserveConstEnums.types -+++ new.preserveConstEnums.types -@@= skipped -1, +1 lines =@@ - - === preserveConstEnums.ts === - const enum E { -->E : E -+>E : E.Value - - Value = 1, Value2 = Value - >Value : E.Value - >1 : 1 - >Value2 : E.Value -->Value : E -+>Value : E.Value - } diff --git a/testdata/baselines/reference/submodule/compiler/reachabilityChecks1.types b/testdata/baselines/reference/submodule/compiler/reachabilityChecks1.types index c8fc5be600..1dec8013bd 100644 --- a/testdata/baselines/reference/submodule/compiler/reachabilityChecks1.types +++ b/testdata/baselines/reference/submodule/compiler/reachabilityChecks1.types @@ -67,7 +67,7 @@ module A4 { >A : typeof A const enum E { X } ->E : E.X +>E : E >X : E.X } } @@ -117,7 +117,7 @@ function f3() { >true : true enum E { ->E : E.X +>E : E X = 1 >X : E.X @@ -136,7 +136,7 @@ function f4() { >Error : ErrorConstructor } const enum E { ->E : E.X +>E : E X = 1 >X : E.X diff --git a/testdata/baselines/reference/submodule/compiler/reachabilityChecks1.types.diff b/testdata/baselines/reference/submodule/compiler/reachabilityChecks1.types.diff index d5f69c298a..a64775e2cc 100644 --- a/testdata/baselines/reference/submodule/compiler/reachabilityChecks1.types.diff +++ b/testdata/baselines/reference/submodule/compiler/reachabilityChecks1.types.diff @@ -18,11 +18,8 @@ +>A : typeof A + const enum E { X } -->E : E -+>E : E.X + >E : E >X : E.X - } - } @@= skipped -39, +41 lines =@@ for (; ;); @@ -31,21 +28,3 @@ } } -@@= skipped -11, +12 lines =@@ - >true : true - - enum E { -->E : E -+>E : E.X - - X = 1 - >X : E.X -@@= skipped -19, +19 lines =@@ - >Error : ErrorConstructor - } - const enum E { -->E : E -+>E : E.X - - X = 1 - >X : E.X diff --git a/testdata/baselines/reference/submodule/compiler/reachabilityChecks2.types b/testdata/baselines/reference/submodule/compiler/reachabilityChecks2.types index 4d6cc648c5..339e74182d 100644 --- a/testdata/baselines/reference/submodule/compiler/reachabilityChecks2.types +++ b/testdata/baselines/reference/submodule/compiler/reachabilityChecks2.types @@ -5,7 +5,7 @@ while (true) { } >true : true const enum E { X } ->E : E.X +>E : E >X : E.X module A4 { @@ -18,7 +18,7 @@ module A4 { >A : typeof A const enum E { X } ->E : E.X +>E : E >X : E.X } } diff --git a/testdata/baselines/reference/submodule/compiler/reachabilityChecks2.types.diff b/testdata/baselines/reference/submodule/compiler/reachabilityChecks2.types.diff index 80b4723425..3c960856ad 100644 --- a/testdata/baselines/reference/submodule/compiler/reachabilityChecks2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/reachabilityChecks2.types.diff @@ -1,23 +1,11 @@ --- old.reachabilityChecks2.types +++ new.reachabilityChecks2.types -@@= skipped -4, +4 lines =@@ - >true : true - - const enum E { X } -->E : E -+>E : E.X - >X : E.X - - module A4 { -@@= skipped -10, +10 lines =@@ +@@= skipped -14, +14 lines =@@ >true : true module A { +>A : typeof A + const enum E { X } -->E : E -+>E : E.X + >E : E >X : E.X - } - } diff --git a/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.types b/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.types index 619ad9c241..c917144254 100644 --- a/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.types +++ b/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.types @@ -8,7 +8,7 @@ declare module Sample.Thing { >Sample : typeof Sample ->Thing : any +>Thing : typeof Thing export interface IWidget { >IWidget : IWidget @@ -65,9 +65,9 @@ module Sample.Actions.Thing.Find { export class StartFindAction implements Sample.Thing.IAction { >StartFindAction : StartFindAction ->Sample.Thing : any +>Sample.Thing : typeof Thing >Sample : typeof Sample ->Thing : any +>Thing : typeof Thing public getId() { return "yo"; } >getId : () => string @@ -92,9 +92,9 @@ module Sample.Thing.Widgets { export class FindWidget implements Sample.Thing.IWidget { >FindWidget : FindWidget ->Sample.Thing : any +>Sample.Thing : typeof Thing >Sample : typeof Sample ->Thing : any +>Thing : typeof Thing public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} >gar : (runner: (widget: IWidget) => any) => any diff --git a/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.types.diff b/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.types.diff index 5f67522839..cb39cf683b 100644 --- a/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.types.diff +++ b/testdata/baselines/reference/submodule/compiler/recursiveClassReferenceTest.types.diff @@ -5,7 +5,7 @@ declare module Sample.Thing { +>Sample : typeof Sample -+>Thing : any ++>Thing : typeof Thing export interface IWidget { +>IWidget : IWidget @@ -45,10 +45,10 @@ export class StartFindAction implements Sample.Thing.IAction { >StartFindAction : StartFindAction ->Sample.Thing : typeof Sample.Thing -+>Sample.Thing : any ++>Sample.Thing : typeof Thing >Sample : typeof Sample ->Thing : typeof Sample.Thing -+>Thing : any ++>Thing : typeof Thing public getId() { return "yo"; } >getId : () => string @@ -62,15 +62,8 @@ >Sample : any >Thing : any -@@= skipped -27, +27 lines =@@ - - export class FindWidget implements Sample.Thing.IWidget { - >FindWidget : FindWidget -->Sample.Thing : typeof Thing -+>Sample.Thing : any - >Sample : typeof Sample -->Thing : typeof Thing -+>Thing : any +@@= skipped -32, +32 lines =@@ + >Thing : typeof Thing public gar(runner:(widget:Sample.Thing.IWidget)=>any) { if (true) {return runner(this);}} ->gar : (runner: (widget: Sample.Thing.IWidget) => any) => any @@ -87,7 +80,7 @@ >this : this private domNode:any = null; -@@= skipped -49, +49 lines =@@ +@@= skipped -44, +44 lines =@@ } interface IMode { getInitialState(): IState;} diff --git a/testdata/baselines/reference/submodule/compiler/strictModeEnumMemberNameReserved.types b/testdata/baselines/reference/submodule/compiler/strictModeEnumMemberNameReserved.types index 203c967f79..a97868a182 100644 --- a/testdata/baselines/reference/submodule/compiler/strictModeEnumMemberNameReserved.types +++ b/testdata/baselines/reference/submodule/compiler/strictModeEnumMemberNameReserved.types @@ -5,16 +5,16 @@ >"use strict" : "use strict" enum E { ->E : E.static +>E : E static >static : E.static } const x1: E.static = E.static; ->x1 : E.static +>x1 : E >E : any ->E.static : E.static +>E.static : E >E : typeof E ->static : E.static +>static : E diff --git a/testdata/baselines/reference/submodule/compiler/strictModeEnumMemberNameReserved.types.diff b/testdata/baselines/reference/submodule/compiler/strictModeEnumMemberNameReserved.types.diff deleted file mode 100644 index bbf7078ba3..0000000000 --- a/testdata/baselines/reference/submodule/compiler/strictModeEnumMemberNameReserved.types.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- old.strictModeEnumMemberNameReserved.types -+++ new.strictModeEnumMemberNameReserved.types -@@= skipped -4, +4 lines =@@ - >"use strict" : "use strict" - - enum E { -->E : E -+>E : E.static - - static - >static : E.static - } - - const x1: E.static = E.static; -->x1 : E -+>x1 : E.static - >E : any -->E.static : E -+>E.static : E.static - >E : typeof E -->static : E -+>static : E.static - diff --git a/testdata/baselines/reference/submodule/compiler/systemModuleAmbientDeclarations.types b/testdata/baselines/reference/submodule/compiler/systemModuleAmbientDeclarations.types index 3380b68f81..99019d9987 100644 --- a/testdata/baselines/reference/submodule/compiler/systemModuleAmbientDeclarations.types +++ b/testdata/baselines/reference/submodule/compiler/systemModuleAmbientDeclarations.types @@ -11,7 +11,7 @@ declare class C {} >C : C declare enum E {X = 1}; ->E : E.X +>E : E >X : E.X >1 : 1 @@ -45,7 +45,7 @@ export declare var v: number; === file5.ts === export declare enum E {X = 1} ->E : E.X +>E : E >X : E.X >1 : 1 diff --git a/testdata/baselines/reference/submodule/compiler/systemModuleAmbientDeclarations.types.diff b/testdata/baselines/reference/submodule/compiler/systemModuleAmbientDeclarations.types.diff deleted file mode 100644 index 0b73b1848e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/systemModuleAmbientDeclarations.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.systemModuleAmbientDeclarations.types -+++ new.systemModuleAmbientDeclarations.types -@@= skipped -10, +10 lines =@@ - >C : C - - declare enum E {X = 1}; -->E : E -+>E : E.X - >X : E.X - >1 : 1 - -@@= skipped -34, +34 lines =@@ - - === file5.ts === - export declare enum E {X = 1} -->E : E -+>E : E.X - >X : E.X - >1 : 1 - diff --git a/testdata/baselines/reference/submodule/compiler/systemModuleConstEnums.types b/testdata/baselines/reference/submodule/compiler/systemModuleConstEnums.types index 6cca5ac377..7836bd34a4 100644 --- a/testdata/baselines/reference/submodule/compiler/systemModuleConstEnums.types +++ b/testdata/baselines/reference/submodule/compiler/systemModuleConstEnums.types @@ -6,7 +6,7 @@ declare function use(a: any); >a : any const enum TopLevelConstEnum { X } ->TopLevelConstEnum : TopLevelConstEnum.X +>TopLevelConstEnum : TopLevelConstEnum >X : TopLevelConstEnum.X export function foo() { @@ -15,24 +15,24 @@ export function foo() { use(TopLevelConstEnum.X); >use(TopLevelConstEnum.X) : any >use : (a: any) => any ->TopLevelConstEnum.X : TopLevelConstEnum.X +>TopLevelConstEnum.X : TopLevelConstEnum >TopLevelConstEnum : typeof TopLevelConstEnum ->X : TopLevelConstEnum.X +>X : TopLevelConstEnum use(M.NonTopLevelConstEnum.X); >use(M.NonTopLevelConstEnum.X) : any >use : (a: any) => any ->M.NonTopLevelConstEnum.X : NonTopLevelConstEnum.X +>M.NonTopLevelConstEnum.X : NonTopLevelConstEnum >M.NonTopLevelConstEnum : typeof NonTopLevelConstEnum >M : typeof M >NonTopLevelConstEnum : typeof NonTopLevelConstEnum ->X : NonTopLevelConstEnum.X +>X : NonTopLevelConstEnum } module M { >M : typeof M export const enum NonTopLevelConstEnum { X } ->NonTopLevelConstEnum : NonTopLevelConstEnum.X +>NonTopLevelConstEnum : NonTopLevelConstEnum >X : NonTopLevelConstEnum.X } diff --git a/testdata/baselines/reference/submodule/compiler/systemModuleConstEnums.types.diff b/testdata/baselines/reference/submodule/compiler/systemModuleConstEnums.types.diff index d0cf51cb65..c6cde30603 100644 --- a/testdata/baselines/reference/submodule/compiler/systemModuleConstEnums.types.diff +++ b/testdata/baselines/reference/submodule/compiler/systemModuleConstEnums.types.diff @@ -1,43 +1,23 @@ --- old.systemModuleConstEnums.types +++ new.systemModuleConstEnums.types -@@= skipped -5, +5 lines =@@ - >a : any - - const enum TopLevelConstEnum { X } -->TopLevelConstEnum : TopLevelConstEnum -+>TopLevelConstEnum : TopLevelConstEnum.X - >X : TopLevelConstEnum.X - - export function foo() { -@@= skipped -9, +9 lines =@@ - use(TopLevelConstEnum.X); - >use(TopLevelConstEnum.X) : any - >use : (a: any) => any -->TopLevelConstEnum.X : TopLevelConstEnum -+>TopLevelConstEnum.X : TopLevelConstEnum.X - >TopLevelConstEnum : typeof TopLevelConstEnum -->X : TopLevelConstEnum -+>X : TopLevelConstEnum.X - +@@= skipped -21, +21 lines =@@ use(M.NonTopLevelConstEnum.X); >use(M.NonTopLevelConstEnum.X) : any >use : (a: any) => any ->M.NonTopLevelConstEnum.X : M.NonTopLevelConstEnum ->M.NonTopLevelConstEnum : typeof M.NonTopLevelConstEnum -+>M.NonTopLevelConstEnum.X : NonTopLevelConstEnum.X ++>M.NonTopLevelConstEnum.X : NonTopLevelConstEnum +>M.NonTopLevelConstEnum : typeof NonTopLevelConstEnum >M : typeof M ->NonTopLevelConstEnum : typeof M.NonTopLevelConstEnum ->X : M.NonTopLevelConstEnum +>NonTopLevelConstEnum : typeof NonTopLevelConstEnum -+>X : NonTopLevelConstEnum.X ++>X : NonTopLevelConstEnum } module M { +>M : typeof M + export const enum NonTopLevelConstEnum { X } -->NonTopLevelConstEnum : NonTopLevelConstEnum -+>NonTopLevelConstEnum : NonTopLevelConstEnum.X + >NonTopLevelConstEnum : NonTopLevelConstEnum >X : NonTopLevelConstEnum.X - } diff --git a/testdata/baselines/reference/submodule/compiler/systemModuleConstEnumsSeparateCompilation.types b/testdata/baselines/reference/submodule/compiler/systemModuleConstEnumsSeparateCompilation.types index 40a1817adb..30a8c925c1 100644 --- a/testdata/baselines/reference/submodule/compiler/systemModuleConstEnumsSeparateCompilation.types +++ b/testdata/baselines/reference/submodule/compiler/systemModuleConstEnumsSeparateCompilation.types @@ -6,7 +6,7 @@ declare function use(a: any); >a : any const enum TopLevelConstEnum { X } ->TopLevelConstEnum : TopLevelConstEnum.X +>TopLevelConstEnum : TopLevelConstEnum >X : TopLevelConstEnum.X export function foo() { @@ -15,24 +15,24 @@ export function foo() { use(TopLevelConstEnum.X); >use(TopLevelConstEnum.X) : any >use : (a: any) => any ->TopLevelConstEnum.X : TopLevelConstEnum.X +>TopLevelConstEnum.X : TopLevelConstEnum >TopLevelConstEnum : typeof TopLevelConstEnum ->X : TopLevelConstEnum.X +>X : TopLevelConstEnum use(M.NonTopLevelConstEnum.X); >use(M.NonTopLevelConstEnum.X) : any >use : (a: any) => any ->M.NonTopLevelConstEnum.X : NonTopLevelConstEnum.X +>M.NonTopLevelConstEnum.X : NonTopLevelConstEnum >M.NonTopLevelConstEnum : typeof NonTopLevelConstEnum >M : typeof M >NonTopLevelConstEnum : typeof NonTopLevelConstEnum ->X : NonTopLevelConstEnum.X +>X : NonTopLevelConstEnum } module M { >M : typeof M export const enum NonTopLevelConstEnum { X } ->NonTopLevelConstEnum : NonTopLevelConstEnum.X +>NonTopLevelConstEnum : NonTopLevelConstEnum >X : NonTopLevelConstEnum.X } diff --git a/testdata/baselines/reference/submodule/compiler/systemModuleConstEnumsSeparateCompilation.types.diff b/testdata/baselines/reference/submodule/compiler/systemModuleConstEnumsSeparateCompilation.types.diff index b0d8838c8c..6ea75b4b44 100644 --- a/testdata/baselines/reference/submodule/compiler/systemModuleConstEnumsSeparateCompilation.types.diff +++ b/testdata/baselines/reference/submodule/compiler/systemModuleConstEnumsSeparateCompilation.types.diff @@ -1,43 +1,23 @@ --- old.systemModuleConstEnumsSeparateCompilation.types +++ new.systemModuleConstEnumsSeparateCompilation.types -@@= skipped -5, +5 lines =@@ - >a : any - - const enum TopLevelConstEnum { X } -->TopLevelConstEnum : TopLevelConstEnum -+>TopLevelConstEnum : TopLevelConstEnum.X - >X : TopLevelConstEnum.X - - export function foo() { -@@= skipped -9, +9 lines =@@ - use(TopLevelConstEnum.X); - >use(TopLevelConstEnum.X) : any - >use : (a: any) => any -->TopLevelConstEnum.X : TopLevelConstEnum -+>TopLevelConstEnum.X : TopLevelConstEnum.X - >TopLevelConstEnum : typeof TopLevelConstEnum -->X : TopLevelConstEnum -+>X : TopLevelConstEnum.X - +@@= skipped -21, +21 lines =@@ use(M.NonTopLevelConstEnum.X); >use(M.NonTopLevelConstEnum.X) : any >use : (a: any) => any ->M.NonTopLevelConstEnum.X : M.NonTopLevelConstEnum ->M.NonTopLevelConstEnum : typeof M.NonTopLevelConstEnum -+>M.NonTopLevelConstEnum.X : NonTopLevelConstEnum.X ++>M.NonTopLevelConstEnum.X : NonTopLevelConstEnum +>M.NonTopLevelConstEnum : typeof NonTopLevelConstEnum >M : typeof M ->NonTopLevelConstEnum : typeof M.NonTopLevelConstEnum ->X : M.NonTopLevelConstEnum +>NonTopLevelConstEnum : typeof NonTopLevelConstEnum -+>X : NonTopLevelConstEnum.X ++>X : NonTopLevelConstEnum } module M { +>M : typeof M + export const enum NonTopLevelConstEnum { X } -->NonTopLevelConstEnum : NonTopLevelConstEnum -+>NonTopLevelConstEnum : NonTopLevelConstEnum.X + >NonTopLevelConstEnum : NonTopLevelConstEnum >X : NonTopLevelConstEnum.X - } diff --git a/testdata/baselines/reference/submodule/compiler/systemModuleDeclarationMerging.types b/testdata/baselines/reference/submodule/compiler/systemModuleDeclarationMerging.types index 4deb702256..f2f0ead1cf 100644 --- a/testdata/baselines/reference/submodule/compiler/systemModuleDeclarationMerging.types +++ b/testdata/baselines/reference/submodule/compiler/systemModuleDeclarationMerging.types @@ -16,7 +16,7 @@ export module C { var x; } >x : any export enum E {} ->E : "systemModuleDeclarationMerging".E +>E : import("systemModuleDeclarationMerging").E export module E { var x; } >E : typeof E diff --git a/testdata/baselines/reference/submodule/compiler/systemModuleDeclarationMerging.types.diff b/testdata/baselines/reference/submodule/compiler/systemModuleDeclarationMerging.types.diff index 13d656d48f..dd8f050617 100644 --- a/testdata/baselines/reference/submodule/compiler/systemModuleDeclarationMerging.types.diff +++ b/testdata/baselines/reference/submodule/compiler/systemModuleDeclarationMerging.types.diff @@ -5,7 +5,7 @@ export enum E {} ->E : E -+>E : "systemModuleDeclarationMerging".E ++>E : import("systemModuleDeclarationMerging").E export module E { var x; } >E : typeof E diff --git a/testdata/baselines/reference/submodule/compiler/systemModuleNonTopLevelModuleMembers.types b/testdata/baselines/reference/submodule/compiler/systemModuleNonTopLevelModuleMembers.types index 062fea3499..e7d3cd1338 100644 --- a/testdata/baselines/reference/submodule/compiler/systemModuleNonTopLevelModuleMembers.types +++ b/testdata/baselines/reference/submodule/compiler/systemModuleNonTopLevelModuleMembers.types @@ -12,7 +12,7 @@ export function TopLevelFunction(): void {} >TopLevelFunction : () => void export enum TopLevelEnum {E} ->TopLevelEnum : TopLevelEnum.E +>TopLevelEnum : TopLevelEnum >E : TopLevelEnum.E export module TopLevelModule2 { @@ -29,6 +29,6 @@ export module TopLevelModule2 { >NonTopLevelFunction : () => void export enum NonTopLevelEnum {E} ->NonTopLevelEnum : NonTopLevelEnum.E +>NonTopLevelEnum : NonTopLevelEnum >E : NonTopLevelEnum.E } diff --git a/testdata/baselines/reference/submodule/compiler/systemModuleNonTopLevelModuleMembers.types.diff b/testdata/baselines/reference/submodule/compiler/systemModuleNonTopLevelModuleMembers.types.diff deleted file mode 100644 index 0d57db7d5e..0000000000 --- a/testdata/baselines/reference/submodule/compiler/systemModuleNonTopLevelModuleMembers.types.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.systemModuleNonTopLevelModuleMembers.types -+++ new.systemModuleNonTopLevelModuleMembers.types -@@= skipped -11, +11 lines =@@ - >TopLevelFunction : () => void - - export enum TopLevelEnum {E} -->TopLevelEnum : TopLevelEnum -+>TopLevelEnum : TopLevelEnum.E - >E : TopLevelEnum.E - - export module TopLevelModule2 { -@@= skipped -17, +17 lines =@@ - >NonTopLevelFunction : () => void - - export enum NonTopLevelEnum {E} -->NonTopLevelEnum : NonTopLevelEnum -+>NonTopLevelEnum : NonTopLevelEnum.E - >E : NonTopLevelEnum.E - } diff --git a/testdata/baselines/reference/submodule/compiler/this_inside-enum-should-not-be-allowed.types b/testdata/baselines/reference/submodule/compiler/this_inside-enum-should-not-be-allowed.types index 1d679b722c..c1140432a8 100644 --- a/testdata/baselines/reference/submodule/compiler/this_inside-enum-should-not-be-allowed.types +++ b/testdata/baselines/reference/submodule/compiler/this_inside-enum-should-not-be-allowed.types @@ -2,7 +2,7 @@ === this_inside-enum-should-not-be-allowed.ts === enum TopLevelEnum { ->TopLevelEnum : TopLevelEnum.ThisWasAllowedButShouldNotBe +>TopLevelEnum : TopLevelEnum ThisWasAllowedButShouldNotBe = this // Should not be allowed >ThisWasAllowedButShouldNotBe : TopLevelEnum.ThisWasAllowedButShouldNotBe @@ -13,7 +13,7 @@ module ModuleEnum { >ModuleEnum : typeof ModuleEnum enum EnumInModule { ->EnumInModule : EnumInModule.WasADifferentError +>EnumInModule : EnumInModule WasADifferentError = this // this was handled as if this was in a module >WasADifferentError : EnumInModule.WasADifferentError diff --git a/testdata/baselines/reference/submodule/compiler/this_inside-enum-should-not-be-allowed.types.diff b/testdata/baselines/reference/submodule/compiler/this_inside-enum-should-not-be-allowed.types.diff deleted file mode 100644 index 7b29246b75..0000000000 --- a/testdata/baselines/reference/submodule/compiler/this_inside-enum-should-not-be-allowed.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.this_inside-enum-should-not-be-allowed.types -+++ new.this_inside-enum-should-not-be-allowed.types -@@= skipped -1, +1 lines =@@ - - === this_inside-enum-should-not-be-allowed.ts === - enum TopLevelEnum { -->TopLevelEnum : TopLevelEnum -+>TopLevelEnum : TopLevelEnum.ThisWasAllowedButShouldNotBe - - ThisWasAllowedButShouldNotBe = this // Should not be allowed - >ThisWasAllowedButShouldNotBe : TopLevelEnum.ThisWasAllowedButShouldNotBe -@@= skipped -11, +11 lines =@@ - >ModuleEnum : typeof ModuleEnum - - enum EnumInModule { -->EnumInModule : EnumInModule -+>EnumInModule : EnumInModule.WasADifferentError - - WasADifferentError = this // this was handled as if this was in a module - >WasADifferentError : EnumInModule.WasADifferentError diff --git a/testdata/baselines/reference/submodule/compiler/tsxDefaultImports.types b/testdata/baselines/reference/submodule/compiler/tsxDefaultImports.types index 76229d8828..bf7d5730f8 100644 --- a/testdata/baselines/reference/submodule/compiler/tsxDefaultImports.types +++ b/testdata/baselines/reference/submodule/compiler/tsxDefaultImports.types @@ -2,7 +2,7 @@ === a.ts === enum SomeEnum { ->SomeEnum : SomeEnum.one +>SomeEnum : SomeEnum one, >one : SomeEnum.one @@ -21,10 +21,10 @@ import {default as Def} from "./a" >Def : typeof default let a = Def.E.one; ->a : SomeEnum.one ->Def.E.one : SomeEnum.one +>a : SomeEnum +>Def.E.one : SomeEnum >Def.E : typeof SomeEnum >Def : typeof default >E : typeof SomeEnum ->one : SomeEnum.one +>one : SomeEnum diff --git a/testdata/baselines/reference/submodule/compiler/tsxDefaultImports.types.diff b/testdata/baselines/reference/submodule/compiler/tsxDefaultImports.types.diff index eaa1f4102d..d4812796a9 100644 --- a/testdata/baselines/reference/submodule/compiler/tsxDefaultImports.types.diff +++ b/testdata/baselines/reference/submodule/compiler/tsxDefaultImports.types.diff @@ -1,13 +1,6 @@ --- old.tsxDefaultImports.types +++ new.tsxDefaultImports.types -@@= skipped -1, +1 lines =@@ - - === a.ts === - enum SomeEnum { -->SomeEnum : SomeEnum -+>SomeEnum : SomeEnum.one - - one, +@@= skipped -7, +7 lines =@@ >one : SomeEnum.one } export default class SomeClass { @@ -16,7 +9,7 @@ public static E = SomeEnum; >E : typeof SomeEnum -@@= skipped -15, +15 lines =@@ +@@= skipped -9, +9 lines =@@ === b.ts === import {default as Def} from "./a" @@ -26,14 +19,11 @@ +>Def : typeof default let a = Def.E.one; -->a : SomeEnum -->Def.E.one : SomeEnum -+>a : SomeEnum.one -+>Def.E.one : SomeEnum.one + >a : SomeEnum + >Def.E.one : SomeEnum >Def.E : typeof SomeEnum ->Def : typeof Def +>Def : typeof default >E : typeof SomeEnum -->one : SomeEnum -+>one : SomeEnum.one + >one : SomeEnum diff --git a/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=false).types b/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=false).types index 39833f1d2e..a97abd8ac9 100644 --- a/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=false).types +++ b/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=false).types @@ -13,18 +13,18 @@ function func1() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumA.Value : EnumA.Value +>EnumA.Value : EnumA >EnumA : typeof EnumA ->Value : EnumA.Value +>Value : EnumA console.log(EnumB.Value); >console.log(EnumB.Value) : void >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumB.Value : EnumB.Value +>EnumB.Value : EnumB >EnumB : typeof EnumB ->Value : EnumB.Value +>Value : EnumB return; @@ -36,26 +36,26 @@ function func1() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumA.Value : EnumA.Value +>EnumA.Value : EnumA >EnumA : typeof EnumA ->Value : EnumA.Value +>Value : EnumA console.log(EnumB.Value); >console.log(EnumB.Value) : void >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumB.Value : EnumB.Value +>EnumB.Value : EnumB >EnumB : typeof EnumB ->Value : EnumB.Value +>Value : EnumB } enum EnumA { Value } ->EnumA : EnumA.Value +>EnumA : EnumA >Value : EnumA.Value const enum EnumB { Value } ->EnumB : EnumB.Value +>EnumB : EnumB >Value : EnumB.Value } @@ -71,9 +71,9 @@ function func2() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumA.Value : EnumA.Value +>EnumA.Value : EnumA >EnumA : typeof EnumA ->Value : EnumA.Value +>Value : EnumA return; @@ -85,13 +85,13 @@ function func2() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumA.Value : EnumA.Value +>EnumA.Value : EnumA >EnumA : typeof EnumA ->Value : EnumA.Value +>Value : EnumA } enum EnumA { Value } ->EnumA : EnumA.Value +>EnumA : EnumA >Value : EnumA.Value } @@ -107,9 +107,9 @@ function func3() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumB.Value : EnumB.Value +>EnumB.Value : EnumB >EnumB : typeof EnumB ->Value : EnumB.Value +>Value : EnumB return; @@ -121,13 +121,13 @@ function func3() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumB.Value : EnumB.Value +>EnumB.Value : EnumB >EnumB : typeof EnumB ->Value : EnumB.Value +>Value : EnumB } const enum EnumB { Value } ->EnumB : EnumB.Value +>EnumB : EnumB >Value : EnumB.Value } @@ -180,9 +180,9 @@ function func5() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->Bar.A : Bar.A +>Bar.A : Bar >Bar : typeof Bar ->A : Bar.A +>A : Bar console.log(blah.prop); >console.log(blah.prop) : void @@ -221,9 +221,9 @@ function func5() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->Bar.A : Bar.A +>Bar.A : Bar >Bar : typeof Bar ->A : Bar.A +>A : Bar console.log(blah.prop); >console.log(blah.prop) : void @@ -259,7 +259,7 @@ function func5() { >1234 : 1234 enum Bar { A } ->Bar : Bar.A +>Bar : Bar >A : Bar.A class Foo { x = 1234 } diff --git a/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=false).types.diff b/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=false).types.diff deleted file mode 100644 index bfbd26abee..0000000000 --- a/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=false).types.diff +++ /dev/null @@ -1,149 +0,0 @@ ---- old.unreachableDeclarations(preserveconstenums=false).types -+++ new.unreachableDeclarations(preserveconstenums=false).types -@@= skipped -12, +12 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumA.Value : EnumA -+>EnumA.Value : EnumA.Value - >EnumA : typeof EnumA -->Value : EnumA -+>Value : EnumA.Value - - console.log(EnumB.Value); - >console.log(EnumB.Value) : void - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumB.Value : EnumB -+>EnumB.Value : EnumB.Value - >EnumB : typeof EnumB -->Value : EnumB -+>Value : EnumB.Value - - return; - -@@= skipped -23, +23 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumA.Value : EnumA -+>EnumA.Value : EnumA.Value - >EnumA : typeof EnumA -->Value : EnumA -+>Value : EnumA.Value - - console.log(EnumB.Value); - >console.log(EnumB.Value) : void - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumB.Value : EnumB -+>EnumB.Value : EnumB.Value - >EnumB : typeof EnumB -->Value : EnumB -+>Value : EnumB.Value - } - - enum EnumA { Value } -->EnumA : EnumA -+>EnumA : EnumA.Value - >Value : EnumA.Value - - const enum EnumB { Value } -->EnumB : EnumB -+>EnumB : EnumB.Value - >Value : EnumB.Value - } - -@@= skipped -35, +35 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumA.Value : EnumA -+>EnumA.Value : EnumA.Value - >EnumA : typeof EnumA -->Value : EnumA -+>Value : EnumA.Value - - return; - -@@= skipped -14, +14 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumA.Value : EnumA -+>EnumA.Value : EnumA.Value - >EnumA : typeof EnumA -->Value : EnumA -+>Value : EnumA.Value - } - - enum EnumA { Value } -->EnumA : EnumA -+>EnumA : EnumA.Value - >Value : EnumA.Value - } - -@@= skipped -22, +22 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumB.Value : EnumB -+>EnumB.Value : EnumB.Value - >EnumB : typeof EnumB -->Value : EnumB -+>Value : EnumB.Value - - return; - -@@= skipped -14, +14 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumB.Value : EnumB -+>EnumB.Value : EnumB.Value - >EnumB : typeof EnumB -->Value : EnumB -+>Value : EnumB.Value - } - - const enum EnumB { Value } -->EnumB : EnumB -+>EnumB : EnumB.Value - >Value : EnumB.Value - } - -@@= skipped -59, +59 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->Bar.A : Bar -+>Bar.A : Bar.A - >Bar : typeof Bar -->A : Bar -+>A : Bar.A - - console.log(blah.prop); - >console.log(blah.prop) : void -@@= skipped -41, +41 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->Bar.A : Bar -+>Bar.A : Bar.A - >Bar : typeof Bar -->A : Bar -+>A : Bar.A - - console.log(blah.prop); - >console.log(blah.prop) : void -@@= skipped -38, +38 lines =@@ - >1234 : 1234 - - enum Bar { A } -->Bar : Bar -+>Bar : Bar.A - >A : Bar.A - - class Foo { x = 1234 } diff --git a/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=true).types b/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=true).types index 39833f1d2e..a97abd8ac9 100644 --- a/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=true).types +++ b/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=true).types @@ -13,18 +13,18 @@ function func1() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumA.Value : EnumA.Value +>EnumA.Value : EnumA >EnumA : typeof EnumA ->Value : EnumA.Value +>Value : EnumA console.log(EnumB.Value); >console.log(EnumB.Value) : void >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumB.Value : EnumB.Value +>EnumB.Value : EnumB >EnumB : typeof EnumB ->Value : EnumB.Value +>Value : EnumB return; @@ -36,26 +36,26 @@ function func1() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumA.Value : EnumA.Value +>EnumA.Value : EnumA >EnumA : typeof EnumA ->Value : EnumA.Value +>Value : EnumA console.log(EnumB.Value); >console.log(EnumB.Value) : void >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumB.Value : EnumB.Value +>EnumB.Value : EnumB >EnumB : typeof EnumB ->Value : EnumB.Value +>Value : EnumB } enum EnumA { Value } ->EnumA : EnumA.Value +>EnumA : EnumA >Value : EnumA.Value const enum EnumB { Value } ->EnumB : EnumB.Value +>EnumB : EnumB >Value : EnumB.Value } @@ -71,9 +71,9 @@ function func2() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumA.Value : EnumA.Value +>EnumA.Value : EnumA >EnumA : typeof EnumA ->Value : EnumA.Value +>Value : EnumA return; @@ -85,13 +85,13 @@ function func2() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumA.Value : EnumA.Value +>EnumA.Value : EnumA >EnumA : typeof EnumA ->Value : EnumA.Value +>Value : EnumA } enum EnumA { Value } ->EnumA : EnumA.Value +>EnumA : EnumA >Value : EnumA.Value } @@ -107,9 +107,9 @@ function func3() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumB.Value : EnumB.Value +>EnumB.Value : EnumB >EnumB : typeof EnumB ->Value : EnumB.Value +>Value : EnumB return; @@ -121,13 +121,13 @@ function func3() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->EnumB.Value : EnumB.Value +>EnumB.Value : EnumB >EnumB : typeof EnumB ->Value : EnumB.Value +>Value : EnumB } const enum EnumB { Value } ->EnumB : EnumB.Value +>EnumB : EnumB >Value : EnumB.Value } @@ -180,9 +180,9 @@ function func5() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->Bar.A : Bar.A +>Bar.A : Bar >Bar : typeof Bar ->A : Bar.A +>A : Bar console.log(blah.prop); >console.log(blah.prop) : void @@ -221,9 +221,9 @@ function func5() { >console.log : (...data: any[]) => void >console : Console >log : (...data: any[]) => void ->Bar.A : Bar.A +>Bar.A : Bar >Bar : typeof Bar ->A : Bar.A +>A : Bar console.log(blah.prop); >console.log(blah.prop) : void @@ -259,7 +259,7 @@ function func5() { >1234 : 1234 enum Bar { A } ->Bar : Bar.A +>Bar : Bar >A : Bar.A class Foo { x = 1234 } diff --git a/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=true).types.diff b/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=true).types.diff deleted file mode 100644 index e952166a22..0000000000 --- a/testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=true).types.diff +++ /dev/null @@ -1,149 +0,0 @@ ---- old.unreachableDeclarations(preserveconstenums=true).types -+++ new.unreachableDeclarations(preserveconstenums=true).types -@@= skipped -12, +12 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumA.Value : EnumA -+>EnumA.Value : EnumA.Value - >EnumA : typeof EnumA -->Value : EnumA -+>Value : EnumA.Value - - console.log(EnumB.Value); - >console.log(EnumB.Value) : void - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumB.Value : EnumB -+>EnumB.Value : EnumB.Value - >EnumB : typeof EnumB -->Value : EnumB -+>Value : EnumB.Value - - return; - -@@= skipped -23, +23 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumA.Value : EnumA -+>EnumA.Value : EnumA.Value - >EnumA : typeof EnumA -->Value : EnumA -+>Value : EnumA.Value - - console.log(EnumB.Value); - >console.log(EnumB.Value) : void - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumB.Value : EnumB -+>EnumB.Value : EnumB.Value - >EnumB : typeof EnumB -->Value : EnumB -+>Value : EnumB.Value - } - - enum EnumA { Value } -->EnumA : EnumA -+>EnumA : EnumA.Value - >Value : EnumA.Value - - const enum EnumB { Value } -->EnumB : EnumB -+>EnumB : EnumB.Value - >Value : EnumB.Value - } - -@@= skipped -35, +35 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumA.Value : EnumA -+>EnumA.Value : EnumA.Value - >EnumA : typeof EnumA -->Value : EnumA -+>Value : EnumA.Value - - return; - -@@= skipped -14, +14 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumA.Value : EnumA -+>EnumA.Value : EnumA.Value - >EnumA : typeof EnumA -->Value : EnumA -+>Value : EnumA.Value - } - - enum EnumA { Value } -->EnumA : EnumA -+>EnumA : EnumA.Value - >Value : EnumA.Value - } - -@@= skipped -22, +22 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumB.Value : EnumB -+>EnumB.Value : EnumB.Value - >EnumB : typeof EnumB -->Value : EnumB -+>Value : EnumB.Value - - return; - -@@= skipped -14, +14 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->EnumB.Value : EnumB -+>EnumB.Value : EnumB.Value - >EnumB : typeof EnumB -->Value : EnumB -+>Value : EnumB.Value - } - - const enum EnumB { Value } -->EnumB : EnumB -+>EnumB : EnumB.Value - >Value : EnumB.Value - } - -@@= skipped -59, +59 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->Bar.A : Bar -+>Bar.A : Bar.A - >Bar : typeof Bar -->A : Bar -+>A : Bar.A - - console.log(blah.prop); - >console.log(blah.prop) : void -@@= skipped -41, +41 lines =@@ - >console.log : (...data: any[]) => void - >console : Console - >log : (...data: any[]) => void -->Bar.A : Bar -+>Bar.A : Bar.A - >Bar : typeof Bar -->A : Bar -+>A : Bar.A - - console.log(blah.prop); - >console.log(blah.prop) : void -@@= skipped -38, +38 lines =@@ - >1234 : 1234 - - enum Bar { A } -->Bar : Bar -+>Bar : Bar.A - >A : Bar.A - - class Foo { x = 1234 } diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.types b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.types index 3fe249de2c..29307c8dc8 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.types +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.types @@ -43,8 +43,8 @@ module X.Y { >Point : typeof Point export var Origin = new Point(0, 0); ->Origin : any ->new Point(0, 0) : any +>Origin : Point +>new Point(0, 0) : Point >Point : typeof Point >0 : 0 >0 : 0 @@ -54,25 +54,25 @@ module X.Y { === test.ts === //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); ->cl : any ->new X.Y.Point(1,1) : any ->X.Y.Point : any ->X.Y : any +>cl : Point +>new X.Y.Point(1,1) : Point +>X.Y.Point : typeof Point +>X.Y : typeof Y >X : typeof X ->Y : any ->Point : any +>Y : typeof Y +>Point : typeof Point >1 : 1 >1 : 1 var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? ->cl : any ->X.Y.Point.Origin : any ->X.Y.Point : any ->X.Y : any +>cl : Point +>X.Y.Point.Origin : Point +>X.Y.Point : typeof Point +>X.Y : typeof Y >X : typeof X ->Y : any ->Point : any ->Origin : any +>Y : typeof Y +>Point : typeof Point +>Origin : Point === simple.ts === diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.types.diff b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.types.diff index 4b85bca5c4..fd5c0e07a2 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.types.diff +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRoot.types.diff @@ -1,17 +1,6 @@ --- old.ClassAndModuleWithSameNameAndCommonRoot.types +++ new.ClassAndModuleWithSameNameAndCommonRoot.types -@@= skipped -42, +42 lines =@@ - >Point : typeof Point - - export var Origin = new Point(0, 0); -->Origin : Point -->new Point(0, 0) : Point -+>Origin : any -+>new Point(0, 0) : any - >Point : typeof Point - >0 : 0 - >0 : 0 -@@= skipped -11, +11 lines =@@ +@@= skipped -53, +53 lines =@@ === test.ts === //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); @@ -19,15 +8,15 @@ ->new X.Y.Point(1,1) : X.Y.Point ->X.Y.Point : typeof X.Y.Point ->X.Y : typeof X.Y -+>cl : any -+>new X.Y.Point(1,1) : any -+>X.Y.Point : any -+>X.Y : any ++>cl : Point ++>new X.Y.Point(1,1) : Point ++>X.Y.Point : typeof Point ++>X.Y : typeof Y >X : typeof X ->Y : typeof X.Y ->Point : typeof X.Y.Point -+>Y : any -+>Point : any ++>Y : typeof Y ++>Point : typeof Point >1 : 1 >1 : 1 @@ -36,17 +25,17 @@ ->X.Y.Point.Origin : X.Y.Point ->X.Y.Point : typeof X.Y.Point ->X.Y : typeof X.Y -+>cl : any -+>X.Y.Point.Origin : any -+>X.Y.Point : any -+>X.Y : any ++>cl : Point ++>X.Y.Point.Origin : Point ++>X.Y.Point : typeof Point ++>X.Y : typeof Y >X : typeof X ->Y : typeof X.Y ->Point : typeof X.Y.Point ->Origin : X.Y.Point -+>Y : any -+>Point : any -+>Origin : any ++>Y : typeof Y ++>Point : typeof Point ++>Origin : Point === simple.ts === diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.types b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.types index 614a2fbd5d..94f069fa56 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.types +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.types @@ -43,8 +43,8 @@ module X.Y { >Point : typeof Point export var Origin = new Point(0, 0); ->Origin : any ->new Point(0, 0) : any +>Origin : Point +>new Point(0, 0) : Point >Point : typeof Point >0 : 0 >0 : 0 @@ -54,25 +54,25 @@ module X.Y { === test.ts === //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); ->cl : any ->new X.Y.Point(1,1) : any ->X.Y.Point : any ->X.Y : any +>cl : Point +>new X.Y.Point(1,1) : Point +>X.Y.Point : typeof Point +>X.Y : typeof Y >X : typeof X ->Y : any ->Point : any +>Y : typeof Y +>Point : typeof Point >1 : 1 >1 : 1 var cl = X.Y.Point.Origin; // error not expected here same as bug 83996 ? ->cl : any ->X.Y.Point.Origin : any ->X.Y.Point : any ->X.Y : any +>cl : Point +>X.Y.Point.Origin : Point +>X.Y.Point : typeof Point +>X.Y : typeof Y >X : typeof X ->Y : any ->Point : any ->Origin : any +>Y : typeof Y +>Point : typeof Point +>Origin : Point === simple.ts === diff --git a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.types.diff b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.types.diff index cf7d9b5587..3c686f9562 100644 --- a/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.types.diff +++ b/testdata/baselines/reference/submodule/conformance/ClassAndModuleWithSameNameAndCommonRootES6.types.diff @@ -1,17 +1,6 @@ --- old.ClassAndModuleWithSameNameAndCommonRootES6.types +++ new.ClassAndModuleWithSameNameAndCommonRootES6.types -@@= skipped -42, +42 lines =@@ - >Point : typeof Point - - export var Origin = new Point(0, 0); -->Origin : Point -->new Point(0, 0) : Point -+>Origin : any -+>new Point(0, 0) : any - >Point : typeof Point - >0 : 0 - >0 : 0 -@@= skipped -11, +11 lines =@@ +@@= skipped -53, +53 lines =@@ === test.ts === //var cl: { x: number; y: number; } var cl = new X.Y.Point(1,1); @@ -19,15 +8,15 @@ ->new X.Y.Point(1,1) : X.Y.Point ->X.Y.Point : typeof X.Y.Point ->X.Y : typeof X.Y -+>cl : any -+>new X.Y.Point(1,1) : any -+>X.Y.Point : any -+>X.Y : any ++>cl : Point ++>new X.Y.Point(1,1) : Point ++>X.Y.Point : typeof Point ++>X.Y : typeof Y >X : typeof X ->Y : typeof X.Y ->Point : typeof X.Y.Point -+>Y : any -+>Point : any ++>Y : typeof Y ++>Point : typeof Point >1 : 1 >1 : 1 @@ -36,17 +25,17 @@ ->X.Y.Point.Origin : X.Y.Point ->X.Y.Point : typeof X.Y.Point ->X.Y : typeof X.Y -+>cl : any -+>X.Y.Point.Origin : any -+>X.Y.Point : any -+>X.Y : any ++>cl : Point ++>X.Y.Point.Origin : Point ++>X.Y.Point : typeof Point ++>X.Y : typeof Y >X : typeof X ->Y : typeof X.Y ->Point : typeof X.Y.Point ->Origin : X.Y.Point -+>Y : any -+>Point : any -+>Origin : any ++>Y : typeof Y ++>Point : typeof Point ++>Origin : Point === simple.ts === diff --git a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.types b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.types index 7b7da1732e..9176254088 100644 --- a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.types +++ b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.types @@ -9,8 +9,8 @@ module X.Y { >Point : typeof Point export var Origin = new Point(0, 0); ->Origin : any ->new Point(0, 0) : any +>Origin : Point +>new Point(0, 0) : Point >Point : typeof Point >0 : 0 >0 : 0 diff --git a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.types.diff b/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.types.diff deleted file mode 100644 index 29999988c4..0000000000 --- a/testdata/baselines/reference/submodule/conformance/ModuleAndClassWithSameNameAndCommonRoot.types.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- old.ModuleAndClassWithSameNameAndCommonRoot.types -+++ new.ModuleAndClassWithSameNameAndCommonRoot.types -@@= skipped -8, +8 lines =@@ - >Point : typeof Point - - export var Origin = new Point(0, 0); -->Origin : Point -->new Point(0, 0) : Point -+>Origin : any -+>new Point(0, 0) : any - >Point : typeof Point - >0 : 0 - >0 : 0 diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types index af653f3e26..f8d04f8e89 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types @@ -26,11 +26,11 @@ var x: number; var x = A.B.x; >x : number ->A.B.x : any ->A.B : any +>A.B.x : number +>A.B : typeof B >A : typeof A ->B : any ->x : any +>B : typeof B +>x : number module X.Y.Z { >X : typeof X diff --git a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types.diff b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types.diff index 54b3ba6c5a..90bfdd859b 100644 --- a/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types.diff +++ b/testdata/baselines/reference/submodule/conformance/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types.diff @@ -1,18 +1,14 @@ --- old.TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types +++ new.TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.types -@@= skipped -25, +25 lines =@@ - +@@= skipped -26, +26 lines =@@ var x = A.B.x; >x : number -->A.B.x : number + >A.B.x : number ->A.B : typeof A.B -+>A.B.x : any -+>A.B : any ++>A.B : typeof B >A : typeof A ->B : typeof A.B -->x : number -+>B : any -+>x : any ++>B : typeof B + >x : number module X.Y.Z { - >X : typeof X diff --git a/testdata/baselines/reference/submodule/conformance/ambientDeclarations.types b/testdata/baselines/reference/submodule/conformance/ambientDeclarations.types index 4db057dd24..f16d83b316 100644 --- a/testdata/baselines/reference/submodule/conformance/ambientDeclarations.types +++ b/testdata/baselines/reference/submodule/conformance/ambientDeclarations.types @@ -118,7 +118,7 @@ declare enum E2 { // Ambient enum members are always exported with or without export keyword declare enum E3 { ->E3 : E3.A +>E3 : E3 A >A : E3.A diff --git a/testdata/baselines/reference/submodule/conformance/ambientDeclarations.types.diff b/testdata/baselines/reference/submodule/conformance/ambientDeclarations.types.diff index ff33d55865..5b2bddde3b 100644 --- a/testdata/baselines/reference/submodule/conformance/ambientDeclarations.types.diff +++ b/testdata/baselines/reference/submodule/conformance/ambientDeclarations.types.diff @@ -8,12 +8,3 @@ >q : T[] // Ambient class -@@= skipped -62, +63 lines =@@ - - // Ambient enum members are always exported with or without export keyword - declare enum E3 { -->E3 : E3 -+>E3 : E3.A - - A - >A : E3.A diff --git a/testdata/baselines/reference/submodule/conformance/ambientErrors.types b/testdata/baselines/reference/submodule/conformance/ambientErrors.types index 5520b87fe0..53b8177da4 100644 --- a/testdata/baselines/reference/submodule/conformance/ambientErrors.types +++ b/testdata/baselines/reference/submodule/conformance/ambientErrors.types @@ -45,7 +45,7 @@ declare function fn4() { }; // Ambient enum with non - integer literal constant member declare enum E1 { ->E1 : E1.y +>E1 : E1 y = 4.23 >y : E1.y @@ -54,7 +54,7 @@ declare enum E1 { // Ambient enum with computer member declare enum E2 { ->E2 : E2.x +>E2 : E2 x = 'foo'.length >x : E2.x diff --git a/testdata/baselines/reference/submodule/conformance/ambientErrors.types.diff b/testdata/baselines/reference/submodule/conformance/ambientErrors.types.diff index aea7e1c340..1d2f12af55 100644 --- a/testdata/baselines/reference/submodule/conformance/ambientErrors.types.diff +++ b/testdata/baselines/reference/submodule/conformance/ambientErrors.types.diff @@ -1,24 +1,6 @@ --- old.ambientErrors.types +++ new.ambientErrors.types -@@= skipped -44, +44 lines =@@ - - // Ambient enum with non - integer literal constant member - declare enum E1 { -->E1 : E1 -+>E1 : E1.y - - y = 4.23 - >y : E1.y -@@= skipped -9, +9 lines =@@ - - // Ambient enum with computer member - declare enum E2 { -->E2 : E2 -+>E2 : E2.x - - x = 'foo'.length - >x : E2.x -@@= skipped -42, +42 lines =@@ +@@= skipped -95, +95 lines =@@ // Ambient external module not in the global module module M2 { diff --git a/testdata/baselines/reference/submodule/conformance/ambientInsideNonAmbientExternalModule.types b/testdata/baselines/reference/submodule/conformance/ambientInsideNonAmbientExternalModule.types index 64c78f8099..29e941ccb6 100644 --- a/testdata/baselines/reference/submodule/conformance/ambientInsideNonAmbientExternalModule.types +++ b/testdata/baselines/reference/submodule/conformance/ambientInsideNonAmbientExternalModule.types @@ -11,7 +11,7 @@ export declare class C { } >C : C export declare enum E { } ->E : "ambientInsideNonAmbientExternalModule".E +>E : import("ambientInsideNonAmbientExternalModule").E export declare module M { } >M : any diff --git a/testdata/baselines/reference/submodule/conformance/ambientInsideNonAmbientExternalModule.types.diff b/testdata/baselines/reference/submodule/conformance/ambientInsideNonAmbientExternalModule.types.diff index 24ab031f6e..0a5cb290e7 100644 --- a/testdata/baselines/reference/submodule/conformance/ambientInsideNonAmbientExternalModule.types.diff +++ b/testdata/baselines/reference/submodule/conformance/ambientInsideNonAmbientExternalModule.types.diff @@ -5,7 +5,7 @@ export declare enum E { } ->E : E -+>E : "ambientInsideNonAmbientExternalModule".E ++>E : import("ambientInsideNonAmbientExternalModule").E export declare module M { } +>M : any diff --git a/testdata/baselines/reference/submodule/conformance/anyAssignabilityInInheritance.types b/testdata/baselines/reference/submodule/conformance/anyAssignabilityInInheritance.types index 1b3dc04a41..37f4d1cb16 100644 --- a/testdata/baselines/reference/submodule/conformance/anyAssignabilityInInheritance.types +++ b/testdata/baselines/reference/submodule/conformance/anyAssignabilityInInheritance.types @@ -206,15 +206,15 @@ var r3 = foo3(a); // any >a : any enum E { A } ->E : E.A +>E : E >A : E.A declare function foo14(x: E): E; ->foo14 : { (x: E.A): E.A; (x: any): any; } ->x : E.A +>foo14 : { (x: E): E; (x: any): any; } +>x : E declare function foo14(x: any): any; ->foo14 : { (x: E.A): E.A; (x: any): any; } +>foo14 : { (x: E): E; (x: any): any; } >x : any var r3 = foo3(a); // any diff --git a/testdata/baselines/reference/submodule/conformance/anyAssignabilityInInheritance.types.diff b/testdata/baselines/reference/submodule/conformance/anyAssignabilityInInheritance.types.diff index 9e02fbfe22..62edd1bbc5 100644 --- a/testdata/baselines/reference/submodule/conformance/anyAssignabilityInInheritance.types.diff +++ b/testdata/baselines/reference/submodule/conformance/anyAssignabilityInInheritance.types.diff @@ -35,27 +35,7 @@ >x : T declare function foo13(x: any): any; -@@= skipped -14, +16 lines =@@ - >a : any - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - declare function foo14(x: E): E; -->foo14 : { (x: E): E; (x: any): any; } -->x : E -+>foo14 : { (x: E.A): E.A; (x: any): any; } -+>x : E.A - - declare function foo14(x: any): any; -->foo14 : { (x: E): E; (x: any): any; } -+>foo14 : { (x: E.A): E.A; (x: any): any; } - >x : any - - var r3 = foo3(a); // any -@@= skipped -30, +30 lines =@@ +@@= skipped -44, +46 lines =@@ declare function foo15(x: typeof f): typeof f; >foo15 : { (x: typeof f): typeof f; (x: any): any; } >x : typeof f diff --git a/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType.types b/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType.types index b83306e9dd..fda56cac0d 100644 --- a/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType.types +++ b/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType.types @@ -23,11 +23,11 @@ var ai: I; >ai : I enum E { A } ->E : E.A +>E : E >A : E.A var ae: E; ->ae : E.A +>ae : E var b: number = a; >b : number @@ -86,7 +86,7 @@ ai = a; ae = a; >ae = a : any ->ae : E.A +>ae : E >a : any var m: number[] = a; diff --git a/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType.types.diff b/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType.types.diff index 6f5350654b..0b2a706dc9 100644 --- a/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType.types.diff +++ b/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType.types.diff @@ -9,30 +9,7 @@ foo: string; >foo : string } -@@= skipped -7, +9 lines =@@ - >ai : I - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - var ae: E; -->ae : E -+>ae : E.A - - var b: number = a; - >b : number -@@= skipped -63, +63 lines =@@ - - ae = a; - >ae = a : any -->ae : E -+>ae : E.A - >a : any - - var m: number[] = a; -@@= skipped -14, +14 lines =@@ +@@= skipped -84, +86 lines =@@ var o: (x: T) => T = a; >o : (x: T) => T diff --git a/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType2.types b/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType2.types index 691efeb4dc..f03a709353 100644 --- a/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType2.types +++ b/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType2.types @@ -158,7 +158,7 @@ interface I13 { enum E { A } ->E : E.A +>E : E >A : E.A interface I14 { diff --git a/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType2.types.diff b/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType2.types.diff index 6f92f48794..3076336b10 100644 --- a/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType2.types.diff +++ b/testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType2.types.diff @@ -124,12 +124,7 @@ >x : T foo: any; -@@= skipped -10, +13 lines =@@ - - - enum E { A } -->E : E -+>E : E.A +@@= skipped -14, +17 lines =@@ >A : E.A interface I14 { @@ -138,7 +133,7 @@ [x: string]: E; >x : string -@@= skipped -23, +25 lines =@@ +@@= skipped -19, +21 lines =@@ >1 : 1 } interface I15 { diff --git a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.types b/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.types index 93c99f462f..33148ac927 100644 --- a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.types +++ b/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.types @@ -18,10 +18,10 @@ namespace >namespace : number a.b.c ->a.b.c : any ->a.b : any +>a.b.c : number +>a.b : typeof b >a : typeof a ->b : any ->c : any +>b : typeof b +>c : number { } diff --git a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.types.diff b/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.types.diff index c0980f7765..44ae4d66db 100644 --- a/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.types.diff +++ b/testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace05.types.diff @@ -1,17 +1,14 @@ --- old.asiPreventsParsingAsNamespace05.types +++ new.asiPreventsParsingAsNamespace05.types -@@= skipped -17, +17 lines =@@ - >namespace : number +@@= skipped -18, +18 lines =@@ a.b.c -->a.b.c : number + >a.b.c : number ->a.b : typeof a.b -+>a.b.c : any -+>a.b : any ++>a.b : typeof b >a : typeof a ->b : typeof a.b -->c : number -+>b : any -+>c : any ++>b : typeof b + >c : number { } diff --git a/testdata/baselines/reference/submodule/conformance/assignAnyToEveryType.types b/testdata/baselines/reference/submodule/conformance/assignAnyToEveryType.types index 64bd15932f..7583a6e517 100644 --- a/testdata/baselines/reference/submodule/conformance/assignAnyToEveryType.types +++ b/testdata/baselines/reference/submodule/conformance/assignAnyToEveryType.types @@ -40,25 +40,25 @@ f = x; >x : any enum E { ->E : E.A +>E : E A >A : E.A } var g: E = x; ->g : E.A +>g : E >x : any var g2 = E.A; ->g2 : E.A ->E.A : E.A +>g2 : E +>E.A : E >E : typeof E ->A : E.A +>A : E g2 = x; >g2 = x : any ->g2 : E.A +>g2 : E >x : any class C { diff --git a/testdata/baselines/reference/submodule/conformance/assignAnyToEveryType.types.diff b/testdata/baselines/reference/submodule/conformance/assignAnyToEveryType.types.diff index ad0ccf61ce..42701d0d09 100644 --- a/testdata/baselines/reference/submodule/conformance/assignAnyToEveryType.types.diff +++ b/testdata/baselines/reference/submodule/conformance/assignAnyToEveryType.types.diff @@ -1,38 +1,6 @@ --- old.assignAnyToEveryType.types +++ new.assignAnyToEveryType.types -@@= skipped -39, +39 lines =@@ - >x : any - - enum E { -->E : E -+>E : E.A - - A - >A : E.A - } - - var g: E = x; -->g : E -+>g : E.A - >x : any - - var g2 = E.A; -->g2 : E -->E.A : E -+>g2 : E.A -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - g2 = x; - >g2 = x : any -->g2 : E -+>g2 : E.A - >x : any - - class C { -@@= skipped -33, +33 lines =@@ +@@= skipped -72, +72 lines =@@ >x : any interface I { diff --git a/testdata/baselines/reference/submodule/conformance/assignEveryTypeToAny.types b/testdata/baselines/reference/submodule/conformance/assignEveryTypeToAny.types index 6a4d6d945a..f73dd3f229 100644 --- a/testdata/baselines/reference/submodule/conformance/assignEveryTypeToAny.types +++ b/testdata/baselines/reference/submodule/conformance/assignEveryTypeToAny.types @@ -74,29 +74,29 @@ x = e2; >e2 : any enum E { ->E : E.A +>E : E A >A : E.A } x = E.A; ->x = E.A : E.A +>x = E.A : E >x : any ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E var f = E.A; ->f : E.A ->E.A : E.A +>f : E +>E.A : E >E : typeof E ->A : E.A +>A : E x = f; ->x = f : E.A +>x = f : E >x : any ->f : E.A +>f : E interface I { >I : I diff --git a/testdata/baselines/reference/submodule/conformance/assignEveryTypeToAny.types.diff b/testdata/baselines/reference/submodule/conformance/assignEveryTypeToAny.types.diff index 9a1006ee2d..e7da1bb4b3 100644 --- a/testdata/baselines/reference/submodule/conformance/assignEveryTypeToAny.types.diff +++ b/testdata/baselines/reference/submodule/conformance/assignEveryTypeToAny.types.diff @@ -8,42 +8,8 @@ x = e2; >x = e2 : any -@@= skipped -8, +7 lines =@@ - >e2 : any - - enum E { -->E : E -+>E : E.A - - A - >A : E.A - } - - x = E.A; -->x = E.A : E -+>x = E.A : E.A - >x : any -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - var f = E.A; -->f : E -->E.A : E -+>f : E.A -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - x = f; -->x = f : E -+>x = f : E.A - >x : any -->f : E -+>f : E.A +@@= skipped -33, +32 lines =@@ + >f : E interface I { +>I : I @@ -51,7 +17,7 @@ foo: string; >foo : string } -@@= skipped -61, +63 lines =@@ +@@= skipped -36, +38 lines =@@ >i : () => string x = { f() { return 1; } } diff --git a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.types b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.types index 1bdf0b3abd..e1c046a1d9 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.types +++ b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.types @@ -2,13 +2,13 @@ === assignmentCompatWithEnumIndexer.ts === enum E { ->E : E.A +>E : E A >A : E.A } let foo: Record = {} ->foo : Record +>foo : Record >{} : {} diff --git a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.types.diff b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.types.diff deleted file mode 100644 index c879fa2575..0000000000 --- a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.types.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.assignmentCompatWithEnumIndexer.types -+++ new.assignmentCompatWithEnumIndexer.types -@@= skipped -1, +1 lines =@@ - - === assignmentCompatWithEnumIndexer.ts === - enum E { -->E : E -+>E : E.A - - A - >A : E.A - } - - let foo: Record = {} -->foo : Record -+>foo : Record - >{} : {} - diff --git a/testdata/baselines/reference/submodule/conformance/assignmentToParenthesizedIdentifiers.types b/testdata/baselines/reference/submodule/conformance/assignmentToParenthesizedIdentifiers.types index 78731aeb2b..f857da35ca 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentToParenthesizedIdentifiers.types +++ b/testdata/baselines/reference/submodule/conformance/assignmentToParenthesizedIdentifiers.types @@ -293,7 +293,7 @@ function fn2(x: number, y: { t: number }) { } enum E { ->E : E.A +>E : E A >A : E.A diff --git a/testdata/baselines/reference/submodule/conformance/assignmentToParenthesizedIdentifiers.types.diff b/testdata/baselines/reference/submodule/conformance/assignmentToParenthesizedIdentifiers.types.diff index b5be6c6532..26605c44ca 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentToParenthesizedIdentifiers.types.diff +++ b/testdata/baselines/reference/submodule/conformance/assignmentToParenthesizedIdentifiers.types.diff @@ -73,12 +73,3 @@ >{ x: '' } : { x: string; } >x : string >'' : "" -@@= skipped -181, +181 lines =@@ - } - - enum E { -->E : E -+>E : E.A - - A - >A : E.A diff --git a/testdata/baselines/reference/submodule/conformance/assignments.types b/testdata/baselines/reference/submodule/conformance/assignments.types index 9492d43eba..2265f1bfe4 100644 --- a/testdata/baselines/reference/submodule/conformance/assignments.types +++ b/testdata/baselines/reference/submodule/conformance/assignments.types @@ -25,7 +25,7 @@ C = null; // Error >C : any enum E { A } ->E : E.A +>E : E >A : E.A E = null; // Error diff --git a/testdata/baselines/reference/submodule/conformance/assignments.types.diff b/testdata/baselines/reference/submodule/conformance/assignments.types.diff index 454440789c..0dd1d8fc17 100644 --- a/testdata/baselines/reference/submodule/conformance/assignments.types.diff +++ b/testdata/baselines/reference/submodule/conformance/assignments.types.diff @@ -9,16 +9,7 @@ M = null; // Error >M = null : null >M : any -@@= skipped -12, +14 lines =@@ - >C : any - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - E = null; // Error -@@= skipped -37, +37 lines =@@ +@@= skipped -49, +51 lines =@@ } interface I { } diff --git a/testdata/baselines/reference/submodule/conformance/asyncEnum_es5.types b/testdata/baselines/reference/submodule/conformance/asyncEnum_es5.types index 7e3ee5059b..53bf30b7e5 100644 --- a/testdata/baselines/reference/submodule/conformance/asyncEnum_es5.types +++ b/testdata/baselines/reference/submodule/conformance/asyncEnum_es5.types @@ -2,7 +2,7 @@ === asyncEnum_es5.ts === async enum E { ->E : E.Value +>E : E Value >Value : E.Value diff --git a/testdata/baselines/reference/submodule/conformance/asyncEnum_es5.types.diff b/testdata/baselines/reference/submodule/conformance/asyncEnum_es5.types.diff deleted file mode 100644 index b54a82e2c5..0000000000 --- a/testdata/baselines/reference/submodule/conformance/asyncEnum_es5.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.asyncEnum_es5.types -+++ new.asyncEnum_es5.types -@@= skipped -1, +1 lines =@@ - - === asyncEnum_es5.ts === - async enum E { -->E : E -+>E : E.Value - - Value - >Value : E.Value diff --git a/testdata/baselines/reference/submodule/conformance/asyncEnum_es6.types b/testdata/baselines/reference/submodule/conformance/asyncEnum_es6.types index eacee13cad..1754b9b4ed 100644 --- a/testdata/baselines/reference/submodule/conformance/asyncEnum_es6.types +++ b/testdata/baselines/reference/submodule/conformance/asyncEnum_es6.types @@ -2,7 +2,7 @@ === asyncEnum_es6.ts === async enum E { ->E : E.Value +>E : E Value >Value : E.Value diff --git a/testdata/baselines/reference/submodule/conformance/asyncEnum_es6.types.diff b/testdata/baselines/reference/submodule/conformance/asyncEnum_es6.types.diff deleted file mode 100644 index a6a09e6676..0000000000 --- a/testdata/baselines/reference/submodule/conformance/asyncEnum_es6.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.asyncEnum_es6.types -+++ new.asyncEnum_es6.types -@@= skipped -1, +1 lines =@@ - - === asyncEnum_es6.ts === - async enum E { -->E : E -+>E : E.Value - - Value - >Value : E.Value diff --git a/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.types b/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.types index bda059ada5..a0e6d58600 100644 --- a/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.types +++ b/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.types @@ -17,11 +17,11 @@ function f3(x: number): boolean { return true; } >true : true enum E1 { one } ->E1 : E1.one +>E1 : E1 >one : E1.one enum E2 { two } ->E2 : E2.two +>E2 : E2 >two : E2.two @@ -31,13 +31,13 @@ var t1: [(x: number) => string, (x: number) => number]; >x : number var t2: [E1, E2]; ->t2 : [E1.one, E2.two] +>t2 : [E1, E2] var t3: [number, any]; >t3 : [number, any] var t4: [E1, E2, number]; ->t4 : [E1.one, E2.two, number] +>t4 : [E1, E2, number] // no error t1 = [f1, f2]; @@ -48,15 +48,15 @@ t1 = [f1, f2]; >f2 : (x: number) => number t2 = [E1.one, E2.two]; ->t2 = [E1.one, E2.two] : [E1.one, E2.two] ->t2 : [E1.one, E2.two] ->[E1.one, E2.two] : [E1.one, E2.two] ->E1.one : E1.one +>t2 = [E1.one, E2.two] : [E1, E2] +>t2 : [E1, E2] +>[E1.one, E2.two] : [E1, E2] +>E1.one : E1 >E1 : typeof E1 ->one : E1.one ->E2.two : E2.two +>one : E1 +>E2.two : E2 >E2 : typeof E2 ->two : E2.two +>two : E2 t3 = [5, undefined]; >t3 = [5, undefined] : [number, undefined] @@ -66,15 +66,15 @@ t3 = [5, undefined]; >undefined : undefined t4 = [E1.one, E2.two, 20]; ->t4 = [E1.one, E2.two, 20] : [E1.one, E2.two, number] ->t4 : [E1.one, E2.two, number] ->[E1.one, E2.two, 20] : [E1.one, E2.two, number] ->E1.one : E1.one +>t4 = [E1.one, E2.two, 20] : [E1, E2, number] +>t4 : [E1, E2, number] +>[E1.one, E2.two, 20] : [E1, E2, number] +>E1.one : E1 >E1 : typeof E1 ->one : E1.one ->E2.two : E2.two +>one : E1 +>E2.two : E2 >E2 : typeof E2 ->two : E2.two +>two : E2 >20 : 20 var e1 = t1[2]; // {} @@ -86,7 +86,7 @@ var e1 = t1[2]; // {} var e2 = t2[2]; // {} >e2 : undefined >t2[2] : undefined ->t2 : [E1.one, E2.two] +>t2 : [E1, E2] >2 : 2 var e3 = t3[2]; // any @@ -98,6 +98,6 @@ var e3 = t3[2]; // any var e4 = t4[3]; // number >e4 : undefined >t4[3] : undefined ->t4 : [E1.one, E2.two, number] +>t4 : [E1, E2, number] >3 : 3 diff --git a/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.types.diff b/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.types.diff deleted file mode 100644 index 2d81ac56bc..0000000000 --- a/testdata/baselines/reference/submodule/conformance/bestCommonTypeOfTuple.types.diff +++ /dev/null @@ -1,95 +0,0 @@ ---- old.bestCommonTypeOfTuple.types -+++ new.bestCommonTypeOfTuple.types -@@= skipped -16, +16 lines =@@ - >true : true - - enum E1 { one } -->E1 : E1 -+>E1 : E1.one - >one : E1.one - - enum E2 { two } -->E2 : E2 -+>E2 : E2.two - >two : E2.two - - -@@= skipped -14, +14 lines =@@ - >x : number - - var t2: [E1, E2]; -->t2 : [E1, E2] -+>t2 : [E1.one, E2.two] - - var t3: [number, any]; - >t3 : [number, any] - - var t4: [E1, E2, number]; -->t4 : [E1, E2, number] -+>t4 : [E1.one, E2.two, number] - - // no error - t1 = [f1, f2]; -@@= skipped -17, +17 lines =@@ - >f2 : (x: number) => number - - t2 = [E1.one, E2.two]; -->t2 = [E1.one, E2.two] : [E1, E2] -->t2 : [E1, E2] -->[E1.one, E2.two] : [E1, E2] -->E1.one : E1 -+>t2 = [E1.one, E2.two] : [E1.one, E2.two] -+>t2 : [E1.one, E2.two] -+>[E1.one, E2.two] : [E1.one, E2.two] -+>E1.one : E1.one - >E1 : typeof E1 -->one : E1 -->E2.two : E2 -+>one : E1.one -+>E2.two : E2.two - >E2 : typeof E2 -->two : E2 -+>two : E2.two - - t3 = [5, undefined]; - >t3 = [5, undefined] : [number, undefined] -@@= skipped -18, +18 lines =@@ - >undefined : undefined - - t4 = [E1.one, E2.two, 20]; -->t4 = [E1.one, E2.two, 20] : [E1, E2, number] -->t4 : [E1, E2, number] -->[E1.one, E2.two, 20] : [E1, E2, number] -->E1.one : E1 -+>t4 = [E1.one, E2.two, 20] : [E1.one, E2.two, number] -+>t4 : [E1.one, E2.two, number] -+>[E1.one, E2.two, 20] : [E1.one, E2.two, number] -+>E1.one : E1.one - >E1 : typeof E1 -->one : E1 -->E2.two : E2 -+>one : E1.one -+>E2.two : E2.two - >E2 : typeof E2 -->two : E2 -+>two : E2.two - >20 : 20 - - var e1 = t1[2]; // {} -@@= skipped -20, +20 lines =@@ - var e2 = t2[2]; // {} - >e2 : undefined - >t2[2] : undefined -->t2 : [E1, E2] -+>t2 : [E1.one, E2.two] - >2 : 2 - - var e3 = t3[2]; // any -@@= skipped -12, +12 lines =@@ - var e4 = t4[3]; // number - >e4 : undefined - >t4[3] : undefined -->t4 : [E1, E2, number] -+>t4 : [E1.one, E2.two, number] - >3 : 3 - diff --git a/testdata/baselines/reference/submodule/conformance/callSignatureWithoutReturnTypeAnnotationInference.types b/testdata/baselines/reference/submodule/conformance/callSignatureWithoutReturnTypeAnnotationInference.types index 7860565551..00fccdb0a5 100644 --- a/testdata/baselines/reference/submodule/conformance/callSignatureWithoutReturnTypeAnnotationInference.types +++ b/testdata/baselines/reference/submodule/conformance/callSignatureWithoutReturnTypeAnnotationInference.types @@ -273,7 +273,7 @@ var r14 = foo14(); >foo14 : () => typeof c1 enum e1 { A } ->e1 : e1.A +>e1 : e1 >A : e1.A module e1 { export var y = 1; } diff --git a/testdata/baselines/reference/submodule/conformance/callSignatureWithoutReturnTypeAnnotationInference.types.diff b/testdata/baselines/reference/submodule/conformance/callSignatureWithoutReturnTypeAnnotationInference.types.diff index f563769aac..f3a847ce91 100644 --- a/testdata/baselines/reference/submodule/conformance/callSignatureWithoutReturnTypeAnnotationInference.types.diff +++ b/testdata/baselines/reference/submodule/conformance/callSignatureWithoutReturnTypeAnnotationInference.types.diff @@ -55,12 +55,3 @@ y: number; >y : number } -@@= skipped -69, +73 lines =@@ - >foo14 : () => typeof c1 - - enum e1 { A } -->e1 : e1 -+>e1 : e1.A - >A : e1.A - - module e1 { export var y = 1; } diff --git a/testdata/baselines/reference/submodule/conformance/castingTuple.types b/testdata/baselines/reference/submodule/conformance/castingTuple.types index 6b9eb67d2f..2cf0710ddf 100644 --- a/testdata/baselines/reference/submodule/conformance/castingTuple.types +++ b/testdata/baselines/reference/submodule/conformance/castingTuple.types @@ -28,11 +28,11 @@ class F extends A { f }; >f : any enum E1 { one } ->E1 : E1.one +>E1 : E1 >one : E1.one enum E2 { one } ->E2 : E2.one +>E2 : E2 >one : E2.one // no error @@ -93,19 +93,19 @@ var eleFromCDA2 = classCDATuple[5]; // C | D | A >5 : 5 var t10: [E1, E2] = [E1.one, E2.one]; ->t10 : [E1.one, E2.one] ->[E1.one, E2.one] : [E1.one, E2.one] ->E1.one : E1.one +>t10 : [E1, E2] +>[E1.one, E2.one] : [E1, E2] +>E1.one : E1 >E1 : typeof E1 ->one : E1.one ->E2.one : E2.one +>one : E1 +>E2.one : E2 >E2 : typeof E2 ->one : E2.one +>one : E2 var t11 = <[number, number]>t10; >t11 : [number, number] ><[number, number]>t10 : [number, number] ->t10 : [E1.one, E2.one] +>t10 : [E1, E2] var array1 = <{}[]>emptyObjTuple; >array1 : {}[] diff --git a/testdata/baselines/reference/submodule/conformance/castingTuple.types.diff b/testdata/baselines/reference/submodule/conformance/castingTuple.types.diff index f8b0fa79bc..3105aff984 100644 --- a/testdata/baselines/reference/submodule/conformance/castingTuple.types.diff +++ b/testdata/baselines/reference/submodule/conformance/castingTuple.types.diff @@ -9,44 +9,3 @@ class A { a = 10; } >A : A >a : number -@@= skipped -24, +26 lines =@@ - >f : any - - enum E1 { one } -->E1 : E1 -+>E1 : E1.one - >one : E1.one - - enum E2 { one } -->E2 : E2 -+>E2 : E2.one - >one : E2.one - - // no error -@@= skipped -65, +65 lines =@@ - >5 : 5 - - var t10: [E1, E2] = [E1.one, E2.one]; -->t10 : [E1, E2] -->[E1.one, E2.one] : [E1, E2] -->E1.one : E1 -+>t10 : [E1.one, E2.one] -+>[E1.one, E2.one] : [E1.one, E2.one] -+>E1.one : E1.one - >E1 : typeof E1 -->one : E1 -->E2.one : E2 -+>one : E1.one -+>E2.one : E2.one - >E2 : typeof E2 -->one : E2 -+>one : E2.one - - var t11 = <[number, number]>t10; - >t11 : [number, number] - ><[number, number]>t10 : [number, number] -->t10 : [E1, E2] -+>t10 : [E1.one, E2.one] - - var array1 = <{}[]>emptyObjTuple; - >array1 : {}[] diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.types b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.types index 3768941189..4589bddf95 100644 --- a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.types +++ b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.types @@ -29,14 +29,14 @@ var c = new C(1); >1 : 1 var d = new D(1); // error ->d : D ->new D(1) : D +>d : any +>new D(1) : any >D : typeof D >1 : 1 var e = new E(1); // error ->e : E ->new E(1) : E +>e : any +>new E(1) : any >E : typeof E >1 : 1 @@ -74,14 +74,14 @@ module Generic { >1 : 1 var d = new D(1); // error ->d : D ->new D(1) : D +>d : any +>new D(1) : any >D : typeof D >1 : 1 var e = new E(1); // error ->e : E ->new E(1) : E +>e : any +>new E(1) : any >E : typeof E >1 : 1 } diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.types.diff b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.types.diff index 0d9b12c407..faa705620e 100644 --- a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.types.diff +++ b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility.types.diff @@ -1,25 +1,6 @@ --- old.classConstructorAccessibility.types +++ new.classConstructorAccessibility.types -@@= skipped -28, +28 lines =@@ - >1 : 1 - - var d = new D(1); // error -->d : any -->new D(1) : any -+>d : D -+>new D(1) : D - >D : typeof D - >1 : 1 - - var e = new E(1); // error -->e : any -->new E(1) : any -+>e : E -+>new E(1) : E - >E : typeof E - >1 : 1 - -@@= skipped -16, +16 lines =@@ +@@= skipped -44, +44 lines =@@ class C { >C : C @@ -43,22 +24,3 @@ protected constructor(public x: T) { } >x : T -@@= skipped -12, +13 lines =@@ - >1 : 1 - - var d = new D(1); // error -->d : any -->new D(1) : any -+>d : D -+>new D(1) : D - >D : typeof D - >1 : 1 - - var e = new E(1); // error -->e : any -->new E(1) : any -+>e : E -+>new E(1) : E - >E : typeof E - >1 : 1 - } diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.types b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.types index eb0d254a66..ebad2df2a5 100644 --- a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.types +++ b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.types @@ -122,13 +122,13 @@ class DerivedC extends BaseC { // error createBaseInstance() { new BaseC(10); } // error >createBaseInstance : () => void ->new BaseC(10) : BaseC +>new BaseC(10) : any >BaseC : typeof BaseC >10 : 10 static staticBaseInstance() { new BaseC(11); } // error >staticBaseInstance : () => void ->new BaseC(11) : BaseC +>new BaseC(11) : any >BaseC : typeof BaseC >11 : 11 } @@ -140,14 +140,14 @@ var ba = new BaseA(1); >1 : 1 var bb = new BaseB(1); // error ->bb : BaseB ->new BaseB(1) : BaseB +>bb : any +>new BaseB(1) : any >BaseB : typeof BaseB >1 : 1 var bc = new BaseC(1); // error ->bc : BaseC ->new BaseC(1) : BaseC +>bc : any +>new BaseC(1) : any >BaseC : typeof BaseC >1 : 1 diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.types.diff b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.types.diff deleted file mode 100644 index ab4f08fa6b..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility2.types.diff +++ /dev/null @@ -1,37 +0,0 @@ ---- old.classConstructorAccessibility2.types -+++ new.classConstructorAccessibility2.types -@@= skipped -121, +121 lines =@@ - - createBaseInstance() { new BaseC(10); } // error - >createBaseInstance : () => void -->new BaseC(10) : any -+>new BaseC(10) : BaseC - >BaseC : typeof BaseC - >10 : 10 - - static staticBaseInstance() { new BaseC(11); } // error - >staticBaseInstance : () => void -->new BaseC(11) : any -+>new BaseC(11) : BaseC - >BaseC : typeof BaseC - >11 : 11 - } -@@= skipped -18, +18 lines =@@ - >1 : 1 - - var bb = new BaseB(1); // error -->bb : any -->new BaseB(1) : any -+>bb : BaseB -+>new BaseB(1) : BaseB - >BaseB : typeof BaseB - >1 : 1 - - var bc = new BaseC(1); // error -->bc : any -->new BaseC(1) : any -+>bc : BaseC -+>new BaseC(1) : BaseC - >BaseC : typeof BaseC - >1 : 1 - diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.types b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.types index 22a6b2eec2..331da94321 100644 --- a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.types +++ b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.types @@ -21,7 +21,7 @@ class Unrelated { static fake() { new Base() } // error >fake : () => void ->new Base() : Base +>new Base() : any >Base : typeof Base } diff --git a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.types.diff b/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.types.diff deleted file mode 100644 index d75e8af4f0..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.classConstructorAccessibility5.types -+++ new.classConstructorAccessibility5.types -@@= skipped -20, +20 lines =@@ - - static fake() { new Base() } // error - >fake : () => void -->new Base() : any -+>new Base() : Base - >Base : typeof Base - } - diff --git a/testdata/baselines/reference/submodule/conformance/classExtendingPrimitive.types b/testdata/baselines/reference/submodule/conformance/classExtendingPrimitive.types index c18be79637..e6f1b32702 100644 --- a/testdata/baselines/reference/submodule/conformance/classExtendingPrimitive.types +++ b/testdata/baselines/reference/submodule/conformance/classExtendingPrimitive.types @@ -40,7 +40,7 @@ class C7 extends Undefined { } >Undefined : any enum E { A } ->E : E.A +>E : E >A : E.A class C8 extends E { } diff --git a/testdata/baselines/reference/submodule/conformance/classExtendingPrimitive.types.diff b/testdata/baselines/reference/submodule/conformance/classExtendingPrimitive.types.diff deleted file mode 100644 index 9034087c22..0000000000 --- a/testdata/baselines/reference/submodule/conformance/classExtendingPrimitive.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.classExtendingPrimitive.types -+++ new.classExtendingPrimitive.types -@@= skipped -39, +39 lines =@@ - >Undefined : any - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - class C8 extends E { } diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES5.types b/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES5.types index 559753edd6..b0e7eb0a90 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES5.types +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES5.types @@ -2,11 +2,11 @@ === computedPropertyNames47_ES5.ts === enum E1 { x } ->E1 : E1.x +>E1 : E1 >x : E1.x enum E2 { x } ->E2 : E2.x +>E2 : E2 >x : E2.x var o = { @@ -15,13 +15,13 @@ var o = { [E1.x || E2.x]: 0 >[E1.x || E2.x] : number ->E1.x || E2.x : E2.x ->E1.x : E1.x +>E1.x || E2.x : E2 +>E1.x : E1 >E1 : typeof E1 ->x : E1.x ->E2.x : E2.x +>x : E1 +>E2.x : E2 >E2 : typeof E2 ->x : E2.x +>x : E2 >0 : 0 }; diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES5.types.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES5.types.diff index bc4bcde33d..7fa58d8ee2 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES5.types.diff +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES5.types.diff @@ -1,16 +1,6 @@ --- old.computedPropertyNames47_ES5.types +++ new.computedPropertyNames47_ES5.types -@@= skipped -1, +1 lines =@@ - - === computedPropertyNames47_ES5.ts === - enum E1 { x } -->E1 : E1 -+>E1 : E1.x - >x : E1.x - - enum E2 { x } -->E2 : E2 -+>E2 : E2.x +@@= skipped -9, +9 lines =@@ >x : E2.x var o = { @@ -21,18 +11,3 @@ [E1.x || E2.x]: 0 >[E1.x || E2.x] : number -->E1.x || E2.x : E2 -->E1.x : E1 -+>E1.x || E2.x : E2.x -+>E1.x : E1.x - >E1 : typeof E1 -->x : E1 -->E2.x : E2 -+>x : E1.x -+>E2.x : E2.x - >E2 : typeof E2 -->x : E2 -+>x : E2.x - >0 : 0 - - }; diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES6.types b/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES6.types index 7d62e09bd9..d4bea7b2c0 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES6.types +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES6.types @@ -2,11 +2,11 @@ === computedPropertyNames47_ES6.ts === enum E1 { x } ->E1 : E1.x +>E1 : E1 >x : E1.x enum E2 { x } ->E2 : E2.x +>E2 : E2 >x : E2.x var o = { @@ -15,13 +15,13 @@ var o = { [E1.x || E2.x]: 0 >[E1.x || E2.x] : number ->E1.x || E2.x : E2.x ->E1.x : E1.x +>E1.x || E2.x : E2 +>E1.x : E1 >E1 : typeof E1 ->x : E1.x ->E2.x : E2.x +>x : E1 +>E2.x : E2 >E2 : typeof E2 ->x : E2.x +>x : E2 >0 : 0 }; diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES6.types.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES6.types.diff index 477114f98b..3f300e7b2d 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES6.types.diff +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES6.types.diff @@ -1,16 +1,6 @@ --- old.computedPropertyNames47_ES6.types +++ new.computedPropertyNames47_ES6.types -@@= skipped -1, +1 lines =@@ - - === computedPropertyNames47_ES6.ts === - enum E1 { x } -->E1 : E1 -+>E1 : E1.x - >x : E1.x - - enum E2 { x } -->E2 : E2 -+>E2 : E2.x +@@= skipped -9, +9 lines =@@ >x : E2.x var o = { @@ -21,18 +11,3 @@ [E1.x || E2.x]: 0 >[E1.x || E2.x] : number -->E1.x || E2.x : E2 -->E1.x : E1 -+>E1.x || E2.x : E2.x -+>E1.x : E1.x - >E1 : typeof E1 -->x : E1 -->E2.x : E2 -+>x : E1.x -+>E2.x : E2.x - >E2 : typeof E2 -->x : E2 -+>x : E2.x - >0 : 0 - - }; diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES5.types b/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES5.types index 481aed4252..55db05d187 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES5.types +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES5.types @@ -8,7 +8,7 @@ declare function extractIndexer(p: { [n: number]: T }): T; >n : number enum E { x } ->E : E.x +>E : E >x : E.x var a: any; @@ -33,9 +33,9 @@ extractIndexer({ [E.x]: "" >[E.x] : string ->E.x : E.x +>E.x : E >E : typeof E ->x : E.x +>x : E >"" : "" }); // Should return string diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES5.types.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES5.types.diff index 1b9c721ce3..78dfb0ff67 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES5.types.diff +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES5.types.diff @@ -8,12 +8,6 @@ >p : { [n: number]: T; } >n : number - enum E { x } -->E : E -+>E : E.x - >x : E.x - - var a: any; @@= skipped -25, +26 lines =@@ extractIndexer({ >extractIndexer({ [E.x]: ""}) : string @@ -23,14 +17,6 @@ [E.x]: "" >[E.x] : string -->E.x : E -+>E.x : E.x - >E : typeof E -->x : E -+>x : E.x - >"" : "" - - }); // Should return string @@= skipped -14, +14 lines =@@ extractIndexer({ >extractIndexer({ ["" || 0]: ""}) : string diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES6.types b/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES6.types index e60646bb90..ea5082eeff 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES6.types +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES6.types @@ -8,7 +8,7 @@ declare function extractIndexer(p: { [n: number]: T }): T; >n : number enum E { x } ->E : E.x +>E : E >x : E.x var a: any; @@ -33,9 +33,9 @@ extractIndexer({ [E.x]: "" >[E.x] : string ->E.x : E.x +>E.x : E >E : typeof E ->x : E.x +>x : E >"" : "" }); // Should return string diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES6.types.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES6.types.diff index aa27fa2d09..c30e32c4e3 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES6.types.diff +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES6.types.diff @@ -8,12 +8,6 @@ >p : { [n: number]: T; } >n : number - enum E { x } -->E : E -+>E : E.x - >x : E.x - - var a: any; @@= skipped -25, +26 lines =@@ extractIndexer({ >extractIndexer({ [E.x]: ""}) : string @@ -23,14 +17,6 @@ [E.x]: "" >[E.x] : string -->E.x : E -+>E.x : E.x - >E : typeof E -->x : E -+>x : E.x - >"" : "" - - }); // Should return string @@= skipped -14, +14 lines =@@ extractIndexer({ >extractIndexer({ ["" || 0]: ""}) : string diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES5.types b/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES5.types index de48452309..5091927b0a 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES5.types +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES5.types @@ -2,7 +2,7 @@ === computedPropertyNames7_ES5.ts === enum E { ->E : E.member +>E : E member >member : E.member @@ -13,8 +13,8 @@ var v = { [E.member]: 0 >[E.member] : number ->E.member : E.member +>E.member : E >E : typeof E ->member : E.member +>member : E >0 : 0 } diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES5.types.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES5.types.diff index f87fddec5a..b346d40a78 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES5.types.diff +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES5.types.diff @@ -1,13 +1,6 @@ --- old.computedPropertyNames7_ES5.types +++ new.computedPropertyNames7_ES5.types -@@= skipped -1, +1 lines =@@ - - === computedPropertyNames7_ES5.ts === - enum E { -->E : E -+>E : E.member - - member +@@= skipped -7, +7 lines =@@ >member : E.member } var v = { @@ -18,10 +11,3 @@ [E.member]: 0 >[E.member] : number -->E.member : E -+>E.member : E.member - >E : typeof E -->member : E -+>member : E.member - >0 : 0 - } diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES6.types b/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES6.types index 51913518a1..989c6839be 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES6.types +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES6.types @@ -2,7 +2,7 @@ === computedPropertyNames7_ES6.ts === enum E { ->E : E.member +>E : E member >member : E.member @@ -13,8 +13,8 @@ var v = { [E.member]: 0 >[E.member] : number ->E.member : E.member +>E.member : E >E : typeof E ->member : E.member +>member : E >0 : 0 } diff --git a/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES6.types.diff b/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES6.types.diff index 4b7f92f18f..56f51dfde3 100644 --- a/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES6.types.diff +++ b/testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES6.types.diff @@ -1,13 +1,6 @@ --- old.computedPropertyNames7_ES6.types +++ new.computedPropertyNames7_ES6.types -@@= skipped -1, +1 lines =@@ - - === computedPropertyNames7_ES6.ts === - enum E { -->E : E -+>E : E.member - - member +@@= skipped -7, +7 lines =@@ >member : E.member } var v = { @@ -18,10 +11,3 @@ [E.member]: 0 >[E.member] : number -->E.member : E -+>E.member : E.member - >E : typeof E -->member : E -+>member : E.member - >0 : 0 - } diff --git a/testdata/baselines/reference/submodule/conformance/constAssertionOnEnum.types b/testdata/baselines/reference/submodule/conformance/constAssertionOnEnum.types index d666d6a860..35119d1c3c 100644 --- a/testdata/baselines/reference/submodule/conformance/constAssertionOnEnum.types +++ b/testdata/baselines/reference/submodule/conformance/constAssertionOnEnum.types @@ -43,27 +43,27 @@ namespace ns { >ns : typeof ns export enum Foo { X } ->Foo : Foo.X +>Foo : Foo >X : Foo.X ns.Foo.X as const; ->ns.Foo.X as const : Foo.X ->ns.Foo.X : Foo.X +>ns.Foo.X as const : Foo +>ns.Foo.X : Foo >ns.Foo : typeof Foo >ns : typeof ns >Foo : typeof Foo ->X : Foo.X +>X : Foo } === more.ts === export enum Foo { X } ->Foo : Foo.X +>Foo : Foo >X : Foo.X (Foo).X as const; ->(Foo).X as const : Foo.X ->(Foo).X : Foo.X +>(Foo).X as const : Foo +>(Foo).X : Foo >(Foo) : typeof Foo >Foo : typeof Foo ->X : Foo.X +>X : Foo diff --git a/testdata/baselines/reference/submodule/conformance/constAssertionOnEnum.types.diff b/testdata/baselines/reference/submodule/conformance/constAssertionOnEnum.types.diff deleted file mode 100644 index 4bba33e121..0000000000 --- a/testdata/baselines/reference/submodule/conformance/constAssertionOnEnum.types.diff +++ /dev/null @@ -1,38 +0,0 @@ ---- old.constAssertionOnEnum.types -+++ new.constAssertionOnEnum.types -@@= skipped -42, +42 lines =@@ - >ns : typeof ns - - export enum Foo { X } -->Foo : Foo -+>Foo : Foo.X - >X : Foo.X - - ns.Foo.X as const; -->ns.Foo.X as const : Foo -->ns.Foo.X : Foo -+>ns.Foo.X as const : Foo.X -+>ns.Foo.X : Foo.X - >ns.Foo : typeof Foo - >ns : typeof ns - >Foo : typeof Foo -->X : Foo -+>X : Foo.X - } - - === more.ts === - export enum Foo { X } -->Foo : Foo -+>Foo : Foo.X - >X : Foo.X - - (Foo).X as const; -->(Foo).X as const : Foo -->(Foo).X : Foo -+>(Foo).X as const : Foo.X -+>(Foo).X : Foo.X - >(Foo) : typeof Foo - >Foo : typeof Foo -->X : Foo -+>X : Foo.X - diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types index d458324c5b..26841c0a32 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types @@ -190,7 +190,7 @@ b7([["string"], 1, [[true, false]]]); // Shouldn't be an error // If the declaration specifies a binding pattern, the parameter type is the implied type of that binding pattern (section 5.1.3) enum Foo { a } ->Foo : Foo.a +>Foo : Foo >a : Foo.a function c0({z: {x, y: {j}}}) { } diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types.diff index bd31a4d556..2632e11556 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.types.diff @@ -105,12 +105,7 @@ >[["string"], 1, [[true, false]]] : [[string], number, [[boolean, boolean]]] >["string"] : [string] >"string" : "string" -@@= skipped -13, +13 lines =@@ - - // If the declaration specifies a binding pattern, the parameter type is the implied type of that binding pattern (section 5.1.3) - enum Foo { a } -->Foo : Foo -+>Foo : Foo.a +@@= skipped -17, +17 lines =@@ >a : Foo.a function c0({z: {x, y: {j}}}) { } @@ -141,7 +136,7 @@ >b : string | number >b : string | number >{ b: "hello" } : { b: string; } -@@= skipped -31, +31 lines =@@ +@@= skipped -27, +27 lines =@@ >"hello" : "hello" function c5([a, b, [[c]]]) { } diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types index ff9c1b1eff..02c0a1b2e4 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types @@ -190,7 +190,7 @@ b7([["string"], 1, [[true, false]]]); // Shouldn't be an error // If the declaration specifies a binding pattern, the parameter type is the implied type of that binding pattern (section 5.1.3) enum Foo { a } ->Foo : Foo.a +>Foo : Foo >a : Foo.a function c0({z: {x, y: {j}}}) { } diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types.diff index 5625b474f6..8298b7961f 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.types.diff @@ -105,12 +105,7 @@ >[["string"], 1, [[true, false]]] : [[string], number, [[boolean, boolean]]] >["string"] : [string] >"string" : "string" -@@= skipped -13, +13 lines =@@ - - // If the declaration specifies a binding pattern, the parameter type is the implied type of that binding pattern (section 5.1.3) - enum Foo { a } -->Foo : Foo -+>Foo : Foo.a +@@= skipped -17, +17 lines =@@ >a : Foo.a function c0({z: {x, y: {j}}}) { } @@ -141,7 +136,7 @@ >b : string | number >b : string | number >{ b: "hello" } : { b: string; } -@@= skipped -31, +31 lines =@@ +@@= skipped -27, +27 lines =@@ >"hello" : "hello" function c5([a, b, [[c]]]) { } diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types index a16e011d43..1c855f4a80 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types @@ -173,7 +173,7 @@ b2("string", { x: 200, y: true }); // If the declaration specifies a binding pattern, the parameter type is the implied type of that binding pattern (section 5.1.3) enum Foo { a } ->Foo : Foo.a +>Foo : Foo >a : Foo.a function c0({z: {x, y: {j}}}) { } diff --git a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types.diff b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types.diff index 0cfb40d1c8..1ed2b211cb 100644 --- a/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types.diff +++ b/testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES6.types.diff @@ -87,12 +87,7 @@ >a : any >b : any >c : any -@@= skipped -45, +45 lines =@@ - - // If the declaration specifies a binding pattern, the parameter type is the implied type of that binding pattern (section 5.1.3) - enum Foo { a } -->Foo : Foo -+>Foo : Foo.a +@@= skipped -49, +49 lines =@@ >a : Foo.a function c0({z: {x, y: {j}}}) { } @@ -123,7 +118,7 @@ >b : string | number >b : string | number >{ b: "hello" } : { b: string; } -@@= skipped -31, +31 lines =@@ +@@= skipped -27, +27 lines =@@ >"hello" : "hello" function c5([a, b, [[c]]]) { } diff --git a/testdata/baselines/reference/submodule/conformance/disallowLineTerminatorBeforeArrow.types b/testdata/baselines/reference/submodule/conformance/disallowLineTerminatorBeforeArrow.types index e6d173560d..255f7fc043 100644 --- a/testdata/baselines/reference/submodule/conformance/disallowLineTerminatorBeforeArrow.types +++ b/testdata/baselines/reference/submodule/conformance/disallowLineTerminatorBeforeArrow.types @@ -193,7 +193,7 @@ module m { } export enum Enum { ->Enum : Enum.claw +>Enum : Enum claw = (() >claw : Enum.claw @@ -213,8 +213,8 @@ module m { => new City(Enum.claw); >new City(Enum.claw) : City >City : typeof City ->Enum.claw : Enum.claw +>Enum.claw : Enum >Enum : typeof Enum ->claw : Enum.claw +>claw : Enum } diff --git a/testdata/baselines/reference/submodule/conformance/disallowLineTerminatorBeforeArrow.types.diff b/testdata/baselines/reference/submodule/conformance/disallowLineTerminatorBeforeArrow.types.diff deleted file mode 100644 index d927c07601..0000000000 --- a/testdata/baselines/reference/submodule/conformance/disallowLineTerminatorBeforeArrow.types.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- old.disallowLineTerminatorBeforeArrow.types -+++ new.disallowLineTerminatorBeforeArrow.types -@@= skipped -192, +192 lines =@@ - } - - export enum Enum { -->Enum : Enum -+>Enum : Enum.claw - - claw = (() - >claw : Enum.claw -@@= skipped -20, +20 lines =@@ - => new City(Enum.claw); - >new City(Enum.claw) : City - >City : typeof City -->Enum.claw : Enum -+>Enum.claw : Enum.claw - >Enum : typeof Enum -->claw : Enum -+>claw : Enum.claw - } - diff --git a/testdata/baselines/reference/submodule/conformance/enumAssignability.types b/testdata/baselines/reference/submodule/conformance/enumAssignability.types index 6466b56eea..a5613b01d8 100644 --- a/testdata/baselines/reference/submodule/conformance/enumAssignability.types +++ b/testdata/baselines/reference/submodule/conformance/enumAssignability.types @@ -4,60 +4,60 @@ // enums assignable to number, any, Object, errors unless otherwise noted enum E { A } ->E : E.A +>E : E >A : E.A enum F { B } ->F : F.B +>F : F >B : F.B var e = E.A; ->e : E.A ->E.A : E.A +>e : E +>E.A : E >E : typeof E ->A : E.A +>A : E var f = F.B; ->f : F.B ->F.B : F.B +>f : F +>F.B : F >F : typeof F ->B : F.B +>B : F e = f; ->e = f : F.B ->e : E.A ->f : F.B +>e = f : F +>e : E +>f : F f = e; ->f = e : E.A ->f : F.B ->e : E.A +>f = e : E +>f : F +>e : E e = 1; // ok >e = 1 : 1 ->e : E.A +>e : E >1 : 1 f = 1; // ok >f = 1 : 1 ->f : F.B +>f : F >1 : 1 var x: number = e; // ok >x : number ->e : E.A +>e : E x = f; // ok ->x = f : F.B +>x = f : F >x : number ->f : F.B +>f : F module Others { >Others : typeof Others var a: any = e; // ok >a : any ->e : E.A +>e : E class C { >C : C @@ -79,84 +79,84 @@ module Others { var b: number = e; // ok >b : number ->e : E.A +>e : E var c: string = e; >c : string ->e : E.A +>e : E var d: boolean = e; >d : boolean ->e : E.A +>e : E var ee: Date = e; >ee : Date ->e : E.A +>e : E var f: any = e; // ok >f : any ->e : E.A +>e : E var g: void = e; >g : void ->e : E.A +>e : E var h: Object = e; >h : Object ->e : E.A +>e : E var i: {} = e; >i : {} ->e : E.A +>e : E var j: () => {} = e; >j : () => {} ->e : E.A +>e : E var k: Function = e; >k : Function ->e : E.A +>e : E var l: (x: number) => string = e; >l : (x: number) => string >x : number ->e : E.A +>e : E ac = e; ->ac = e : E.A +>ac = e : E >ac : C ->e : E.A +>e : E ai = e; ->ai = e : E.A +>ai = e : E >ai : I ->e : E.A +>e : E var m: number[] = e; >m : number[] ->e : E.A +>e : E var n: { foo: string } = e; >n : { foo: string; } >foo : string ->e : E.A +>e : E var o: (x: T) => T = e; >o : (x: T) => T >T : T >x : T ->e : E.A +>e : E var p: Number = e; >p : Number ->e : E.A +>e : E var q: String = e; >q : String ->e : E.A +>e : E function foo(x: T, y: U, z: V) { ->foo : (x: T, y: U, z: V) => void +>foo : (x: T, y: U, z: V) => void >T : T >U : U >V : V @@ -167,26 +167,26 @@ module Others { >z : V x = e; ->x = e : E.A +>x = e : E >x : T ->e : E.A +>e : E y = e; ->y = e : E.A +>y = e : E >y : U ->e : E.A +>e : E z = e; ->z = e : E.A +>z = e : E >z : V ->e : E.A +>e : E var a: A = e; >a : A ->e : E.A +>e : E var b: B = e; >b : B ->e : E.A +>e : E } } diff --git a/testdata/baselines/reference/submodule/conformance/enumAssignability.types.diff b/testdata/baselines/reference/submodule/conformance/enumAssignability.types.diff index 3a7cd27e0e..e3002fbad4 100644 --- a/testdata/baselines/reference/submodule/conformance/enumAssignability.types.diff +++ b/testdata/baselines/reference/submodule/conformance/enumAssignability.types.diff @@ -1,87 +1,6 @@ --- old.enumAssignability.types +++ new.enumAssignability.types -@@= skipped -3, +3 lines =@@ - // enums assignable to number, any, Object, errors unless otherwise noted - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - enum F { B } -->F : F -+>F : F.B - >B : F.B - - var e = E.A; -->e : E -->E.A : E -+>e : E.A -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - var f = F.B; -->f : F -->F.B : F -+>f : F.B -+>F.B : F.B - >F : typeof F -->B : F -+>B : F.B - - e = f; -->e = f : F -->e : E -->f : F -+>e = f : F.B -+>e : E.A -+>f : F.B - - f = e; -->f = e : E -->f : F -->e : E -+>f = e : E.A -+>f : F.B -+>e : E.A - - e = 1; // ok - >e = 1 : 1 -->e : E -+>e : E.A - >1 : 1 - - f = 1; // ok - >f = 1 : 1 -->f : F -+>f : F.B - >1 : 1 - - var x: number = e; // ok - >x : number -->e : E -+>e : E.A - - x = f; // ok -->x = f : F -+>x = f : F.B - >x : number -->f : F -+>f : F.B - - module Others { - >Others : typeof Others - - var a: any = e; // ok - >a : any -->e : E -+>e : E.A - - class C { - >C : C -@@= skipped -65, +65 lines =@@ +@@= skipped -68, +68 lines =@@ >ac : C interface I { @@ -90,109 +9,18 @@ foo: string; >foo : string } -@@= skipped -8, +10 lines =@@ - - var b: number = e; // ok - >b : number -->e : E -+>e : E.A - - var c: string = e; - >c : string -->e : E -+>e : E.A - - var d: boolean = e; - >d : boolean -->e : E -+>e : E.A - - var ee: Date = e; - >ee : Date -->e : E -+>e : E.A - - var f: any = e; // ok - >f : any -->e : E -+>e : E.A - - var g: void = e; - >g : void -->e : E -+>e : E.A - - var h: Object = e; - >h : Object -->e : E -+>e : E.A - - var i: {} = e; - >i : {} -->e : E -+>e : E.A - - var j: () => {} = e; - >j : () => {} -->e : E -+>e : E.A - - var k: Function = e; - >k : Function -->e : E -+>e : E.A - - var l: (x: number) => string = e; - >l : (x: number) => string - >x : number -->e : E -+>e : E.A - - ac = e; -->ac = e : E -+>ac = e : E.A - >ac : C -->e : E -+>e : E.A - - ai = e; -->ai = e : E -+>ai = e : E.A - >ai : I -->e : E -+>e : E.A - - var m: number[] = e; - >m : number[] -->e : E -+>e : E.A - - var n: { foo: string } = e; - >n : { foo: string; } - >foo : string -->e : E -+>e : E.A +@@= skipped -72, +74 lines =@@ var o: (x: T) => T = e; >o : (x: T) => T +>T : T >x : T -->e : E -+>e : E.A + >e : E - var p: Number = e; - >p : Number -->e : E -+>e : E.A - - var q: String = e; - >q : String -->e : E -+>e : E.A +@@= skipped -13, +14 lines =@@ function foo(x: T, y: U, z: V) { -->foo : (x: T, y: U, z: V) => void -+>foo : (x: T, y: U, z: V) => void + >foo : (x: T, y: U, z: V) => void +>T : T +>U : U +>V : V @@ -201,36 +29,3 @@ >x : T >y : U >z : V - - x = e; -->x = e : E -+>x = e : E.A - >x : T -->e : E -+>e : E.A - - y = e; -->y = e : E -+>y = e : E.A - >y : U -->e : E -+>e : E.A - - z = e; -->z = e : E -+>z = e : E.A - >z : V -->e : E -+>e : E.A - - var a: A = e; - >a : A -->e : E -+>e : E.A - - var b: B = e; - >b : B -->e : E -+>e : E.A - } - } diff --git a/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.types b/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.types index 8dcb29910c..62cbb8a0d2 100644 --- a/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.types +++ b/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.types @@ -5,7 +5,7 @@ enum E { A } ->E : E.A +>E : E >A : E.A interface I0 { @@ -15,179 +15,179 @@ interface I0 { >x : string foo: E; // identical and subtype, ok ->foo : E.A +>foo : E } declare function foo(x: E): E; ->foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } ->x : E.A +>foo : { (x: E): E; (x: number): number; (x: any): any; } +>x : E declare function foo(x: number): number; ->foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } +>foo : { (x: E): E; (x: number): number; (x: any): any; } >x : number declare function foo(x: any): any; ->foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } +>foo : { (x: E): E; (x: number): number; (x: any): any; } >x : any var r = foo(E.A); // E ->r : E.A ->foo(E.A) : E.A ->foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } ->E.A : E.A +>r : E +>foo(E.A) : E +>foo : { (x: E): E; (x: number): number; (x: any): any; } +>E.A : E >E : typeof E ->A : E.A +>A : E var r2 = foo(1); // number >r2 : number >foo(1) : number ->foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } +>foo : { (x: E): E; (x: number): number; (x: any): any; } >1 : 1 var r3 = foo(null); // any >r3 : any >foo(null) : any ->foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } +>foo : { (x: E): E; (x: number): number; (x: any): any; } >null : any declare function foo2(x: string): string; ->foo2 : { (x: string): string; (x: E.A): E.A; } +>foo2 : { (x: string): string; (x: E): E; } >x : string declare function foo2(x: E): E; ->foo2 : { (x: string): string; (x: E.A): E.A; } ->x : E.A +>foo2 : { (x: string): string; (x: E): E; } +>x : E var r4 = foo2(E.A); ->r4 : E.A ->foo2(E.A) : E.A ->foo2 : { (x: string): string; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo2(E.A) : E +>foo2 : { (x: string): string; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E declare function foo3(x: boolean): boolean; ->foo3 : { (x: boolean): boolean; (x: E.A): E.A; } +>foo3 : { (x: boolean): boolean; (x: E): E; } >x : boolean declare function foo3(x: E): E; ->foo3 : { (x: boolean): boolean; (x: E.A): E.A; } ->x : E.A +>foo3 : { (x: boolean): boolean; (x: E): E; } +>x : E var r4 = foo3(E.A); ->r4 : E.A ->foo3(E.A) : E.A ->foo3 : { (x: boolean): boolean; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo3(E.A) : E +>foo3 : { (x: boolean): boolean; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E declare function foo4(x: Date): Date; ->foo4 : { (x: Date): Date; (x: E.A): E.A; } +>foo4 : { (x: Date): Date; (x: E): E; } >x : Date declare function foo4(x: E): E; ->foo4 : { (x: Date): Date; (x: E.A): E.A; } ->x : E.A +>foo4 : { (x: Date): Date; (x: E): E; } +>x : E var r4 = foo4(E.A); ->r4 : E.A ->foo4(E.A) : E.A ->foo4 : { (x: Date): Date; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo4(E.A) : E +>foo4 : { (x: Date): Date; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E declare function foo5(x: RegExp): RegExp; ->foo5 : { (x: RegExp): RegExp; (x: E.A): E.A; } +>foo5 : { (x: RegExp): RegExp; (x: E): E; } >x : RegExp declare function foo5(x: E): E; ->foo5 : { (x: RegExp): RegExp; (x: E.A): E.A; } ->x : E.A +>foo5 : { (x: RegExp): RegExp; (x: E): E; } +>x : E var r4 = foo5(E.A); ->r4 : E.A ->foo5(E.A) : E.A ->foo5 : { (x: RegExp): RegExp; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo5(E.A) : E +>foo5 : { (x: RegExp): RegExp; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E declare function foo6(x: { bar: number }): { bar: number }; ->foo6 : { (x: { bar: number; }): { bar: number; }; (x: E.A): E.A; } +>foo6 : { (x: { bar: number; }): { bar: number; }; (x: E): E; } >x : { bar: number; } >bar : number >bar : number declare function foo6(x: E): E; ->foo6 : { (x: { bar: number; }): { bar: number; }; (x: E.A): E.A; } ->x : E.A +>foo6 : { (x: { bar: number; }): { bar: number; }; (x: E): E; } +>x : E var r4 = foo6(E.A); ->r4 : E.A ->foo6(E.A) : E.A ->foo6 : { (x: { bar: number; }): { bar: number; }; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo6(E.A) : E +>foo6 : { (x: { bar: number; }): { bar: number; }; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E declare function foo7(x: number[]): number[]; ->foo7 : { (x: number[]): number[]; (x: E.A): E.A; } +>foo7 : { (x: number[]): number[]; (x: E): E; } >x : number[] declare function foo7(x: E): E; ->foo7 : { (x: number[]): number[]; (x: E.A): E.A; } ->x : E.A +>foo7 : { (x: number[]): number[]; (x: E): E; } +>x : E var r4 = foo7(E.A); ->r4 : E.A ->foo7(E.A) : E.A ->foo7 : { (x: number[]): number[]; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo7(E.A) : E +>foo7 : { (x: number[]): number[]; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E interface I8 { foo: string; } >I8 : I8 >foo : string declare function foo8(x: I8): I8; ->foo8 : { (x: I8): I8; (x: E.A): E.A; } +>foo8 : { (x: I8): I8; (x: E): E; } >x : I8 declare function foo8(x: E): E; ->foo8 : { (x: I8): I8; (x: E.A): E.A; } ->x : E.A +>foo8 : { (x: I8): I8; (x: E): E; } +>x : E var r4 = foo8(E.A); ->r4 : E.A ->foo8(E.A) : E.A ->foo8 : { (x: I8): I8; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo8(E.A) : E +>foo8 : { (x: I8): I8; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E class A { foo: number; } >A : A >foo : number declare function foo9(x: A): A; ->foo9 : { (x: A): A; (x: E.A): E.A; } +>foo9 : { (x: A): A; (x: E): E; } >x : A declare function foo9(x: E): E; ->foo9 : { (x: A): A; (x: E.A): E.A; } ->x : E.A +>foo9 : { (x: A): A; (x: E): E; } +>x : E var r4 = foo9(E.A); ->r4 : E.A ->foo9(E.A) : E.A ->foo9 : { (x: A): A; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo9(E.A) : E +>foo9 : { (x: A): A; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E class A2 { foo: T; } >A2 : A2 @@ -195,41 +195,41 @@ class A2 { foo: T; } >foo : T declare function foo10(x: A2): A2; ->foo10 : { (x: A2): A2; (x: E.A): E.A; } +>foo10 : { (x: A2): A2; (x: E): E; } >x : A2 declare function foo10(x: E): E; ->foo10 : { (x: A2): A2; (x: E.A): E.A; } ->x : E.A +>foo10 : { (x: A2): A2; (x: E): E; } +>x : E var r4 = foo10(E.A); ->r4 : E.A ->foo10(E.A) : E.A ->foo10 : { (x: A2): A2; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo10(E.A) : E +>foo10 : { (x: A2): A2; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E declare function foo11(x: (x) => number): (x) => number; ->foo11 : { (x: (x: any) => number): (x: any) => number; (x: E.A): E.A; } +>foo11 : { (x: (x: any) => number): (x: any) => number; (x: E): E; } >x : (x: any) => number >x : any >x : any declare function foo11(x: E): E; ->foo11 : { (x: (x: any) => number): (x: any) => number; (x: E.A): E.A; } ->x : E.A +>foo11 : { (x: (x: any) => number): (x: any) => number; (x: E): E; } +>x : E var r4 = foo11(E.A); ->r4 : E.A ->foo11(E.A) : E.A ->foo11 : { (x: (x: any) => number): (x: any) => number; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo11(E.A) : E +>foo11 : { (x: (x: any) => number): (x: any) => number; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E declare function foo12(x: (x: T) => T): (x: T) => T; ->foo12 : { (x: (x: T) => T): (x: T) => T; (x: E.A): E.A; } +>foo12 : { (x: (x: T) => T): (x: T) => T; (x: E): E; } >x : (x: T) => T >T : T >x : T @@ -237,36 +237,36 @@ declare function foo12(x: (x: T) => T): (x: T) => T; >x : T declare function foo12(x: E): E; ->foo12 : { (x: (x: T) => T): (x: T) => T; (x: E.A): E.A; } ->x : E.A +>foo12 : { (x: (x: T) => T): (x: T) => T; (x: E): E; } +>x : E var r4 = foo12(E.A); ->r4 : E.A ->foo12(E.A) : E.A ->foo12 : { (x: (x: T) => T): (x: T) => T; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo12(E.A) : E +>foo12 : { (x: (x: T) => T): (x: T) => T; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E enum E2 { A } ->E2 : E2.A +>E2 : E2 >A : E2.A declare function foo13(x: E2): E2; ->foo13 : { (x: E2.A): E2.A; (x: E.A): E.A; } ->x : E2.A +>foo13 : { (x: E2): E2; (x: E): E; } +>x : E2 declare function foo13(x: E): E; ->foo13 : { (x: E2.A): E2.A; (x: E.A): E.A; } ->x : E.A +>foo13 : { (x: E2): E2; (x: E): E; } +>x : E var r4 = foo13(E.A); ->r4 : E.A ->foo13(E.A) : E.A ->foo13 : { (x: E2.A): E2.A; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo13(E.A) : E +>foo13 : { (x: E2): E2; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E function f() { } >f : typeof f @@ -279,20 +279,20 @@ module f { >1 : 1 } declare function foo14(x: typeof f): typeof f; ->foo14 : { (x: typeof f): typeof f; (x: E.A): E.A; } +>foo14 : { (x: typeof f): typeof f; (x: E): E; } >x : typeof f declare function foo14(x: E): E; ->foo14 : { (x: typeof f): typeof f; (x: E.A): E.A; } ->x : E.A +>foo14 : { (x: typeof f): typeof f; (x: E): E; } +>x : E var r4 = foo14(E.A); ->r4 : E.A ->foo14(E.A) : E.A ->foo14 : { (x: typeof f): typeof f; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo14(E.A) : E +>foo14 : { (x: typeof f): typeof f; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E class CC { baz: string } >CC : CC @@ -306,50 +306,50 @@ module CC { >1 : 1 } declare function foo15(x: CC): CC; ->foo15 : { (x: CC): CC; (x: E.A): E.A; } +>foo15 : { (x: CC): CC; (x: E): E; } >x : CC declare function foo15(x: E): E; ->foo15 : { (x: CC): CC; (x: E.A): E.A; } ->x : E.A +>foo15 : { (x: CC): CC; (x: E): E; } +>x : E var r4 = foo15(E.A); ->r4 : E.A ->foo15(E.A) : E.A ->foo15 : { (x: CC): CC; (x: E.A): E.A; } ->E.A : E.A +>r4 : E +>foo15(E.A) : E +>foo15 : { (x: CC): CC; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E declare function foo16(x: Object): Object; ->foo16 : { (x: Object): Object; (x: E.A): E.A; } +>foo16 : { (x: Object): Object; (x: E): E; } >x : Object declare function foo16(x: E): E; ->foo16 : { (x: Object): Object; (x: E.A): E.A; } ->x : E.A +>foo16 : { (x: Object): Object; (x: E): E; } +>x : E var r4 = foo16(E.A); ->r4 : E.A +>r4 : E >foo16(E.A) : Object ->foo16 : { (x: Object): Object; (x: E.A): E.A; } ->E.A : E.A +>foo16 : { (x: Object): Object; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E declare function foo17(x: {}): {}; ->foo17 : { (x: {}): {}; (x: E.A): E.A; } +>foo17 : { (x: {}): {}; (x: E): E; } >x : {} declare function foo17(x: E): E; ->foo17 : { (x: {}): {}; (x: E.A): E.A; } ->x : E.A +>foo17 : { (x: {}): {}; (x: E): E; } +>x : E var r4 = foo16(E.A); ->r4 : E.A +>r4 : E >foo16(E.A) : Object ->foo16 : { (x: Object): Object; (x: E.A): E.A; } ->E.A : E.A +>foo16 : { (x: Object): Object; (x: E): E; } +>E.A : E >E : typeof E ->A : E.A +>A : E diff --git a/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.types.diff b/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.types.diff index c035c93b9c..3d9d29b7b6 100644 --- a/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.types.diff +++ b/testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.types.diff @@ -1,11 +1,6 @@ --- old.enumAssignabilityInInheritance.types +++ new.enumAssignabilityInInheritance.types -@@= skipped -4, +4 lines =@@ - - - enum E { A } -->E : E -+>E : E.A +@@= skipped -8, +8 lines =@@ >A : E.A interface I0 { @@ -14,256 +9,15 @@ [x: string]: E; >x : string - foo: E; // identical and subtype, ok -->foo : E -+>foo : E.A - } - - - declare function foo(x: E): E; -->foo : { (x: E): E; (x: number): number; (x: any): any; } -->x : E -+>foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } -+>x : E.A - - declare function foo(x: number): number; -->foo : { (x: E): E; (x: number): number; (x: any): any; } -+>foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } - >x : number - - declare function foo(x: any): any; -->foo : { (x: E): E; (x: number): number; (x: any): any; } -+>foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } - >x : any - - var r = foo(E.A); // E -->r : E -->foo(E.A) : E -->foo : { (x: E): E; (x: number): number; (x: any): any; } -->E.A : E -+>r : E.A -+>foo(E.A) : E.A -+>foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - var r2 = foo(1); // number - >r2 : number - >foo(1) : number -->foo : { (x: E): E; (x: number): number; (x: any): any; } -+>foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } - >1 : 1 - - var r3 = foo(null); // any - >r3 : any - >foo(null) : any -->foo : { (x: E): E; (x: number): number; (x: any): any; } -+>foo : { (x: E.A): E.A; (x: number): number; (x: any): any; } - >null : any - - declare function foo2(x: string): string; -->foo2 : { (x: string): string; (x: E): E; } -+>foo2 : { (x: string): string; (x: E.A): E.A; } - >x : string - - declare function foo2(x: E): E; -->foo2 : { (x: string): string; (x: E): E; } -->x : E -+>foo2 : { (x: string): string; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo2(E.A); -->r4 : E -->foo2(E.A) : E -->foo2 : { (x: string): string; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo2(E.A) : E.A -+>foo2 : { (x: string): string; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - declare function foo3(x: boolean): boolean; -->foo3 : { (x: boolean): boolean; (x: E): E; } -+>foo3 : { (x: boolean): boolean; (x: E.A): E.A; } - >x : boolean - - declare function foo3(x: E): E; -->foo3 : { (x: boolean): boolean; (x: E): E; } -->x : E -+>foo3 : { (x: boolean): boolean; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo3(E.A); -->r4 : E -->foo3(E.A) : E -->foo3 : { (x: boolean): boolean; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo3(E.A) : E.A -+>foo3 : { (x: boolean): boolean; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - declare function foo4(x: Date): Date; -->foo4 : { (x: Date): Date; (x: E): E; } -+>foo4 : { (x: Date): Date; (x: E.A): E.A; } - >x : Date - - declare function foo4(x: E): E; -->foo4 : { (x: Date): Date; (x: E): E; } -->x : E -+>foo4 : { (x: Date): Date; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo4(E.A); -->r4 : E -->foo4(E.A) : E -->foo4 : { (x: Date): Date; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo4(E.A) : E.A -+>foo4 : { (x: Date): Date; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - declare function foo5(x: RegExp): RegExp; -->foo5 : { (x: RegExp): RegExp; (x: E): E; } -+>foo5 : { (x: RegExp): RegExp; (x: E.A): E.A; } - >x : RegExp - - declare function foo5(x: E): E; -->foo5 : { (x: RegExp): RegExp; (x: E): E; } -->x : E -+>foo5 : { (x: RegExp): RegExp; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo5(E.A); -->r4 : E -->foo5(E.A) : E -->foo5 : { (x: RegExp): RegExp; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo5(E.A) : E.A -+>foo5 : { (x: RegExp): RegExp; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - declare function foo6(x: { bar: number }): { bar: number }; -->foo6 : { (x: { bar: number; }): { bar: number; }; (x: E): E; } -+>foo6 : { (x: { bar: number; }): { bar: number; }; (x: E.A): E.A; } - >x : { bar: number; } - >bar : number - >bar : number - - declare function foo6(x: E): E; -->foo6 : { (x: { bar: number; }): { bar: number; }; (x: E): E; } -->x : E -+>foo6 : { (x: { bar: number; }): { bar: number; }; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo6(E.A); -->r4 : E -->foo6(E.A) : E -->foo6 : { (x: { bar: number; }): { bar: number; }; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo6(E.A) : E.A -+>foo6 : { (x: { bar: number; }): { bar: number; }; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - declare function foo7(x: number[]): number[]; -->foo7 : { (x: number[]): number[]; (x: E): E; } -+>foo7 : { (x: number[]): number[]; (x: E.A): E.A; } - >x : number[] - - declare function foo7(x: E): E; -->foo7 : { (x: number[]): number[]; (x: E): E; } -->x : E -+>foo7 : { (x: number[]): number[]; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo7(E.A); -->r4 : E -->foo7(E.A) : E -->foo7 : { (x: number[]): number[]; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo7(E.A) : E.A -+>foo7 : { (x: number[]): number[]; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A +@@= skipped -139, +141 lines =@@ + >A : E interface I8 { foo: string; } +>I8 : I8 >foo : string declare function foo8(x: I8): I8; -->foo8 : { (x: I8): I8; (x: E): E; } -+>foo8 : { (x: I8): I8; (x: E.A): E.A; } - >x : I8 - - declare function foo8(x: E): E; -->foo8 : { (x: I8): I8; (x: E): E; } -->x : E -+>foo8 : { (x: I8): I8; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo8(E.A); -->r4 : E -->foo8(E.A) : E -->foo8 : { (x: I8): I8; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo8(E.A) : E.A -+>foo8 : { (x: I8): I8; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - class A { foo: number; } - >A : A - >foo : number - - declare function foo9(x: A): A; -->foo9 : { (x: A): A; (x: E): E; } -+>foo9 : { (x: A): A; (x: E.A): E.A; } - >x : A - - declare function foo9(x: E): E; -->foo9 : { (x: A): A; (x: E): E; } -->x : E -+>foo9 : { (x: A): A; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo9(E.A); -->r4 : E -->foo9(E.A) : E -->foo9 : { (x: A): A; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo9(E.A) : E.A -+>foo9 : { (x: A): A; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A +@@= skipped -40, +41 lines =@@ class A2 { foo: T; } >A2 : A2 @@ -271,58 +25,9 @@ >foo : T declare function foo10(x: A2): A2; -->foo10 : { (x: A2): A2; (x: E): E; } -+>foo10 : { (x: A2): A2; (x: E.A): E.A; } - >x : A2 - - declare function foo10(x: E): E; -->foo10 : { (x: A2): A2; (x: E): E; } -->x : E -+>foo10 : { (x: A2): A2; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo10(E.A); -->r4 : E -->foo10(E.A) : E -->foo10 : { (x: A2): A2; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo10(E.A) : E.A -+>foo10 : { (x: A2): A2; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - declare function foo11(x: (x) => number): (x) => number; -->foo11 : { (x: (x: any) => number): (x: any) => number; (x: E): E; } -+>foo11 : { (x: (x: any) => number): (x: any) => number; (x: E.A): E.A; } - >x : (x: any) => number - >x : any - >x : any - - declare function foo11(x: E): E; -->foo11 : { (x: (x: any) => number): (x: any) => number; (x: E): E; } -->x : E -+>foo11 : { (x: (x: any) => number): (x: any) => number; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo11(E.A); -->r4 : E -->foo11(E.A) : E -->foo11 : { (x: (x: any) => number): (x: any) => number; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo11(E.A) : E.A -+>foo11 : { (x: (x: any) => number): (x: any) => number; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - +@@= skipped -39, +40 lines =@@ declare function foo12(x: (x: T) => T): (x: T) => T; -->foo12 : { (x: (x: T) => T): (x: T) => T; (x: E): E; } -+>foo12 : { (x: (x: T) => T): (x: T) => T; (x: E.A): E.A; } + >foo12 : { (x: (x: T) => T): (x: T) => T; (x: E): E; } >x : (x: T) => T +>T : T >x : T @@ -330,157 +35,12 @@ >x : T declare function foo12(x: E): E; -->foo12 : { (x: (x: T) => T): (x: T) => T; (x: E): E; } -->x : E -+>foo12 : { (x: (x: T) => T): (x: T) => T; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo12(E.A); -->r4 : E -->foo12(E.A) : E -->foo12 : { (x: (x: T) => T): (x: T) => T; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo12(E.A) : E.A -+>foo12 : { (x: (x: T) => T): (x: T) => T; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - enum E2 { A } -->E2 : E2 -+>E2 : E2.A - >A : E2.A - - declare function foo13(x: E2): E2; -->foo13 : { (x: E2): E2; (x: E): E; } -->x : E2 -+>foo13 : { (x: E2.A): E2.A; (x: E.A): E.A; } -+>x : E2.A - - declare function foo13(x: E): E; -->foo13 : { (x: E2): E2; (x: E): E; } -->x : E -+>foo13 : { (x: E2.A): E2.A; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo13(E.A); -->r4 : E -->foo13(E.A) : E -->foo13 : { (x: E2): E2; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo13(E.A) : E.A -+>foo13 : { (x: E2.A): E2.A; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - function f() { } - >f : typeof f -@@= skipped -268, +274 lines =@@ - >1 : 1 - } +@@= skipped -48, +50 lines =@@ declare function foo14(x: typeof f): typeof f; -->foo14 : { (x: typeof f): typeof f; (x: E): E; } -+>foo14 : { (x: typeof f): typeof f; (x: E.A): E.A; } + >foo14 : { (x: typeof f): typeof f; (x: E): E; } >x : typeof f ->f : typeof f ->f : typeof f declare function foo14(x: E): E; -->foo14 : { (x: typeof f): typeof f; (x: E): E; } -->x : E -+>foo14 : { (x: typeof f): typeof f; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo14(E.A); -->r4 : E -->foo14(E.A) : E -->foo14 : { (x: typeof f): typeof f; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo14(E.A) : E.A -+>foo14 : { (x: typeof f): typeof f; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - class CC { baz: string } - >CC : CC -@@= skipped -29, +27 lines =@@ - >1 : 1 - } - declare function foo15(x: CC): CC; -->foo15 : { (x: CC): CC; (x: E): E; } -+>foo15 : { (x: CC): CC; (x: E.A): E.A; } - >x : CC - - declare function foo15(x: E): E; -->foo15 : { (x: CC): CC; (x: E): E; } -->x : E -+>foo15 : { (x: CC): CC; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo15(E.A); -->r4 : E -->foo15(E.A) : E -->foo15 : { (x: CC): CC; (x: E): E; } -->E.A : E -+>r4 : E.A -+>foo15(E.A) : E.A -+>foo15 : { (x: CC): CC; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - declare function foo16(x: Object): Object; -->foo16 : { (x: Object): Object; (x: E): E; } -+>foo16 : { (x: Object): Object; (x: E.A): E.A; } - >x : Object - - declare function foo16(x: E): E; -->foo16 : { (x: Object): Object; (x: E): E; } -->x : E -+>foo16 : { (x: Object): Object; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo16(E.A); -->r4 : E -+>r4 : E.A - >foo16(E.A) : Object -->foo16 : { (x: Object): Object; (x: E): E; } -->E.A : E -+>foo16 : { (x: Object): Object; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - declare function foo17(x: {}): {}; -->foo17 : { (x: {}): {}; (x: E): E; } -+>foo17 : { (x: {}): {}; (x: E.A): E.A; } - >x : {} - - declare function foo17(x: E): E; -->foo17 : { (x: {}): {}; (x: E): E; } -->x : E -+>foo17 : { (x: {}): {}; (x: E.A): E.A; } -+>x : E.A - - var r4 = foo16(E.A); -->r4 : E -+>r4 : E.A - >foo16(E.A) : Object -->foo16 : { (x: Object): Object; (x: E): E; } -->E.A : E -+>foo16 : { (x: Object): Object; (x: E.A): E.A; } -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - + >foo14 : { (x: typeof f): typeof f; (x: E): E; } diff --git a/testdata/baselines/reference/submodule/conformance/enumBasics.types b/testdata/baselines/reference/submodule/conformance/enumBasics.types index b543fb6eb7..bad15c7f71 100644 --- a/testdata/baselines/reference/submodule/conformance/enumBasics.types +++ b/testdata/baselines/reference/submodule/conformance/enumBasics.types @@ -138,7 +138,7 @@ enum E6 { // Enum with computed member initializer of type 'any' enum E7 { ->E7 : E7.A +>E7 : E7 A = 'foo'['foo'] >A : E7.A @@ -149,7 +149,7 @@ enum E7 { // Enum with computed member initializer of type number enum E8 { ->E8 : E8.B +>E8 : E8 B = 'foo'['foo'] >B : E8.B @@ -160,29 +160,29 @@ enum E8 { //Enum with computed member intializer of same enum type enum E9 { ->E9 : E9.A +>E9 : E9 A, >A : E9.A B = A >B : E9.A ->A : E9.A +>A : E9 } // (refer to .js to validate) // Enum constant members are propagated var doNotPropagate = [ ->doNotPropagate : (E4.Z | E7.A | E8.B | E3)[] ->[ E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z] : (E4.Z | E7.A | E8.B | E3)[] +>doNotPropagate : (E7 | E8 | E3 | E4)[] +>[ E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z] : (E7 | E8 | E3 | E4)[] E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z ->E8.B : E8.B +>E8.B : E8 >E8 : typeof E8 ->B : E8.B ->E7.A : E7.A +>B : E8 +>E7.A : E7 >E7 : typeof E7 ->A : E7.A +>A : E7 >E4.Z : E4.Z >E4 : typeof E4 >Z : E4.Z @@ -199,16 +199,16 @@ var doNotPropagate = [ ]; // Enum computed members are not propagated var doPropagate = [ ->doPropagate : (E9.A | E5 | E6)[] ->[ E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C] : (E9.A | E5 | E6)[] +>doPropagate : (E9 | E5 | E6)[] +>[ E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C] : (E9 | E5 | E6)[] E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C ->E9.A : E9.A +>E9.A : E9 >E9 : typeof E9 ->A : E9.A ->E9.B : E9.A +>A : E9 +>E9.B : E9 >E9 : typeof E9 ->B : E9.A +>B : E9 >E6.B : E6.A >E6 : typeof E6 >B : E6.A diff --git a/testdata/baselines/reference/submodule/conformance/enumBasics.types.diff b/testdata/baselines/reference/submodule/conformance/enumBasics.types.diff index 9049be4275..79f4e074fd 100644 --- a/testdata/baselines/reference/submodule/conformance/enumBasics.types.diff +++ b/testdata/baselines/reference/submodule/conformance/enumBasics.types.diff @@ -8,12 +8,7 @@ // Reverse mapping of enum returns string name of property var s = E1[e.A]; -@@= skipped -91, +90 lines =@@ - - // Enum with computed member initializer of type 'any' - enum E7 { -->E7 : E7 -+>E7 : E7.A +@@= skipped -95, +94 lines =@@ A = 'foo'['foo'] >A : E7.A @@ -22,11 +17,7 @@ >'foo' : "foo" >'foo' : "foo" } - - // Enum with computed member initializer of type number - enum E8 { -->E8 : E8 -+>E8 : E8.B +@@= skipped -11, +11 lines =@@ B = 'foo'['foo'] >B : E8.B @@ -35,63 +26,25 @@ >'foo' : "foo" >'foo' : "foo" } - - //Enum with computed member intializer of same enum type - enum E9 { -->E9 : E9 -+>E9 : E9.A - - A, - >A : E9.A - - B = A - >B : E9.A -->A : E9 -+>A : E9.A - } - +@@= skipped -20, +20 lines =@@ // (refer to .js to validate) // Enum constant members are propagated var doNotPropagate = [ ->doNotPropagate : (E8 | E7 | E4 | E3)[] ->[ E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z] : (E8 | E7 | E4 | E3)[] -+>doNotPropagate : (E4.Z | E7.A | E8.B | E3)[] -+>[ E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z] : (E4.Z | E7.A | E8.B | E3)[] ++>doNotPropagate : (E7 | E8 | E3 | E4)[] ++>[ E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z] : (E7 | E8 | E3 | E4)[] E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z -->E8.B : E8 -+>E8.B : E8.B - >E8 : typeof E8 -->B : E8 -->E7.A : E7 -+>B : E8.B -+>E7.A : E7.A - >E7 : typeof E7 -->A : E7 -+>A : E7.A - >E4.Z : E4.Z - >E4 : typeof E4 - >Z : E4.Z -@@= skipped -61, +61 lines =@@ + >E8.B : E8 +@@= skipped -26, +26 lines =@@ ]; // Enum computed members are not propagated var doPropagate = [ ->doPropagate : (E9 | E6 | E5)[] ->[ E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C] : (E9 | E6 | E5)[] -+>doPropagate : (E9.A | E5 | E6)[] -+>[ E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C] : (E9.A | E5 | E6)[] ++>doPropagate : (E9 | E5 | E6)[] ++>[ E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C] : (E9 | E5 | E6)[] E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C -->E9.A : E9 -+>E9.A : E9.A - >E9 : typeof E9 -->A : E9 -->E9.B : E9 -+>A : E9.A -+>E9.B : E9.A - >E9 : typeof E9 -->B : E9 -+>B : E9.A - >E6.B : E6.A - >E6 : typeof E6 - >B : E6.A + >E9.A : E9 diff --git a/testdata/baselines/reference/submodule/conformance/enumClassification.types b/testdata/baselines/reference/submodule/conformance/enumClassification.types index 92d0ea25e0..cf69c789d8 100644 --- a/testdata/baselines/reference/submodule/conformance/enumClassification.types +++ b/testdata/baselines/reference/submodule/conformance/enumClassification.types @@ -9,14 +9,14 @@ // Examples of literal enum types enum E01 { ->E01 : E01.A +>E01 : E01 A >A : E01.A } enum E02 { ->E02 : E02.A +>E02 : E02 A = 123 >A : E02.A @@ -24,7 +24,7 @@ enum E02 { } enum E03 { ->E03 : E03.A +>E03 : E03 A = "hello" >A : E03.A diff --git a/testdata/baselines/reference/submodule/conformance/enumClassification.types.diff b/testdata/baselines/reference/submodule/conformance/enumClassification.types.diff deleted file mode 100644 index 59eff2993b..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumClassification.types.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.enumClassification.types -+++ new.enumClassification.types -@@= skipped -8, +8 lines =@@ - // Examples of literal enum types - - enum E01 { -->E01 : E01 -+>E01 : E01.A - - A - >A : E01.A - } - - enum E02 { -->E02 : E02 -+>E02 : E02.A - - A = 123 - >A : E02.A -@@= skipped -15, +15 lines =@@ - } - - enum E03 { -->E03 : E03 -+>E03 : E03.A - - A = "hello" - >A : E03.A diff --git a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithString.types b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithString.types index 792c5756cc..6fec4d5057 100644 --- a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithString.types +++ b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithString.types @@ -74,7 +74,7 @@ enum T3 { } enum T4 { ->T4 : T4.a +>T4 : T4 a = "1" >a : T4.a @@ -82,7 +82,7 @@ enum T4 { } enum T5 { ->T5 : T5.a +>T5 : T5 a = "1" + "2" >a : T5.a diff --git a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithString.types.diff b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithString.types.diff deleted file mode 100644 index 5925bc0773..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithString.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.enumConstantMemberWithString.types -+++ new.enumConstantMemberWithString.types -@@= skipped -73, +73 lines =@@ - } - - enum T4 { -->T4 : T4 -+>T4 : T4.a - - a = "1" - >a : T4.a -@@= skipped -8, +8 lines =@@ - } - - enum T5 { -->T5 : T5 -+>T5 : T5.a - - a = "1" + "2" - >a : T5.a diff --git a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithStringEmitDeclaration.types b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithStringEmitDeclaration.types index 91169b2674..b9da5ca4d6 100644 --- a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithStringEmitDeclaration.types +++ b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithStringEmitDeclaration.types @@ -52,7 +52,7 @@ enum T3 { } enum T4 { ->T4 : T4.a +>T4 : T4 a = "1" >a : T4.a @@ -60,7 +60,7 @@ enum T4 { } enum T5 { ->T5 : T5.a +>T5 : T5 a = "1" + "2" >a : T5.a diff --git a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithStringEmitDeclaration.types.diff b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithStringEmitDeclaration.types.diff deleted file mode 100644 index b726acb62e..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithStringEmitDeclaration.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.enumConstantMemberWithStringEmitDeclaration.types -+++ new.enumConstantMemberWithStringEmitDeclaration.types -@@= skipped -51, +51 lines =@@ - } - - enum T4 { -->T4 : T4 -+>T4 : T4.a - - a = "1" - >a : T4.a -@@= skipped -8, +8 lines =@@ - } - - enum T5 { -->T5 : T5 -+>T5 : T5.a - - a = "1" + "2" - >a : T5.a diff --git a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiterals.types b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiterals.types index 19af3de835..2eec76be08 100644 --- a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiterals.types +++ b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiterals.types @@ -2,7 +2,7 @@ === enumConstantMemberWithTemplateLiterals.ts === enum T1 { ->T1 : T1.a +>T1 : T1 a = `1` >a : T1.a @@ -26,7 +26,7 @@ enum T2 { } enum T3 { ->T3 : T3.a +>T3 : T3 a = `1` + `1` >a : T3.a diff --git a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiterals.types.diff b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiterals.types.diff deleted file mode 100644 index febbce5b5a..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiterals.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.enumConstantMemberWithTemplateLiterals.types -+++ new.enumConstantMemberWithTemplateLiterals.types -@@= skipped -1, +1 lines =@@ - - === enumConstantMemberWithTemplateLiterals.ts === - enum T1 { -->T1 : T1 -+>T1 : T1.a - - a = `1` - >a : T1.a -@@= skipped -24, +24 lines =@@ - } - - enum T3 { -->T3 : T3 -+>T3 : T3.a - - a = `1` + `1` - >a : T3.a diff --git a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiteralsEmitDeclaration.types b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiteralsEmitDeclaration.types index bee5d18cb5..2478fe973a 100644 --- a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiteralsEmitDeclaration.types +++ b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiteralsEmitDeclaration.types @@ -2,7 +2,7 @@ === enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts === enum T1 { ->T1 : T1.a +>T1 : T1 a = `1` >a : T1.a @@ -26,7 +26,7 @@ enum T2 { } enum T3 { ->T3 : T3.a +>T3 : T3 a = `1` + `1` >a : T3.a diff --git a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiteralsEmitDeclaration.types.diff b/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiteralsEmitDeclaration.types.diff deleted file mode 100644 index 3e69a81e0c..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumConstantMemberWithTemplateLiteralsEmitDeclaration.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.enumConstantMemberWithTemplateLiteralsEmitDeclaration.types -+++ new.enumConstantMemberWithTemplateLiteralsEmitDeclaration.types -@@= skipped -1, +1 lines =@@ - - === enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts === - enum T1 { -->T1 : T1 -+>T1 : T1.a - - a = `1` - >a : T1.a -@@= skipped -24, +24 lines =@@ - } - - enum T3 { -->T3 : T3 -+>T3 : T3.a - - a = `1` + `1` - >a : T3.a diff --git a/testdata/baselines/reference/submodule/conformance/enumErrorOnConstantBindingWithInitializer.types b/testdata/baselines/reference/submodule/conformance/enumErrorOnConstantBindingWithInitializer.types index 802a657cb2..43fe06ba8b 100644 --- a/testdata/baselines/reference/submodule/conformance/enumErrorOnConstantBindingWithInitializer.types +++ b/testdata/baselines/reference/submodule/conformance/enumErrorOnConstantBindingWithInitializer.types @@ -18,7 +18,7 @@ const { value = "123" } = thing; >thing : Thing enum E { ->E : E.test +>E : E test = value, >test : E.test diff --git a/testdata/baselines/reference/submodule/conformance/enumErrorOnConstantBindingWithInitializer.types.diff b/testdata/baselines/reference/submodule/conformance/enumErrorOnConstantBindingWithInitializer.types.diff deleted file mode 100644 index 1e04a9319e..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumErrorOnConstantBindingWithInitializer.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.enumErrorOnConstantBindingWithInitializer.types -+++ new.enumErrorOnConstantBindingWithInitializer.types -@@= skipped -17, +17 lines =@@ - >thing : Thing - - enum E { -->E : E -+>E : E.test - - test = value, - >test : E.test diff --git a/testdata/baselines/reference/submodule/conformance/enumErrors.types b/testdata/baselines/reference/submodule/conformance/enumErrors.types index a86cff0c5a..50b603d487 100644 --- a/testdata/baselines/reference/submodule/conformance/enumErrors.types +++ b/testdata/baselines/reference/submodule/conformance/enumErrors.types @@ -16,7 +16,7 @@ enum boolean { } // Enum with computed member initializer of type Number enum E5 { ->E5 : E5.C +>E5 : E5 C = new Number(30) >C : E5.C @@ -26,32 +26,32 @@ enum E5 { } enum E9 { ->E9 : E9.A +>E9 : E9 A, >A : E9.A B = A >B : E9.A ->A : E9.A +>A : E9 } //Enum with computed member intializer of different enum type // Bug 707850: This should be allowed enum E10 { ->E10 : E10.A +>E10 : E10 A = E9.A, >A : E10.A ->E9.A : E9.A +>E9.A : E9 >E9 : typeof E9 ->A : E9.A +>A : E9 B = E9.B >B : E10.A ->E9.B : E9.A +>E9.B : E9 >E9 : typeof E9 ->B : E9.A +>B : E9 } // Enum with computed member intializer of other types diff --git a/testdata/baselines/reference/submodule/conformance/enumErrors.types.diff b/testdata/baselines/reference/submodule/conformance/enumErrors.types.diff index dd8076d6bb..feff52b763 100644 --- a/testdata/baselines/reference/submodule/conformance/enumErrors.types.diff +++ b/testdata/baselines/reference/submodule/conformance/enumErrors.types.diff @@ -1,55 +1,6 @@ --- old.enumErrors.types +++ new.enumErrors.types -@@= skipped -15, +15 lines =@@ - - // Enum with computed member initializer of type Number - enum E5 { -->E5 : E5 -+>E5 : E5.C - - C = new Number(30) - >C : E5.C -@@= skipped -10, +10 lines =@@ - } - - enum E9 { -->E9 : E9 -+>E9 : E9.A - - A, - >A : E9.A - - B = A - >B : E9.A -->A : E9 -+>A : E9.A - } - - //Enum with computed member intializer of different enum type - // Bug 707850: This should be allowed - enum E10 { -->E10 : E10 -+>E10 : E10.A - - A = E9.A, - >A : E10.A -->E9.A : E9 -+>E9.A : E9.A - >E9 : typeof E9 -->A : E9 -+>A : E9.A - - B = E9.B - >B : E10.A -->E9.B : E9 -+>E9.B : E9.A - >E9 : typeof E9 -->B : E9 -+>B : E9.A - } - - // Enum with computed member intializer of other types -@@= skipped -108, +108 lines =@@ +@@= skipped -133, +133 lines =@@ postColonValueComma: 2, >postColonValueComma : E13.postColonValueComma diff --git a/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.types b/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.types index 997fd490bc..6d4f55c7a7 100644 --- a/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.types +++ b/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.types @@ -4,7 +4,7 @@ // enums are only subtypes of number, any and no other types enum E { A } ->E : E.A +>E : E >A : E.A interface I { @@ -14,7 +14,7 @@ interface I { >x : string foo: E; // ok ->foo : E.A +>foo : E } @@ -25,7 +25,7 @@ interface I2 { >x : string foo: E; // ok ->foo : E.A +>foo : E } // error cases @@ -36,7 +36,7 @@ interface I3 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -47,7 +47,7 @@ interface I4 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -58,7 +58,7 @@ interface I5 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -69,7 +69,7 @@ interface I6 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -81,7 +81,7 @@ interface I7 { >bar : number foo: E; ->foo : E.A +>foo : E } @@ -92,7 +92,7 @@ interface I8 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -103,7 +103,7 @@ interface I9 { >x : string foo: E; ->foo : E.A +>foo : E } class A { foo: number; } @@ -117,7 +117,7 @@ interface I10 { >x : string foo: E; ->foo : E.A +>foo : E } class A2 { foo: T; } @@ -132,7 +132,7 @@ interface I11 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -144,7 +144,7 @@ interface I12 { >x : any foo: E; ->foo : E.A +>foo : E } @@ -157,12 +157,12 @@ interface I13 { >x : T foo: E; ->foo : E.A +>foo : E } enum E2 { A } ->E2 : E2.A +>E2 : E2 >A : E2.A interface I14 { @@ -172,7 +172,7 @@ interface I14 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -193,7 +193,7 @@ interface I15 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -215,7 +215,7 @@ interface I16 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -227,7 +227,7 @@ interface I17 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -240,7 +240,7 @@ interface I18 { >x : string foo: E; ->foo : E.A +>foo : E } @@ -251,7 +251,7 @@ interface I19 { >x : string foo: E; // BUG 831833 ->foo : E.A +>foo : E } @@ -262,5 +262,5 @@ interface I20 { >x : string foo: E; // BUG 831833 ->foo : E.A +>foo : E } diff --git a/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.types.diff b/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.types.diff index d3f44cbd16..513055338e 100644 --- a/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.types.diff +++ b/testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.types.diff @@ -1,11 +1,6 @@ --- old.enumIsNotASubtypeOfAnythingButNumber.types +++ new.enumIsNotASubtypeOfAnythingButNumber.types -@@= skipped -3, +3 lines =@@ - // enums are only subtypes of number, any and no other types - - enum E { A } -->E : E -+>E : E.A +@@= skipped -7, +7 lines =@@ >A : E.A interface I { @@ -14,10 +9,7 @@ [x: string]: any; >x : string - foo: E; // ok -->foo : E -+>foo : E.A - } +@@= skipped -9, +11 lines =@@ interface I2 { @@ -26,10 +18,7 @@ [x: string]: number; >x : string - foo: E; // ok -->foo : E -+>foo : E.A - } +@@= skipped -9, +11 lines =@@ // error cases interface I3 { @@ -38,10 +27,7 @@ [x: string]: string; >x : string - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -9, +11 lines =@@ interface I4 { @@ -50,10 +36,7 @@ [x: string]: boolean; >x : string - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -9, +11 lines =@@ interface I5 { @@ -62,10 +45,7 @@ [x: string]: Date; >x : string - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -9, +11 lines =@@ interface I6 { @@ -74,10 +54,7 @@ [x: string]: RegExp; >x : string - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -9, +11 lines =@@ interface I7 { @@ -86,11 +63,7 @@ [x: string]: { bar: number }; >x : string >bar : number - - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -10, +12 lines =@@ interface I8 { @@ -99,10 +72,7 @@ [x: string]: number[]; >x : string - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -9, +11 lines =@@ interface I9 { @@ -111,13 +81,7 @@ [x: string]: I8; >x : string - foo: E; -->foo : E -+>foo : E.A - } - - class A { foo: number; } -@@= skipped -89, +107 lines =@@ +@@= skipped -12, +14 lines =@@ >foo : number interface I10 { @@ -126,10 +90,7 @@ [x: string]: A; >x : string - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -9, +11 lines =@@ class A2 { foo: T; } >A2 : A2 @@ -142,10 +103,7 @@ [x: string]: A2; >x : string - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -12, +15 lines =@@ interface I12 { @@ -154,11 +112,7 @@ [x: string]: (x) => number; >x : string >x : any - - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -10, +12 lines =@@ interface I13 { @@ -170,14 +124,7 @@ >x : T foo: E; -->foo : E -+>foo : E.A - } - - - enum E2 { A } -->E2 : E2 -+>E2 : E2.A +@@= skipped -14, +17 lines =@@ >A : E2.A interface I14 { @@ -186,13 +133,7 @@ [x: string]: E2; >x : string - foo: E; -->foo : E -+>foo : E.A - } - - -@@= skipped -64, +76 lines =@@ +@@= skipped -19, +21 lines =@@ >1 : 1 } interface I15 { @@ -203,11 +144,7 @@ ->f : typeof f foo: E; -->foo : E -+>foo : E.A - } - - + >foo : E @@= skipped -21, +22 lines =@@ >1 : 1 } @@ -219,9 +156,8 @@ ->c : typeof c foo: E; -->foo : E -+>foo : E.A - } + >foo : E +@@= skipped -10, +11 lines =@@ interface I17 { @@ -231,10 +167,7 @@ [x: string]: T; >x : string - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -9, +12 lines =@@ interface I18 { @@ -245,10 +178,7 @@ [x: string]: U; >x : string - foo: E; -->foo : E -+>foo : E.A - } +@@= skipped -9, +13 lines =@@ interface I19 { @@ -257,10 +187,7 @@ [x: string]: Object; >x : string - foo: E; // BUG 831833 -->foo : E -+>foo : E.A - } +@@= skipped -9, +11 lines =@@ interface I20 { @@ -269,7 +196,3 @@ [x: string]: {}; >x : string - foo: E; // BUG 831833 -->foo : E -+>foo : E.A - } diff --git a/testdata/baselines/reference/submodule/conformance/enumMerging.types b/testdata/baselines/reference/submodule/conformance/enumMerging.types index 86c43eb7dd..686bd8aa24 100644 --- a/testdata/baselines/reference/submodule/conformance/enumMerging.types +++ b/testdata/baselines/reference/submodule/conformance/enumMerging.types @@ -113,8 +113,8 @@ module M2 { } var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; ->x : (EComp2)[] ->[EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F] : (EComp2)[] +>x : EComp2[] +>[EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F] : EComp2[] >EComp2.A : EComp2.A >EComp2 : typeof EComp2 >A : EComp2.A @@ -197,25 +197,25 @@ module M6 { >A : typeof A export enum Color { Yellow = 1 } ->Color : Color.Yellow ->Yellow : Color.Yellow +>Color : Color +>Yellow : Color.Green >1 : 1 } var t = A.Color.Yellow; ->t : Color.Yellow ->A.Color.Yellow : Color.Yellow +>t : Color +>A.Color.Yellow : Color.Green >A.Color : typeof Color >A : typeof A >Color : typeof Color ->Yellow : Color.Yellow +>Yellow : Color.Green t = A.Color.Red; ->t = A.Color.Red : any ->t : Color.Yellow ->A.Color.Red : any +>t = A.Color.Red : Color.Red +>t : Color +>A.Color.Red : Color.Red >A.Color : typeof Color >A : typeof A >Color : typeof Color ->Red : any +>Red : Color.Red } diff --git a/testdata/baselines/reference/submodule/conformance/enumMerging.types.diff b/testdata/baselines/reference/submodule/conformance/enumMerging.types.diff index 0dd29199c1..d965ed5927 100644 --- a/testdata/baselines/reference/submodule/conformance/enumMerging.types.diff +++ b/testdata/baselines/reference/submodule/conformance/enumMerging.types.diff @@ -1,52 +1,34 @@ --- old.enumMerging.types +++ new.enumMerging.types -@@= skipped -112, +112 lines =@@ - } - - var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; -->x : EComp2[] -->[EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F] : EComp2[] -+>x : (EComp2)[] -+>[EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F] : (EComp2)[] - >EComp2.A : EComp2.A - >EComp2 : typeof EComp2 - >A : EComp2.A -@@= skipped -84, +84 lines =@@ - >A : typeof A - - export enum Color { Yellow = 1 } -->Color : Color -->Yellow : Color.Green -+>Color : Color.Yellow -+>Yellow : Color.Yellow +@@= skipped -201, +201 lines =@@ >1 : 1 } var t = A.Color.Yellow; ->t : A.Color ->A.Color.Yellow : A.Color.Green ->A.Color : typeof A.Color -+>t : Color.Yellow -+>A.Color.Yellow : Color.Yellow ++>t : Color ++>A.Color.Yellow : Color.Green +>A.Color : typeof Color >A : typeof A ->Color : typeof A.Color ->Yellow : A.Color.Green +>Color : typeof Color -+>Yellow : Color.Yellow ++>Yellow : Color.Green t = A.Color.Red; ->t = A.Color.Red : A.Color.Red ->t : A.Color ->A.Color.Red : A.Color.Red ->A.Color : typeof A.Color -+>t = A.Color.Red : any -+>t : Color.Yellow -+>A.Color.Red : any ++>t = A.Color.Red : Color.Red ++>t : Color ++>A.Color.Red : Color.Red +>A.Color : typeof Color >A : typeof A ->Color : typeof A.Color ->Red : A.Color.Red +>Color : typeof Color -+>Red : any ++>Red : Color.Red } diff --git a/testdata/baselines/reference/submodule/conformance/enumMergingErrors.types b/testdata/baselines/reference/submodule/conformance/enumMergingErrors.types index ee400a470a..c801a96604 100644 --- a/testdata/baselines/reference/submodule/conformance/enumMergingErrors.types +++ b/testdata/baselines/reference/submodule/conformance/enumMergingErrors.types @@ -65,7 +65,7 @@ module M1 { >M1 : typeof M1 export enum E1 { A = 0 } ->E1 : E1.A +>E1 : E1 >A : E1.A >0 : 0 } @@ -73,14 +73,14 @@ module M1 { >M1 : typeof M1 export enum E1 { B } ->E1 : E1.A +>E1 : E1 >B : E1.A } module M1 { >M1 : typeof M1 export enum E1 { C } ->E1 : E1.A +>E1 : E1 >C : E1.A } @@ -90,14 +90,14 @@ module M2 { >M2 : typeof M2 export enum E1 { A } ->E1 : E1.A +>E1 : E1 >A : E1.A } module M2 { >M2 : typeof M2 export enum E1 { B = 0 } ->E1 : E1.A +>E1 : E1 >B : E1.A >0 : 0 } @@ -105,7 +105,7 @@ module M2 { >M2 : typeof M2 export enum E1 { C } ->E1 : E1.A +>E1 : E1 >C : E1.A } diff --git a/testdata/baselines/reference/submodule/conformance/enumMergingErrors.types.diff b/testdata/baselines/reference/submodule/conformance/enumMergingErrors.types.diff deleted file mode 100644 index 3ae6de0c51..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumMergingErrors.types.diff +++ /dev/null @@ -1,54 +0,0 @@ ---- old.enumMergingErrors.types -+++ new.enumMergingErrors.types -@@= skipped -64, +64 lines =@@ - >M1 : typeof M1 - - export enum E1 { A = 0 } -->E1 : E1 -+>E1 : E1.A - >A : E1.A - >0 : 0 - } -@@= skipped -8, +8 lines =@@ - >M1 : typeof M1 - - export enum E1 { B } -->E1 : E1 -+>E1 : E1.A - >B : E1.A - } - module M1 { - >M1 : typeof M1 - - export enum E1 { C } -->E1 : E1 -+>E1 : E1.A - >C : E1.A - } - -@@= skipped -17, +17 lines =@@ - >M2 : typeof M2 - - export enum E1 { A } -->E1 : E1 -+>E1 : E1.A - >A : E1.A - } - module M2 { - >M2 : typeof M2 - - export enum E1 { B = 0 } -->E1 : E1 -+>E1 : E1.A - >B : E1.A - >0 : 0 - } -@@= skipped -15, +15 lines =@@ - >M2 : typeof M2 - - export enum E1 { C } -->E1 : E1 -+>E1 : E1.A - >C : E1.A - } - diff --git a/testdata/baselines/reference/submodule/conformance/enumShadowedInfinityNaN.types b/testdata/baselines/reference/submodule/conformance/enumShadowedInfinityNaN.types index 685025eabb..c1013f1704 100644 --- a/testdata/baselines/reference/submodule/conformance/enumShadowedInfinityNaN.types +++ b/testdata/baselines/reference/submodule/conformance/enumShadowedInfinityNaN.types @@ -9,7 +9,7 @@ >{} : {} enum En { ->En : En.X +>En : En X = Infinity >X : En.X @@ -23,7 +23,7 @@ >{} : {} enum En { ->En : En.X +>En : En X = NaN >X : En.X diff --git a/testdata/baselines/reference/submodule/conformance/enumShadowedInfinityNaN.types.diff b/testdata/baselines/reference/submodule/conformance/enumShadowedInfinityNaN.types.diff deleted file mode 100644 index bd4cf5b3ab..0000000000 --- a/testdata/baselines/reference/submodule/conformance/enumShadowedInfinityNaN.types.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.enumShadowedInfinityNaN.types -+++ new.enumShadowedInfinityNaN.types -@@= skipped -8, +8 lines =@@ - >{} : {} - - enum En { -->En : En -+>En : En.X - - X = Infinity - >X : En.X -@@= skipped -14, +14 lines =@@ - >{} : {} - - enum En { -->En : En -+>En : En.X - - X = NaN - >X : En.X diff --git a/testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target5.types b/testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target5.types index 6cf44224d4..00795f5cfa 100644 --- a/testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target5.types +++ b/testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target5.types @@ -2,14 +2,14 @@ === es6modulekindWithES5Target5.ts === export enum E1 { ->E1 : E1.value1 +>E1 : E1 value1 >value1 : E1.value1 } export const enum E2 { ->E2 : E2.value1 +>E2 : E2 value1 >value1 : E2.value1 diff --git a/testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target5.types.diff b/testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target5.types.diff deleted file mode 100644 index 93fdcb2f09..0000000000 --- a/testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target5.types.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.es6modulekindWithES5Target5.types -+++ new.es6modulekindWithES5Target5.types -@@= skipped -1, +1 lines =@@ - - === es6modulekindWithES5Target5.ts === - export enum E1 { -->E1 : E1 -+>E1 : E1.value1 - - value1 - >value1 : E1.value1 - } - - export const enum E2 { -->E2 : E2 -+>E2 : E2.value1 - - value1 - >value1 : E2.value1 diff --git a/testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target5.types b/testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target5.types index 6a7ffce477..60d69fec5f 100644 --- a/testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target5.types +++ b/testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target5.types @@ -2,14 +2,14 @@ === esnextmodulekindWithES5Target5.ts === export enum E1 { ->E1 : E1.value1 +>E1 : E1 value1 >value1 : E1.value1 } export const enum E2 { ->E2 : E2.value1 +>E2 : E2 value1 >value1 : E2.value1 diff --git a/testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target5.types.diff b/testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target5.types.diff deleted file mode 100644 index 119c513244..0000000000 --- a/testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target5.types.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.esnextmodulekindWithES5Target5.types -+++ new.esnextmodulekindWithES5Target5.types -@@= skipped -1, +1 lines =@@ - - === esnextmodulekindWithES5Target5.ts === - export enum E1 { -->E1 : E1 -+>E1 : E1.value1 - - value1 - >value1 : E1.value1 - } - - export const enum E2 { -->E2 : E2 -+>E2 : E2.value1 - - value1 - >value1 : E2.value1 diff --git a/testdata/baselines/reference/submodule/conformance/everyTypeAssignableToAny.types b/testdata/baselines/reference/submodule/conformance/everyTypeAssignableToAny.types index 86c59823e0..53a0bfc9c9 100644 --- a/testdata/baselines/reference/submodule/conformance/everyTypeAssignableToAny.types +++ b/testdata/baselines/reference/submodule/conformance/everyTypeAssignableToAny.types @@ -23,11 +23,11 @@ var ai: I; >ai : I enum E { A } ->E : E.A +>E : E >A : E.A var ae: E; ->ae : E.A +>ae : E var b: number; >b : number @@ -167,9 +167,9 @@ a = ai; >ai : I a = ae; ->a = ae : E.A +>a = ae : E >a : any ->ae : E.A +>ae : E function foo(x: T, y: U, z: V) { >foo : (x: T, y: U, z: V) => void diff --git a/testdata/baselines/reference/submodule/conformance/everyTypeAssignableToAny.types.diff b/testdata/baselines/reference/submodule/conformance/everyTypeAssignableToAny.types.diff index d3ec3eb865..7250f643e3 100644 --- a/testdata/baselines/reference/submodule/conformance/everyTypeAssignableToAny.types.diff +++ b/testdata/baselines/reference/submodule/conformance/everyTypeAssignableToAny.types.diff @@ -9,21 +9,7 @@ foo: string; >foo : string } -@@= skipped -7, +9 lines =@@ - >ai : I - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - var ae: E; -->ae : E -+>ae : E.A - - var b: number; - >b : number -@@= skipped -49, +49 lines =@@ +@@= skipped -56, +58 lines =@@ var o: (x: T) => T; >o : (x: T) => T @@ -31,15 +17,7 @@ >x : T var p: Number; -@@= skipped -94, +95 lines =@@ - >ai : I - - a = ae; -->a = ae : E -+>a = ae : E.A - >a : any -->ae : E -+>ae : E.A +@@= skipped -100, +101 lines =@@ function foo(x: T, y: U, z: V) { >foo : (x: T, y: U, z: V) => void diff --git a/testdata/baselines/reference/submodule/conformance/exportCodeGen.types b/testdata/baselines/reference/submodule/conformance/exportCodeGen.types index 587562fea3..ad9abfc3ae 100644 --- a/testdata/baselines/reference/submodule/conformance/exportCodeGen.types +++ b/testdata/baselines/reference/submodule/conformance/exportCodeGen.types @@ -67,7 +67,7 @@ module E { >E : typeof E export enum Color { Red } ->Color : Color.Red +>Color : Color >Red : Color.Red export function fn() { } @@ -96,7 +96,7 @@ module F { >F : typeof F enum Color { Red } ->Color : Color.Red +>Color : Color >Red : Color.Red function fn() { } diff --git a/testdata/baselines/reference/submodule/conformance/exportCodeGen.types.diff b/testdata/baselines/reference/submodule/conformance/exportCodeGen.types.diff index 22b47c154b..348787d495 100644 --- a/testdata/baselines/reference/submodule/conformance/exportCodeGen.types.diff +++ b/testdata/baselines/reference/submodule/conformance/exportCodeGen.types.diff @@ -1,14 +1,6 @@ --- old.exportCodeGen.types +++ new.exportCodeGen.types -@@= skipped -66, +66 lines =@@ - >E : typeof E - - export enum Color { Red } -->Color : Color -+>Color : Color.Red - >Red : Color.Red - - export function fn() { } +@@= skipped -73, +73 lines =@@ >fn : () => void export interface I { id: number } @@ -17,14 +9,6 @@ export class C { name: string } @@= skipped -28, +29 lines =@@ - >F : typeof F - - enum Color { Red } -->Color : Color -+>Color : Color.Red - >Red : Color.Red - - function fn() { } >fn : () => void interface I { id: number } diff --git a/testdata/baselines/reference/submodule/conformance/for-of47.types b/testdata/baselines/reference/submodule/conformance/for-of47.types index dbc741ff63..2e40be4b46 100644 --- a/testdata/baselines/reference/submodule/conformance/for-of47.types +++ b/testdata/baselines/reference/submodule/conformance/for-of47.types @@ -15,18 +15,18 @@ var array = [{ x: "", y: true }] >true : true enum E { x } ->E : E.x +>E : E >x : E.x for ({x, y: y = E.x} of array) { ->{x, y: y = E.x} : { x: string; y?: E.x; } +>{x, y: y = E.x} : { x: string; y?: E; } >x : any ->y : E.x ->y = E.x : E.x +>y : E +>y = E.x : E >y : number ->E.x : E.x +>E.x : E >E : typeof E ->x : E.x +>x : E >array : { x: string; y: boolean; }[] x; diff --git a/testdata/baselines/reference/submodule/conformance/for-of47.types.diff b/testdata/baselines/reference/submodule/conformance/for-of47.types.diff index 759833588d..a3e3f39c89 100644 --- a/testdata/baselines/reference/submodule/conformance/for-of47.types.diff +++ b/testdata/baselines/reference/submodule/conformance/for-of47.types.diff @@ -1,28 +1,11 @@ --- old.for-of47.types +++ new.for-of47.types -@@= skipped -14, +14 lines =@@ - >true : true - - enum E { x } -->E : E -+>E : E.x - >x : E.x +@@= skipped -19, +19 lines =@@ for ({x, y: y = E.x} of array) { -->{x, y: y = E.x} : { x: string; y?: E; } + >{x, y: y = E.x} : { x: string; y?: E; } ->x : string -->y : E -->y = E.x : E -+>{x, y: y = E.x} : { x: string; y?: E.x; } +>x : any -+>y : E.x -+>y = E.x : E.x + >y : E + >y = E.x : E >y : number -->E.x : E -+>E.x : E.x - >E : typeof E -->x : E -+>x : E.x - >array : { x: string; y: boolean; }[] - - x; diff --git a/testdata/baselines/reference/submodule/conformance/for-of48.types b/testdata/baselines/reference/submodule/conformance/for-of48.types index 0b6ac7955c..685bba7397 100644 --- a/testdata/baselines/reference/submodule/conformance/for-of48.types +++ b/testdata/baselines/reference/submodule/conformance/for-of48.types @@ -15,16 +15,16 @@ var array = [{ x: "", y: true }] >true : true enum E { x } ->E : E.x +>E : E >x : E.x for ({x, y = E.x} of array) { >{x, y = E.x} : { x: string; y?: number; } >x : any >y : any ->E.x : E.x +>E.x : E >E : typeof E ->x : E.x +>x : E >array : { x: string; y: boolean; }[] x; diff --git a/testdata/baselines/reference/submodule/conformance/for-of48.types.diff b/testdata/baselines/reference/submodule/conformance/for-of48.types.diff index 20d7cadcaf..eb7d0b443c 100644 --- a/testdata/baselines/reference/submodule/conformance/for-of48.types.diff +++ b/testdata/baselines/reference/submodule/conformance/for-of48.types.diff @@ -1,24 +1,13 @@ --- old.for-of48.types +++ new.for-of48.types -@@= skipped -14, +14 lines =@@ - >true : true - - enum E { x } -->E : E -+>E : E.x - >x : E.x +@@= skipped -19, +19 lines =@@ for ({x, y = E.x} of array) { >{x, y = E.x} : { x: string; y?: number; } ->x : string ->y : number -->E.x : E +>x : any +>y : any -+>E.x : E.x + >E.x : E >E : typeof E -->x : E -+>x : E.x - >array : { x: string; y: boolean; }[] - - x; + >x : E diff --git a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.types b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.types index 86e8b938c9..50a6429ff2 100644 --- a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.types +++ b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.types @@ -111,11 +111,11 @@ module onlyT { } enum E { A } ->E : E.A +>E : E >A : E.A enum F { A } ->F : F.A +>F : F >A : F.A function foo3(x: T, a: (x: T) => T, b: (x: T) => T) { @@ -136,22 +136,22 @@ module onlyT { } var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error ->r7 : (x: E.A) => E.A ->foo3(E.A, (x) => E.A, (x) => F.A) : (x: E.A) => E.A +>r7 : (x: E) => E +>foo3(E.A, (x) => E.A, (x) => F.A) : (x: E) => E >foo3 : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A ->(x) => E.A : (x: E.A) => E.A ->x : E.A ->E.A : E.A +>A : E +>(x) => E.A : (x: E) => E +>x : E +>E.A : E >E : typeof E ->A : E.A ->(x) => F.A : (x: E.A) => F.A ->x : E.A ->F.A : F.A +>A : E +>(x) => F.A : (x: E) => F +>x : E +>F.A : F >F : typeof F ->A : F.A +>A : F } module TU { @@ -262,11 +262,11 @@ module TU { } enum E { A } ->E : E.A +>E : E >A : E.A enum F { A } ->F : F.A +>F : F >A : F.A function foo3(x: T, a: (x: T) => T, b: (x: U) => U) { @@ -287,20 +287,20 @@ module TU { } var r7 = foo3(E.A, (x) => E.A, (x) => F.A); ->r7 : (x: E.A) => E.A ->foo3(E.A, (x) => E.A, (x) => F.A) : (x: E.A) => E.A +>r7 : (x: E) => E +>foo3(E.A, (x) => E.A, (x) => F.A) : (x: E) => E >foo3 : (x: T, a: (x: T) => T, b: (x: U) => U) => (x: T) => T ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A ->(x) => E.A : (x: E.A) => E.A ->x : E.A ->E.A : E.A +>A : E +>(x) => E.A : (x: E) => E +>x : E +>E.A : E >E : typeof E ->A : E.A ->(x) => F.A : (x: U) => F.A +>A : E +>(x) => F.A : (x: U) => F >x : U ->F.A : F.A +>F.A : F >F : typeof F ->A : F.A +>A : F } diff --git a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.types.diff b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.types.diff index 4c620a9154..33d91efadb 100644 --- a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.types.diff +++ b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.types.diff @@ -55,18 +55,7 @@ >(a) => a : (a: Date) => Date >a : Date >a : Date -@@= skipped -10, +10 lines =@@ - } - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - enum F { A } -->F : F -+>F : F.A - >A : F.A +@@= skipped -19, +19 lines =@@ function foo3(x: T, a: (x: T) => T, b: (x: T) => T) { >foo3 : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T @@ -74,42 +63,7 @@ >x : T >a : (x: T) => T >x : T -@@= skipped -24, +25 lines =@@ - } - - var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error -->r7 : (x: E) => E -->foo3(E.A, (x) => E.A, (x) => F.A) : (x: E) => E -+>r7 : (x: E.A) => E.A -+>foo3(E.A, (x) => E.A, (x) => F.A) : (x: E.A) => E.A - >foo3 : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -->(x) => E.A : (x: E) => E -->x : E -->E.A : E -+>A : E.A -+>(x) => E.A : (x: E.A) => E.A -+>x : E.A -+>E.A : E.A - >E : typeof E -->A : E -->(x) => F.A : (x: E) => F -->x : E -->F.A : F -+>A : E.A -+>(x) => F.A : (x: E.A) => F.A -+>x : E.A -+>F.A : F.A - >F : typeof F -->A : F -+>A : F.A - } - - module TU { -@@= skipped -23, +23 lines =@@ +@@= skipped -38, +39 lines =@@ function foo(a: (x: T) => T, b: (x: U) => U) { >foo : (a: (x: T) => T, b: (x: U) => U) => (x: T) => T @@ -166,18 +120,7 @@ >(a) => a : (a: Date) => Date >a : Date >a : Date -@@= skipped -10, +10 lines =@@ - } - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - enum F { A } -->F : F -+>F : F.A - >A : F.A +@@= skipped -19, +19 lines =@@ function foo3(x: T, a: (x: T) => T, b: (x: U) => U) { >foo3 : (x: T, a: (x: T) => T, b: (x: U) => U) => (x: T) => T @@ -185,35 +128,3 @@ >x : T >a : (x: T) => T >x : T -@@= skipped -24, +25 lines =@@ - } - - var r7 = foo3(E.A, (x) => E.A, (x) => F.A); -->r7 : (x: E) => E -->foo3(E.A, (x) => E.A, (x) => F.A) : (x: E) => E -+>r7 : (x: E.A) => E.A -+>foo3(E.A, (x) => E.A, (x) => F.A) : (x: E.A) => E.A - >foo3 : (x: T, a: (x: T) => T, b: (x: U) => U) => (x: T) => T -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -->(x) => E.A : (x: E) => E -->x : E -->E.A : E -+>A : E.A -+>(x) => E.A : (x: E.A) => E.A -+>x : E.A -+>E.A : E.A - >E : typeof E -->A : E -->(x) => F.A : (x: U) => F -+>A : E.A -+>(x) => F.A : (x: U) => F.A - >x : U -->F.A : F -+>F.A : F.A - >F : typeof F -->A : F -+>A : F.A - } diff --git a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments3.types b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments3.types index 789c13ee72..de60d86a2b 100644 --- a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments3.types +++ b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments3.types @@ -91,30 +91,30 @@ var r5 = foo(new Object(), (x) => '', (x) => ''); // Object => Object >'' : "" enum E { A } ->E : E.A +>E : E >A : E.A enum F { A } ->F : F.A +>F : F >A : F.A var r6 = foo(E.A, (x: number) => E.A, (x: F) => F.A); // number => number >r6 : (x: number) => number >foo(E.A, (x: number) => E.A, (x: F) => F.A) : (x: number) => number >foo : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A ->(x: number) => E.A : (x: number) => E.A +>A : E +>(x: number) => E.A : (x: number) => E >x : number ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A ->(x: F) => F.A : (x: F.A) => F.A ->x : F.A ->F.A : F.A +>A : E +>(x: F) => F.A : (x: F) => F +>x : F +>F.A : F >F : typeof F ->A : F.A +>A : F function foo2(x: T, a: (x: T) => U, b: (x: T) => U) { diff --git a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments3.types.diff b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments3.types.diff index 4430626482..e9ae0b672a 100644 --- a/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments3.types.diff +++ b/testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments3.types.diff @@ -8,46 +8,7 @@ >x : T >a : (x: T) => T >x : T -@@= skipped -84, +85 lines =@@ - >'' : "" - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - enum F { A } -->F : F -+>F : F.A - >A : F.A - - var r6 = foo(E.A, (x: number) => E.A, (x: F) => F.A); // number => number - >r6 : (x: number) => number - >foo(E.A, (x: number) => E.A, (x: F) => F.A) : (x: number) => number - >foo : (x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -->(x: number) => E.A : (x: number) => E -+>A : E.A -+>(x: number) => E.A : (x: number) => E.A - >x : number -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -->(x: F) => F.A : (x: F) => F -->x : F -->F.A : F -+>A : E.A -+>(x: F) => F.A : (x: F.A) => F.A -+>x : F.A -+>F.A : F.A - >F : typeof F -->A : F -+>A : F.A - +@@= skipped -112, +113 lines =@@ function foo2(x: T, a: (x: T) => U, b: (x: T) => U) { >foo2 : (x: T, a: (x: T) => U, b: (x: T) => U) => (x: T) => U diff --git a/testdata/baselines/reference/submodule/conformance/importElisionConstEnumMerge1.types b/testdata/baselines/reference/submodule/conformance/importElisionConstEnumMerge1.types index 09eadcfc91..46e29c9cba 100644 --- a/testdata/baselines/reference/submodule/conformance/importElisionConstEnumMerge1.types +++ b/testdata/baselines/reference/submodule/conformance/importElisionConstEnumMerge1.types @@ -2,7 +2,7 @@ === enum.ts === export const enum Enum { ->Enum : Enum.One +>Enum : Enum One = 1, >One : Enum.One @@ -27,7 +27,7 @@ import { Enum } from "./merge"; >Enum : typeof Enum Enum.One; ->Enum.One : Enum.One +>Enum.One : Enum >Enum : typeof Enum ->One : Enum.One +>One : Enum diff --git a/testdata/baselines/reference/submodule/conformance/importElisionConstEnumMerge1.types.diff b/testdata/baselines/reference/submodule/conformance/importElisionConstEnumMerge1.types.diff index 9c8a6ccf86..4dd4919b77 100644 --- a/testdata/baselines/reference/submodule/conformance/importElisionConstEnumMerge1.types.diff +++ b/testdata/baselines/reference/submodule/conformance/importElisionConstEnumMerge1.types.diff @@ -1,15 +1,6 @@ --- old.importElisionConstEnumMerge1.types +++ new.importElisionConstEnumMerge1.types -@@= skipped -1, +1 lines =@@ - - === enum.ts === - export const enum Enum { -->Enum : Enum -+>Enum : Enum.One - - One = 1, - >One : Enum.One -@@= skipped -12, +12 lines =@@ +@@= skipped -13, +13 lines =@@ >Enum : typeof Enum namespace Enum { @@ -29,7 +20,7 @@ ->Enum.One : import("enum").Enum ->Enum : typeof import("enum").Enum ->One : import("enum").Enum -+>Enum.One : Enum.One ++>Enum.One : Enum +>Enum : typeof Enum -+>One : Enum.One ++>One : Enum diff --git a/testdata/baselines/reference/submodule/conformance/inOperatorWithInvalidOperands.types b/testdata/baselines/reference/submodule/conformance/inOperatorWithInvalidOperands.types index c42c9d211b..87a02fdc74 100644 --- a/testdata/baselines/reference/submodule/conformance/inOperatorWithInvalidOperands.types +++ b/testdata/baselines/reference/submodule/conformance/inOperatorWithInvalidOperands.types @@ -5,7 +5,7 @@ class Foo {} >Foo : Foo enum E { a } ->E : E.a +>E : E >a : E.a var x: any; @@ -23,7 +23,7 @@ var a3: {}; >a3 : {} var a4: E; ->a4 : E.a +>a4 : E var a5: Foo | string; >a5 : string | Foo @@ -52,7 +52,7 @@ var ra3 = a3 in x; var ra4 = a4 in x; >ra4 : boolean >a4 in x : boolean ->a4 : E.a +>a4 : E >x : any var ra5 = null in x; @@ -69,9 +69,9 @@ var ra6 = undefined in x; var ra7 = E.a in x; >ra7 : boolean >E.a in x : boolean ->E.a : E.a +>E.a : E >E : typeof E ->a : E.a +>a : E >x : any var ra8 = false in x; diff --git a/testdata/baselines/reference/submodule/conformance/inOperatorWithInvalidOperands.types.diff b/testdata/baselines/reference/submodule/conformance/inOperatorWithInvalidOperands.types.diff deleted file mode 100644 index 77c0c746a7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/inOperatorWithInvalidOperands.types.diff +++ /dev/null @@ -1,41 +0,0 @@ ---- old.inOperatorWithInvalidOperands.types -+++ new.inOperatorWithInvalidOperands.types -@@= skipped -4, +4 lines =@@ - >Foo : Foo - - enum E { a } -->E : E -+>E : E.a - >a : E.a - - var x: any; -@@= skipped -18, +18 lines =@@ - >a3 : {} - - var a4: E; -->a4 : E -+>a4 : E.a - - var a5: Foo | string; - >a5 : string | Foo -@@= skipped -29, +29 lines =@@ - var ra4 = a4 in x; - >ra4 : boolean - >a4 in x : boolean -->a4 : E -+>a4 : E.a - >x : any - - var ra5 = null in x; -@@= skipped -17, +17 lines =@@ - var ra7 = E.a in x; - >ra7 : boolean - >E.a in x : boolean -->E.a : E -+>E.a : E.a - >E : typeof E -->a : E -+>a : E.a - >x : any - - var ra8 = false in x; diff --git a/testdata/baselines/reference/submodule/conformance/interfaceWithPropertyOfEveryType.types b/testdata/baselines/reference/submodule/conformance/interfaceWithPropertyOfEveryType.types index 19beb040f6..eec03eef8b 100644 --- a/testdata/baselines/reference/submodule/conformance/interfaceWithPropertyOfEveryType.types +++ b/testdata/baselines/reference/submodule/conformance/interfaceWithPropertyOfEveryType.types @@ -16,7 +16,7 @@ module M { >1 : 1 } enum E { A } ->E : E.A +>E : E >A : E.A interface Foo { @@ -68,12 +68,12 @@ interface Foo { >n : {} o: E; ->o : E.A +>o : E } var a: Foo = { >a : Foo ->{ a: 1, b: '', c: true, d: {}, e: null , f: [1], g: {}, h: (x: number) => 1, i: (x: T) => x, j: null, k: new C(), l: f1, m: M, n: {}, o: E.A} : { a: number; b: string; c: true; d: {}; e: null; f: number[]; g: {}; h: (x: number) => number; i: (x: T) => T; j: Foo; k: C; l: () => void; m: typeof M; n: {}; o: E.A; } +>{ a: 1, b: '', c: true, d: {}, e: null , f: [1], g: {}, h: (x: number) => 1, i: (x: T) => x, j: null, k: new C(), l: f1, m: M, n: {}, o: E.A} : { a: number; b: string; c: true; d: {}; e: null; f: number[]; g: {}; h: (x: number) => number; i: (x: T) => T; j: Foo; k: C; l: () => void; m: typeof M; n: {}; o: E; } a: 1, >a : number @@ -138,8 +138,8 @@ var a: Foo = { >{} : {} o: E.A ->o : E.A ->E.A : E.A +>o : E +>E.A : E >E : typeof E ->A : E.A +>A : E } diff --git a/testdata/baselines/reference/submodule/conformance/interfaceWithPropertyOfEveryType.types.diff b/testdata/baselines/reference/submodule/conformance/interfaceWithPropertyOfEveryType.types.diff index a175a3198a..73ae3aea8e 100644 --- a/testdata/baselines/reference/submodule/conformance/interfaceWithPropertyOfEveryType.types.diff +++ b/testdata/baselines/reference/submodule/conformance/interfaceWithPropertyOfEveryType.types.diff @@ -1,11 +1,6 @@ --- old.interfaceWithPropertyOfEveryType.types +++ new.interfaceWithPropertyOfEveryType.types -@@= skipped -15, +15 lines =@@ - >1 : 1 - } - enum E { A } -->E : E -+>E : E.A +@@= skipped -19, +19 lines =@@ >A : E.A interface Foo { @@ -14,7 +9,7 @@ a: number; >a : number -@@= skipped -31, +33 lines =@@ +@@= skipped -27, +29 lines =@@ i: (x: T) => T; >i : (x: T) => T @@ -34,19 +29,6 @@ n: {}; >n : {} - - o: E; -->o : E -+>o : E.A - } - - var a: Foo = { - >a : Foo -->{ a: 1, b: '', c: true, d: {}, e: null , f: [1], g: {}, h: (x: number) => 1, i: (x: T) => x, j: null, k: new C(), l: f1, m: M, n: {}, o: E.A} : { a: number; b: string; c: true; d: {}; e: null; f: number[]; g: {}; h: (x: number) => number; i: (x: T) => T; j: Foo; k: C; l: () => void; m: typeof M; n: {}; o: E; } -+>{ a: 1, b: '', c: true, d: {}, e: null , f: [1], g: {}, h: (x: number) => 1, i: (x: T) => x, j: null, k: new C(), l: f1, m: M, n: {}, o: E.A} : { a: number; b: string; c: true; d: {}; e: null; f: number[]; g: {}; h: (x: number) => number; i: (x: T) => T; j: Foo; k: C; l: () => void; m: typeof M; n: {}; o: E.A; } - - a: 1, - >a : number @@= skipped -54, +52 lines =@@ i: (x: T) => x, >i : (x: T) => T @@ -55,15 +37,3 @@ >x : T >x : T -@@= skipped -25, +26 lines =@@ - >{} : {} - - o: E.A -->o : E -->E.A : E -+>o : E.A -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - } diff --git a/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.types b/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.types index 8444d91643..46b4a1f41f 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.types +++ b/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.types @@ -22,11 +22,11 @@ var d: typeof undefined = x; >x : true enum E { A } ->E : E.A +>E : E >A : E.A var e: E = x; ->e : E.A +>e : E >x : true class C { foo: string } diff --git a/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.types.diff b/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.types.diff index 7ed1702f0c..167a59e4a3 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.types.diff +++ b/testdata/baselines/reference/submodule/conformance/invalidBooleanAssignments.types.diff @@ -8,16 +8,6 @@ >x : true enum E { A } -->E : E -+>E : E.A - >A : E.A - - var e: E = x; -->e : E -+>e : E.A - >x : true - - class C { foo: string } @@= skipped -20, +19 lines =@@ >x : true diff --git a/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.types b/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.types index 43b8ac6109..95964fb1b2 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.types +++ b/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.types @@ -73,10 +73,10 @@ i = x; >x : string enum E { A } ->E : E.A +>E : E >A : E.A var j: E = x; ->j : E.A +>j : E >x : string diff --git a/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.types.diff b/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.types.diff index 73660bc41a..a039b43913 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.types.diff +++ b/testdata/baselines/reference/submodule/conformance/invalidStringAssignments.types.diff @@ -24,16 +24,3 @@ >a : T a = x; -@@= skipped -13, +14 lines =@@ - >x : string - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - var j: E = x; -->j : E -+>j : E.A - >x : string - diff --git a/testdata/baselines/reference/submodule/conformance/invalidUndefinedAssignments.types b/testdata/baselines/reference/submodule/conformance/invalidUndefinedAssignments.types index 3719115062..4c252a6919 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidUndefinedAssignments.types +++ b/testdata/baselines/reference/submodule/conformance/invalidUndefinedAssignments.types @@ -5,7 +5,7 @@ var x: typeof undefined; >x : any enum E { A } ->E : E.A +>E : E >A : E.A E = x; diff --git a/testdata/baselines/reference/submodule/conformance/invalidUndefinedAssignments.types.diff b/testdata/baselines/reference/submodule/conformance/invalidUndefinedAssignments.types.diff index 02d2d27642..944ceaec84 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidUndefinedAssignments.types.diff +++ b/testdata/baselines/reference/submodule/conformance/invalidUndefinedAssignments.types.diff @@ -7,11 +7,7 @@ ->undefined : undefined enum E { A } -->E : E -+>E : E.A - >A : E.A - - E = x; + >E : E @@= skipped -31, +30 lines =@@ >x : any diff --git a/testdata/baselines/reference/submodule/conformance/invalidUndefinedValues.types b/testdata/baselines/reference/submodule/conformance/invalidUndefinedValues.types index d6e091e314..611d445130 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidUndefinedValues.types +++ b/testdata/baselines/reference/submodule/conformance/invalidUndefinedValues.types @@ -92,7 +92,7 @@ x = f; >f : (a: T) => void enum E { A } ->E : E.A +>E : E >A : E.A x = E; @@ -101,9 +101,9 @@ x = E; >E : typeof E x = E.A; ->x = E.A : E.A +>x = E.A : E >x : any ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E diff --git a/testdata/baselines/reference/submodule/conformance/invalidUndefinedValues.types.diff b/testdata/baselines/reference/submodule/conformance/invalidUndefinedValues.types.diff index 9e72f2c46b..38d443b501 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidUndefinedValues.types.diff +++ b/testdata/baselines/reference/submodule/conformance/invalidUndefinedValues.types.diff @@ -33,25 +33,3 @@ >a : T x = a; -@@= skipped -20, +21 lines =@@ - >f : (a: T) => void - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - x = E; -@@= skipped -9, +9 lines =@@ - >E : typeof E - - x = E.A; -->x = E.A : E -+>x = E.A : E.A - >x : any -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - diff --git a/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.types b/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.types index 4a2a073fbe..dba43572fd 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.types +++ b/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.types @@ -72,7 +72,7 @@ i = x; >x : void enum E { A } ->E : E.A +>E : E >A : E.A x = E; @@ -81,11 +81,11 @@ x = E; >E : typeof E x = E.A; ->x = E.A : E.A +>x = E.A : E >x : void ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E x = { f() { } } >x = { f() { } } : { f: () => void; } diff --git a/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.types.diff b/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.types.diff index 214d12dbc1..90d15f4538 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.types.diff +++ b/testdata/baselines/reference/submodule/conformance/invalidVoidAssignments.types.diff @@ -24,27 +24,8 @@ >a : T a = x; -@@= skipped -13, +14 lines =@@ - >x : void - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - x = E; -@@= skipped -9, +9 lines =@@ - >E : typeof E - - x = E.A; -->x = E.A : E -+>x = E.A : E.A - >x : void -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A +@@= skipped -29, +30 lines =@@ + >A : E x = { f() { } } ->x = { f() { } } : { f(): void; } diff --git a/testdata/baselines/reference/submodule/conformance/invalidVoidValues.types b/testdata/baselines/reference/submodule/conformance/invalidVoidValues.types index f6c7e503a8..134ef2a0e9 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidVoidValues.types +++ b/testdata/baselines/reference/submodule/conformance/invalidVoidValues.types @@ -20,7 +20,7 @@ x = true; >true : true enum E { A } ->E : E.A +>E : E >A : E.A x = E; @@ -29,11 +29,11 @@ x = E; >E : typeof E x = E.A; ->x = E.A : E.A +>x = E.A : E >x : void ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E class C { foo: string } >C : C diff --git a/testdata/baselines/reference/submodule/conformance/invalidVoidValues.types.diff b/testdata/baselines/reference/submodule/conformance/invalidVoidValues.types.diff index 82428c324f..a3aab0a824 100644 --- a/testdata/baselines/reference/submodule/conformance/invalidVoidValues.types.diff +++ b/testdata/baselines/reference/submodule/conformance/invalidVoidValues.types.diff @@ -1,30 +1,6 @@ --- old.invalidVoidValues.types +++ new.invalidVoidValues.types -@@= skipped -19, +19 lines =@@ - >true : true - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - x = E; -@@= skipped -9, +9 lines =@@ - >E : typeof E - - x = E.A; -->x = E.A : E -+>x = E.A : E.A - >x : void -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - class C { foo: string } - >C : C -@@= skipped -19, +19 lines =@@ +@@= skipped -47, +47 lines =@@ >a : C interface I { foo: string } diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsEnums.types b/testdata/baselines/reference/submodule/conformance/jsDeclarationsEnums.types index d252d94551..097f121f31 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsEnums.types +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsEnums.types @@ -5,10 +5,10 @@ // but we should be able to synthesize declarations from the symbols regardless export enum A {} ->A : "index".A +>A : import("index").A export enum B { ->B : B.Member +>B : B Member >Member : B.Member @@ -28,7 +28,7 @@ export { DD as D }; >D : typeof DD export enum E {} ->E : "index".E +>E : import("index").E export { E as EE }; >E : typeof E @@ -39,7 +39,7 @@ export { F as FF }; >FF : typeof F export enum F {} ->F : "index".F +>F : import("index").F export enum G { >G : G diff --git a/testdata/baselines/reference/submodule/conformance/jsDeclarationsEnums.types.diff b/testdata/baselines/reference/submodule/conformance/jsDeclarationsEnums.types.diff index 3bd16c5f53..8eb85df05d 100644 --- a/testdata/baselines/reference/submodule/conformance/jsDeclarationsEnums.types.diff +++ b/testdata/baselines/reference/submodule/conformance/jsDeclarationsEnums.types.diff @@ -5,20 +5,16 @@ export enum A {} ->A : A -+>A : "index".A ++>A : import("index").A export enum B { -->B : B -+>B : B.Member - - Member - >Member : B.Member + >B : B @@= skipped -23, +23 lines =@@ >D : typeof DD export enum E {} ->E : E -+>E : "index".E ++>E : import("index").E export { E as EE }; >E : typeof E @@ -27,7 +23,7 @@ export enum F {} ->F : F -+>F : "index".F ++>F : import("index").F export enum G { >G : G diff --git a/testdata/baselines/reference/submodule/conformance/mappedTypeOverlappingStringEnumKeys.types b/testdata/baselines/reference/submodule/conformance/mappedTypeOverlappingStringEnumKeys.types index 9e5acdd2f2..ab664fa991 100644 --- a/testdata/baselines/reference/submodule/conformance/mappedTypeOverlappingStringEnumKeys.types +++ b/testdata/baselines/reference/submodule/conformance/mappedTypeOverlappingStringEnumKeys.types @@ -17,7 +17,7 @@ enum TerrestrialAnimalTypes { }; enum AlienAnimalTypes { ->AlienAnimalTypes : AlienAnimalTypes.CAT +>AlienAnimalTypes : AlienAnimalTypes CAT = "cat", >CAT : AlienAnimalTypes.CAT @@ -43,7 +43,7 @@ interface AlienCat { >AlienCat : AlienCat type: AlienAnimalTypes.CAT ->type : AlienAnimalTypes.CAT +>type : AlienAnimalTypes >AlienAnimalTypes : any planet: string; @@ -64,11 +64,11 @@ type CatMap = { const catMap: CatMap = { >catMap : CatMap ->{ cat: [ { type: TerrestrialAnimalTypes.CAT, address: "" }, { type: AlienAnimalTypes.CAT, planet: "" } ], dog: [] as never[]} : { cat: ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes.CAT; planet: string; })[]; dog: never[]; } +>{ cat: [ { type: TerrestrialAnimalTypes.CAT, address: "" }, { type: AlienAnimalTypes.CAT, planet: "" } ], dog: [] as never[]} : { cat: ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes; planet: string; })[]; dog: never[]; } cat: [ ->cat : ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes.CAT; planet: string; })[] ->[ { type: TerrestrialAnimalTypes.CAT, address: "" }, { type: AlienAnimalTypes.CAT, planet: "" } ] : ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes.CAT; planet: string; })[] +>cat : ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes; planet: string; })[] +>[ { type: TerrestrialAnimalTypes.CAT, address: "" }, { type: AlienAnimalTypes.CAT, planet: "" } ] : ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes; planet: string; })[] { type: TerrestrialAnimalTypes.CAT, address: "" }, >{ type: TerrestrialAnimalTypes.CAT, address: "" } : { type: TerrestrialAnimalTypes.CAT; address: string; } @@ -80,11 +80,11 @@ const catMap: CatMap = { >"" : "" { type: AlienAnimalTypes.CAT, planet: "" } ->{ type: AlienAnimalTypes.CAT, planet: "" } : { type: AlienAnimalTypes.CAT; planet: string; } ->type : AlienAnimalTypes.CAT ->AlienAnimalTypes.CAT : AlienAnimalTypes.CAT +>{ type: AlienAnimalTypes.CAT, planet: "" } : { type: AlienAnimalTypes; planet: string; } +>type : AlienAnimalTypes +>AlienAnimalTypes.CAT : AlienAnimalTypes >AlienAnimalTypes : typeof AlienAnimalTypes ->CAT : AlienAnimalTypes.CAT +>CAT : AlienAnimalTypes >planet : string >"" : "" diff --git a/testdata/baselines/reference/submodule/conformance/mappedTypeOverlappingStringEnumKeys.types.diff b/testdata/baselines/reference/submodule/conformance/mappedTypeOverlappingStringEnumKeys.types.diff index 2ea4da445f..c81158c10d 100644 --- a/testdata/baselines/reference/submodule/conformance/mappedTypeOverlappingStringEnumKeys.types.diff +++ b/testdata/baselines/reference/submodule/conformance/mappedTypeOverlappingStringEnumKeys.types.diff @@ -1,15 +1,6 @@ --- old.mappedTypeOverlappingStringEnumKeys.types +++ new.mappedTypeOverlappingStringEnumKeys.types -@@= skipped -16, +16 lines =@@ - }; - - enum AlienAnimalTypes { -->AlienAnimalTypes : AlienAnimalTypes -+>AlienAnimalTypes : AlienAnimalTypes.CAT - - CAT = "cat", - >CAT : AlienAnimalTypes.CAT -@@= skipped -12, +12 lines =@@ +@@= skipped -28, +28 lines =@@ >AnimalTypes : AnimalTypes interface TerrestrialCat { @@ -25,11 +16,8 @@ +>AlienCat : AlienCat + type: AlienAnimalTypes.CAT -->type : AlienAnimalTypes -+>type : AlienAnimalTypes.CAT + >type : AlienAnimalTypes >AlienAnimalTypes : any - - planet: string; @@= skipped -15, +17 lines =@@ >CatMap : CatMap @@ -38,33 +26,3 @@ >type : V }; - - const catMap: CatMap = { - >catMap : CatMap -->{ cat: [ { type: TerrestrialAnimalTypes.CAT, address: "" }, { type: AlienAnimalTypes.CAT, planet: "" } ], dog: [] as never[]} : { cat: ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes; planet: string; })[]; dog: never[]; } -+>{ cat: [ { type: TerrestrialAnimalTypes.CAT, address: "" }, { type: AlienAnimalTypes.CAT, planet: "" } ], dog: [] as never[]} : { cat: ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes.CAT; planet: string; })[]; dog: never[]; } - - cat: [ -->cat : ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes; planet: string; })[] -->[ { type: TerrestrialAnimalTypes.CAT, address: "" }, { type: AlienAnimalTypes.CAT, planet: "" } ] : ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes; planet: string; })[] -+>cat : ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes.CAT; planet: string; })[] -+>[ { type: TerrestrialAnimalTypes.CAT, address: "" }, { type: AlienAnimalTypes.CAT, planet: "" } ] : ({ type: TerrestrialAnimalTypes.CAT; address: string; } | { type: AlienAnimalTypes.CAT; planet: string; })[] - - { type: TerrestrialAnimalTypes.CAT, address: "" }, - >{ type: TerrestrialAnimalTypes.CAT, address: "" } : { type: TerrestrialAnimalTypes.CAT; address: string; } -@@= skipped -22, +23 lines =@@ - >"" : "" - - { type: AlienAnimalTypes.CAT, planet: "" } -->{ type: AlienAnimalTypes.CAT, planet: "" } : { type: AlienAnimalTypes; planet: string; } -->type : AlienAnimalTypes -->AlienAnimalTypes.CAT : AlienAnimalTypes -+>{ type: AlienAnimalTypes.CAT, planet: "" } : { type: AlienAnimalTypes.CAT; planet: string; } -+>type : AlienAnimalTypes.CAT -+>AlienAnimalTypes.CAT : AlienAnimalTypes.CAT - >AlienAnimalTypes : typeof AlienAnimalTypes -->CAT : AlienAnimalTypes -+>CAT : AlienAnimalTypes.CAT - >planet : string - >"" : "" - diff --git a/testdata/baselines/reference/submodule/conformance/nestedModules.types b/testdata/baselines/reference/submodule/conformance/nestedModules.types index a4a7803cd1..02e0292a34 100644 --- a/testdata/baselines/reference/submodule/conformance/nestedModules.types +++ b/testdata/baselines/reference/submodule/conformance/nestedModules.types @@ -3,7 +3,7 @@ === nestedModules.ts === module A.B.C { >A : typeof A ->B : any +>B : typeof B >C : any export interface Point { @@ -36,7 +36,7 @@ module A { module M2.X { >M2 : typeof M2 ->X : any +>X : typeof X export interface Point { >Point : Point diff --git a/testdata/baselines/reference/submodule/conformance/nestedModules.types.diff b/testdata/baselines/reference/submodule/conformance/nestedModules.types.diff index ed196767b4..d2bc50220c 100644 --- a/testdata/baselines/reference/submodule/conformance/nestedModules.types.diff +++ b/testdata/baselines/reference/submodule/conformance/nestedModules.types.diff @@ -5,7 +5,7 @@ === nestedModules.ts === module A.B.C { +>A : typeof A -+>B : any ++>B : typeof B +>C : any + export interface Point { @@ -28,7 +28,7 @@ module M2.X { +>M2 : typeof M2 -+>X : any ++>X : typeof X + export interface Point { +>Point : Point diff --git a/testdata/baselines/reference/submodule/conformance/nullAssignableToEveryType.types b/testdata/baselines/reference/submodule/conformance/nullAssignableToEveryType.types index 7f6182ca68..d9e110465a 100644 --- a/testdata/baselines/reference/submodule/conformance/nullAssignableToEveryType.types +++ b/testdata/baselines/reference/submodule/conformance/nullAssignableToEveryType.types @@ -20,11 +20,11 @@ var ai: I; >ai : I enum E { A } ->E : E.A +>E : E >A : E.A var ae: E; ->ae : E.A +>ae : E var b: number = null; >b : number @@ -70,7 +70,7 @@ ai = null; ae = null; >ae = null : null ->ae : E.A +>ae : E var m: number[] = null; >m : number[] diff --git a/testdata/baselines/reference/submodule/conformance/nullAssignableToEveryType.types.diff b/testdata/baselines/reference/submodule/conformance/nullAssignableToEveryType.types.diff index 6cf0270f32..9824733231 100644 --- a/testdata/baselines/reference/submodule/conformance/nullAssignableToEveryType.types.diff +++ b/testdata/baselines/reference/submodule/conformance/nullAssignableToEveryType.types.diff @@ -9,30 +9,7 @@ foo: string; >foo : string } -@@= skipped -7, +9 lines =@@ - >ai : I - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - var ae: E; -->ae : E -+>ae : E.A - - var b: number = null; - >b : number -@@= skipped -50, +50 lines =@@ - - ae = null; - >ae = null : null -->ae : E -+>ae : E.A - - var m: number[] = null; - >m : number[] -@@= skipped -11, +11 lines =@@ +@@= skipped -68, +70 lines =@@ var o: (x: T) => T = null; >o : (x: T) => T diff --git a/testdata/baselines/reference/submodule/conformance/nullIsSubtypeOfEverythingButUndefined.types b/testdata/baselines/reference/submodule/conformance/nullIsSubtypeOfEverythingButUndefined.types index 1d351bd5f0..9954bc63f7 100644 --- a/testdata/baselines/reference/submodule/conformance/nullIsSubtypeOfEverythingButUndefined.types +++ b/testdata/baselines/reference/submodule/conformance/nullIsSubtypeOfEverythingButUndefined.types @@ -195,7 +195,7 @@ var r12 = true ? null : c2; >c2 : C2 enum E { A } ->E : E.A +>E : E >A : E.A var r13 = true ? E : null; @@ -211,20 +211,20 @@ var r13 = true ? null : E; >E : typeof E var r14 = true ? E.A : null; ->r14 : E.A ->true ? E.A : null : E.A +>r14 : E +>true ? E.A : null : E >true : true ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E var r14 = true ? null : E.A; ->r14 : E.A ->true ? null : E.A : E.A +>r14 : E +>true ? null : E.A : E >true : true ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E function f() { } >f : typeof f diff --git a/testdata/baselines/reference/submodule/conformance/nullIsSubtypeOfEverythingButUndefined.types.diff b/testdata/baselines/reference/submodule/conformance/nullIsSubtypeOfEverythingButUndefined.types.diff index bfad2cf662..84f8cdf3ee 100644 --- a/testdata/baselines/reference/submodule/conformance/nullIsSubtypeOfEverythingButUndefined.types.diff +++ b/testdata/baselines/reference/submodule/conformance/nullIsSubtypeOfEverythingButUndefined.types.diff @@ -37,45 +37,7 @@ >foo : T var c2: C2; -@@= skipped -18, +19 lines =@@ - >c2 : C2 - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - var r13 = true ? E : null; -@@= skipped -16, +16 lines =@@ - >E : typeof E - - var r14 = true ? E.A : null; -->r14 : E -->true ? E.A : null : E -+>r14 : E.A -+>true ? E.A : null : E.A - >true : true -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - var r14 = true ? null : E.A; -->r14 : E -->true ? null : E.A : E -+>r14 : E.A -+>true ? null : E.A : E.A - >true : true -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - function f() { } - >f : typeof f -@@= skipped -27, +27 lines =@@ +@@= skipped -61, +62 lines =@@ } var af: typeof f; >af : typeof f diff --git a/testdata/baselines/reference/submodule/conformance/numberAssignableToEnum.types b/testdata/baselines/reference/submodule/conformance/numberAssignableToEnum.types index 4bbbbd012c..cb04ceece5 100644 --- a/testdata/baselines/reference/submodule/conformance/numberAssignableToEnum.types +++ b/testdata/baselines/reference/submodule/conformance/numberAssignableToEnum.types @@ -2,22 +2,22 @@ === numberAssignableToEnum.ts === enum E { A } ->E : E.A +>E : E >A : E.A var n: number; >n : number var e: E; ->e : E.A +>e : E e = n; >e = n : number ->e : E.A +>e : E >n : number n = e; ->n = e : E.A +>n = e : E >n : number ->e : E.A +>e : E diff --git a/testdata/baselines/reference/submodule/conformance/numberAssignableToEnum.types.diff b/testdata/baselines/reference/submodule/conformance/numberAssignableToEnum.types.diff deleted file mode 100644 index 25460e3d64..0000000000 --- a/testdata/baselines/reference/submodule/conformance/numberAssignableToEnum.types.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- old.numberAssignableToEnum.types -+++ new.numberAssignableToEnum.types -@@= skipped -1, +1 lines =@@ - - === numberAssignableToEnum.ts === - enum E { A } -->E : E -+>E : E.A - >A : E.A - - var n: number; - >n : number - - var e: E; -->e : E -+>e : E.A - - e = n; - >e = n : number -->e : E -+>e : E.A - >n : number - - n = e; -->n = e : E -+>n = e : E.A - >n : number -->e : E -+>e : E.A - diff --git a/testdata/baselines/reference/submodule/conformance/objectTypesIdentity2.types b/testdata/baselines/reference/submodule/conformance/objectTypesIdentity2.types index b53466a15f..b3516a1332 100644 --- a/testdata/baselines/reference/submodule/conformance/objectTypesIdentity2.types +++ b/testdata/baselines/reference/submodule/conformance/objectTypesIdentity2.types @@ -37,16 +37,16 @@ var a: { foo: RegExp; } >foo : RegExp enum E { A } ->E : E.A +>E : E >A : E.A var b = { foo: E.A }; ->b : { foo: E.A; } ->{ foo: E.A } : { foo: E.A; } ->foo : E.A ->E.A : E.A +>b : { foo: E; } +>{ foo: E.A } : { foo: E; } +>foo : E +>E.A : E >E : typeof E ->A : E.A +>A : E function foo5(x: A); >foo5 : { (x: A): any; (x: B): any; } @@ -133,15 +133,15 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { foo: E.A; }): any; } +>foo11 : { (x: B): any; (x: { foo: E; }): any; } >x : B function foo11(x: typeof b); // ok ->foo11 : { (x: B): any; (x: { foo: E.A; }): any; } ->x : { foo: E.A; } +>foo11 : { (x: B): any; (x: { foo: E; }): any; } +>x : { foo: E; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { foo: E.A; }): any; } +>foo11 : { (x: B): any; (x: { foo: E; }): any; } >x : any function foo12(x: I); @@ -169,14 +169,14 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { foo: E.A; }): any; } +>foo14 : { (x: I): any; (x: { foo: E; }): any; } >x : I function foo14(x: typeof b); // ok ->foo14 : { (x: I): any; (x: { foo: E.A; }): any; } ->x : { foo: E.A; } +>foo14 : { (x: I): any; (x: { foo: E; }): any; } +>x : { foo: E; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { foo: E.A; }): any; } +>foo14 : { (x: I): any; (x: { foo: E; }): any; } >x : any diff --git a/testdata/baselines/reference/submodule/conformance/objectTypesIdentity2.types.diff b/testdata/baselines/reference/submodule/conformance/objectTypesIdentity2.types.diff index 876cb29edc..6aaed3f5c8 100644 --- a/testdata/baselines/reference/submodule/conformance/objectTypesIdentity2.types.diff +++ b/testdata/baselines/reference/submodule/conformance/objectTypesIdentity2.types.diff @@ -16,30 +16,7 @@ foo: Date; >foo : Date } -@@= skipped -15, +18 lines =@@ - >foo : RegExp - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - var b = { foo: E.A }; -->b : { foo: E; } -->{ foo: E.A } : { foo: E; } -->foo : E -->E.A : E -+>b : { foo: E.A; } -+>{ foo: E.A } : { foo: E.A; } -+>foo : E.A -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - function foo5(x: A); - >foo5 : { (x: A): any; (x: B): any; } -@@= skipped -48, +48 lines =@@ +@@= skipped -63, +66 lines =@@ >x : any function foo7(x: A); @@ -80,19 +57,18 @@ function foo11(x: B); ->foo11 : { (x: B): any; (x: typeof b): any; } -+>foo11 : { (x: B): any; (x: { foo: E.A; }): any; } ++>foo11 : { (x: B): any; (x: { foo: E; }): any; } >x : B function foo11(x: typeof b); // ok ->foo11 : { (x: B): any; (x: typeof b): any; } -->x : { foo: E; } ++>foo11 : { (x: B): any; (x: { foo: E; }): any; } + >x : { foo: E; } ->b : { foo: E; } -+>foo11 : { (x: B): any; (x: { foo: E.A; }): any; } -+>x : { foo: E.A; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: typeof b): any; } -+>foo11 : { (x: B): any; (x: { foo: E.A; }): any; } ++>foo11 : { (x: B): any; (x: { foo: E; }): any; } >x : any function foo12(x: I); @@ -117,18 +93,17 @@ function foo14(x: I); ->foo14 : { (x: I): any; (x: typeof b): any; } -+>foo14 : { (x: I): any; (x: { foo: E.A; }): any; } ++>foo14 : { (x: I): any; (x: { foo: E; }): any; } >x : I function foo14(x: typeof b); // ok ->foo14 : { (x: I): any; (x: typeof b): any; } -->x : { foo: E; } ++>foo14 : { (x: I): any; (x: { foo: E; }): any; } + >x : { foo: E; } ->b : { foo: E; } -+>foo14 : { (x: I): any; (x: { foo: E.A; }): any; } -+>x : { foo: E.A; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: typeof b): any; } -+>foo14 : { (x: I): any; (x: { foo: E.A; }): any; } ++>foo14 : { (x: I): any; (x: { foo: E; }): any; } >x : any diff --git a/testdata/baselines/reference/submodule/conformance/parserEnum3.types b/testdata/baselines/reference/submodule/conformance/parserEnum3.types index 8bdaf08ad9..0f59e24b08 100644 --- a/testdata/baselines/reference/submodule/conformance/parserEnum3.types +++ b/testdata/baselines/reference/submodule/conformance/parserEnum3.types @@ -2,5 +2,5 @@ === parserEnum3.ts === export enum SignatureFlags { ->SignatureFlags : "parserEnum3".SignatureFlags +>SignatureFlags : import("parserEnum3").SignatureFlags } diff --git a/testdata/baselines/reference/submodule/conformance/parserEnum3.types.diff b/testdata/baselines/reference/submodule/conformance/parserEnum3.types.diff index 76c84ed17d..efe0a17cb9 100644 --- a/testdata/baselines/reference/submodule/conformance/parserEnum3.types.diff +++ b/testdata/baselines/reference/submodule/conformance/parserEnum3.types.diff @@ -5,5 +5,5 @@ === parserEnum3.ts === export enum SignatureFlags { ->SignatureFlags : SignatureFlags -+>SignatureFlags : "parserEnum3".SignatureFlags ++>SignatureFlags : import("parserEnum3").SignatureFlags } diff --git a/testdata/baselines/reference/submodule/conformance/parserEnum4.types b/testdata/baselines/reference/submodule/conformance/parserEnum4.types index d12e720b17..8aeb60807b 100644 --- a/testdata/baselines/reference/submodule/conformance/parserEnum4.types +++ b/testdata/baselines/reference/submodule/conformance/parserEnum4.types @@ -2,7 +2,7 @@ === parserEnum4.ts === export enum SignatureFlags { ->SignatureFlags : "parserEnum4".SignatureFlags +>SignatureFlags : import("parserEnum4").SignatureFlags , } diff --git a/testdata/baselines/reference/submodule/conformance/parserEnum4.types.diff b/testdata/baselines/reference/submodule/conformance/parserEnum4.types.diff index d32a06a7fe..d0c61c9e40 100644 --- a/testdata/baselines/reference/submodule/conformance/parserEnum4.types.diff +++ b/testdata/baselines/reference/submodule/conformance/parserEnum4.types.diff @@ -5,7 +5,7 @@ === parserEnum4.ts === export enum SignatureFlags { ->SignatureFlags : SignatureFlags -+>SignatureFlags : "parserEnum4".SignatureFlags ++>SignatureFlags : import("parserEnum4").SignatureFlags , } diff --git a/testdata/baselines/reference/submodule/conformance/parserEnum5.types b/testdata/baselines/reference/submodule/conformance/parserEnum5.types index 10598a1fe5..f4338c26c0 100644 --- a/testdata/baselines/reference/submodule/conformance/parserEnum5.types +++ b/testdata/baselines/reference/submodule/conformance/parserEnum5.types @@ -2,7 +2,7 @@ === parserEnum5.ts === enum E2 { a, } ->E2 : E2.a +>E2 : E2 >a : E2.a enum E3 { a: 1, } diff --git a/testdata/baselines/reference/submodule/conformance/parserEnum5.types.diff b/testdata/baselines/reference/submodule/conformance/parserEnum5.types.diff index 8ed15fe7b3..5b82fa3c83 100644 --- a/testdata/baselines/reference/submodule/conformance/parserEnum5.types.diff +++ b/testdata/baselines/reference/submodule/conformance/parserEnum5.types.diff @@ -1,13 +1,6 @@ --- old.parserEnum5.types +++ new.parserEnum5.types -@@= skipped -1, +1 lines =@@ - - === parserEnum5.ts === - enum E2 { a, } -->E2 : E2 -+>E2 : E2.a - >a : E2.a - +@@= skipped -7, +7 lines =@@ enum E3 { a: 1, } >E3 : E3 >a : E3.a diff --git a/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.d.types b/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.d.types index 9fff325332..ec73f5603b 100644 --- a/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.d.types +++ b/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.d.types @@ -2,7 +2,7 @@ === parserEnumDeclaration3.d.ts === enum E { ->E : E.A +>E : E A = 1 >A : E.A diff --git a/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.d.types.diff b/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.d.types.diff deleted file mode 100644 index c5ec348ac0..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.d.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.parserEnumDeclaration3.d.types -+++ new.parserEnumDeclaration3.d.types -@@= skipped -1, +1 lines =@@ - - === parserEnumDeclaration3.d.ts === - enum E { -->E : E -+>E : E.A - - A = 1 - >A : E.A diff --git a/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.types b/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.types index ac9de67da2..cb72ebc1d4 100644 --- a/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.types +++ b/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.types @@ -2,7 +2,7 @@ === parserEnumDeclaration3.ts === declare enum E { ->E : E.A +>E : E A = 1 >A : E.A diff --git a/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.types.diff b/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.types.diff deleted file mode 100644 index 6064b2ad26..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserEnumDeclaration3.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.parserEnumDeclaration3.types -+++ new.parserEnumDeclaration3.types -@@= skipped -1, +1 lines =@@ - - === parserEnumDeclaration3.ts === - declare enum E { -->E : E -+>E : E.A - - A = 1 - >A : E.A diff --git a/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum.types b/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum.types index 142eabbccf..6286f0c8f7 100644 --- a/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum.types +++ b/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum.types @@ -2,7 +2,7 @@ === parserInterfaceKeywordInEnum.ts === enum Bar { ->Bar : Bar.interface +>Bar : Bar interface, >interface : Bar.interface diff --git a/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum.types.diff b/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum.types.diff deleted file mode 100644 index ef631035c2..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.parserInterfaceKeywordInEnum.types -+++ new.parserInterfaceKeywordInEnum.types -@@= skipped -1, +1 lines =@@ - - === parserInterfaceKeywordInEnum.ts === - enum Bar { -->Bar : Bar -+>Bar : Bar.interface - - interface, - >interface : Bar.interface diff --git a/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum1.types b/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum1.types index 3ef26d1380..84aeb98c27 100644 --- a/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum1.types +++ b/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum1.types @@ -5,7 +5,7 @@ >"use strict" : "use strict" enum Bar { ->Bar : Bar.interface +>Bar : Bar interface, >interface : Bar.interface diff --git a/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum1.types.diff b/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum1.types.diff deleted file mode 100644 index 1eb8cfeb49..0000000000 --- a/testdata/baselines/reference/submodule/conformance/parserInterfaceKeywordInEnum1.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.parserInterfaceKeywordInEnum1.types -+++ new.parserInterfaceKeywordInEnum1.types -@@= skipped -4, +4 lines =@@ - >"use strict" : "use strict" - - enum Bar { -->Bar : Bar -+>Bar : Bar.interface - - interface, - >interface : Bar.interface diff --git a/testdata/baselines/reference/submodule/conformance/primtiveTypesAreIdentical.types b/testdata/baselines/reference/submodule/conformance/primtiveTypesAreIdentical.types index 22dfbd1db3..cb6843bbf0 100644 --- a/testdata/baselines/reference/submodule/conformance/primtiveTypesAreIdentical.types +++ b/testdata/baselines/reference/submodule/conformance/primtiveTypesAreIdentical.types @@ -68,19 +68,19 @@ function foo5(x: any) { } >x : any enum E { A } ->E : E.A +>E : E >A : E.A function foo6(x: E); ->foo6 : { (x: E.A): any; (x: E.A): any; } ->x : E.A +>foo6 : { (x: E): any; (x: E): any; } +>x : E function foo6(x: E); ->foo6 : { (x: E.A): any; (x: E.A): any; } ->x : E.A +>foo6 : { (x: E): any; (x: E): any; } +>x : E function foo6(x: any) { } ->foo6 : { (x: E.A): any; (x: E.A): any; } +>foo6 : { (x: E): any; (x: E): any; } >x : any function foo7(x: void); diff --git a/testdata/baselines/reference/submodule/conformance/primtiveTypesAreIdentical.types.diff b/testdata/baselines/reference/submodule/conformance/primtiveTypesAreIdentical.types.diff deleted file mode 100644 index 7cc7107c01..0000000000 --- a/testdata/baselines/reference/submodule/conformance/primtiveTypesAreIdentical.types.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- old.primtiveTypesAreIdentical.types -+++ new.primtiveTypesAreIdentical.types -@@= skipped -67, +67 lines =@@ - >x : any - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - function foo6(x: E); -->foo6 : { (x: E): any; (x: E): any; } -->x : E -+>foo6 : { (x: E.A): any; (x: E.A): any; } -+>x : E.A - - function foo6(x: E); -->foo6 : { (x: E): any; (x: E): any; } -->x : E -+>foo6 : { (x: E.A): any; (x: E.A): any; } -+>x : E.A - - function foo6(x: any) { } -->foo6 : { (x: E): any; (x: E): any; } -+>foo6 : { (x: E.A): any; (x: E.A): any; } - >x : any - - function foo7(x: void); diff --git a/testdata/baselines/reference/submodule/conformance/privateNameEnum.types b/testdata/baselines/reference/submodule/conformance/privateNameEnum.types index 3068d2d165..56dba66313 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameEnum.types +++ b/testdata/baselines/reference/submodule/conformance/privateNameEnum.types @@ -2,7 +2,7 @@ === privateNameEnum.ts === enum E { ->E : E.#x +>E : E #x >#x : E.#x diff --git a/testdata/baselines/reference/submodule/conformance/privateNameEnum.types.diff b/testdata/baselines/reference/submodule/conformance/privateNameEnum.types.diff index 80bdf7ed24..2ac3351576 100644 --- a/testdata/baselines/reference/submodule/conformance/privateNameEnum.types.diff +++ b/testdata/baselines/reference/submodule/conformance/privateNameEnum.types.diff @@ -1,11 +1,7 @@ --- old.privateNameEnum.types +++ new.privateNameEnum.types -@@= skipped -1, +1 lines =@@ - - === privateNameEnum.ts === - enum E { -->E : E -+>E : E.#x +@@= skipped -4, +4 lines =@@ + >E : E #x ->#x : E.__missing diff --git a/testdata/baselines/reference/submodule/conformance/strictModeOctalLiterals.types b/testdata/baselines/reference/submodule/conformance/strictModeOctalLiterals.types index cdd4353f98..dc0bef05d2 100644 --- a/testdata/baselines/reference/submodule/conformance/strictModeOctalLiterals.types +++ b/testdata/baselines/reference/submodule/conformance/strictModeOctalLiterals.types @@ -2,7 +2,7 @@ === strictModeOctalLiterals.ts === export enum E { ->E : E.A +>E : E A = 12 + 01 >A : E.A diff --git a/testdata/baselines/reference/submodule/conformance/strictModeOctalLiterals.types.diff b/testdata/baselines/reference/submodule/conformance/strictModeOctalLiterals.types.diff deleted file mode 100644 index 5ef007ee4c..0000000000 --- a/testdata/baselines/reference/submodule/conformance/strictModeOctalLiterals.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.strictModeOctalLiterals.types -+++ new.strictModeOctalLiterals.types -@@= skipped -1, +1 lines =@@ - - === strictModeOctalLiterals.ts === - export enum E { -->E : E -+>E : E.A - - A = 12 + 01 - >A : E.A diff --git a/testdata/baselines/reference/submodule/conformance/stringLiteralTypeIsSubtypeOfString.types b/testdata/baselines/reference/submodule/conformance/stringLiteralTypeIsSubtypeOfString.types index e8acdff233..0b027a9c5f 100644 --- a/testdata/baselines/reference/submodule/conformance/stringLiteralTypeIsSubtypeOfString.types +++ b/testdata/baselines/reference/submodule/conformance/stringLiteralTypeIsSubtypeOfString.types @@ -268,19 +268,19 @@ function f13(x: any) { } >x : any enum E { A } ->E : E.A +>E : E >A : E.A function f14(x: 'a'); ->f14 : { (x: "a"): any; (x: E.A): any; } +>f14 : { (x: "a"): any; (x: E): any; } >x : "a" function f14(x: E); ->f14 : { (x: "a"): any; (x: E.A): any; } ->x : E.A +>f14 : { (x: "a"): any; (x: E): any; } +>x : E function f14(x: any) { } ->f14 : { (x: "a"): any; (x: E.A): any; } +>f14 : { (x: "a"): any; (x: E): any; } >x : any function f15(x: 'a'); diff --git a/testdata/baselines/reference/submodule/conformance/stringLiteralTypeIsSubtypeOfString.types.diff b/testdata/baselines/reference/submodule/conformance/stringLiteralTypeIsSubtypeOfString.types.diff index e3f9605c9b..34bd778169 100644 --- a/testdata/baselines/reference/submodule/conformance/stringLiteralTypeIsSubtypeOfString.types.diff +++ b/testdata/baselines/reference/submodule/conformance/stringLiteralTypeIsSubtypeOfString.types.diff @@ -49,24 +49,7 @@ >x : any enum E { A } -->E : E -+>E : E.A - >A : E.A - - function f14(x: 'a'); -->f14 : { (x: "a"): any; (x: E): any; } -+>f14 : { (x: "a"): any; (x: E.A): any; } - >x : "a" - - function f14(x: E); -->f14 : { (x: "a"): any; (x: E): any; } -->x : E -+>f14 : { (x: "a"): any; (x: E.A): any; } -+>x : E.A - - function f14(x: any) { } -->f14 : { (x: "a"): any; (x: E): any; } -+>f14 : { (x: "a"): any; (x: E.A): any; } +@@= skipped -40, +46 lines =@@ >x : any function f15(x: 'a'); diff --git a/testdata/baselines/reference/submodule/conformance/subtypesOfAny.types b/testdata/baselines/reference/submodule/conformance/subtypesOfAny.types index 0b4d88a987..b71264e7af 100644 --- a/testdata/baselines/reference/submodule/conformance/subtypesOfAny.types +++ b/testdata/baselines/reference/submodule/conformance/subtypesOfAny.types @@ -158,7 +158,7 @@ interface I13 { enum E { A } ->E : E.A +>E : E >A : E.A interface I14 { @@ -168,7 +168,7 @@ interface I14 { >x : string foo: E; ->foo : E.A +>foo : E } diff --git a/testdata/baselines/reference/submodule/conformance/subtypesOfAny.types.diff b/testdata/baselines/reference/submodule/conformance/subtypesOfAny.types.diff index 3520ec7ab7..378928589d 100644 --- a/testdata/baselines/reference/submodule/conformance/subtypesOfAny.types.diff +++ b/testdata/baselines/reference/submodule/conformance/subtypesOfAny.types.diff @@ -127,10 +127,7 @@ >x : T } - - enum E { A } -->E : E -+>E : E.A +@@= skipped -14, +17 lines =@@ >A : E.A interface I14 { @@ -139,13 +136,7 @@ [x: string]: any; >x : string - foo: E; -->foo : E -+>foo : E.A - } - - -@@= skipped -33, +38 lines =@@ +@@= skipped -19, +21 lines =@@ >1 : 1 } interface I15 { diff --git a/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameter.types b/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameter.types index b025c8426d..f45aa338ca 100644 --- a/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameter.types +++ b/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameter.types @@ -57,7 +57,7 @@ class C2 { foo: T; } >foo : T enum E { A } ->E : E.A +>E : E >A : E.A function f() { } @@ -311,22 +311,22 @@ function f2(x: T, y: U) { >E : typeof E var r14 = true ? E.A : x; ->r14 : E.A | T ->true ? E.A : x : E.A | T +>r14 : E | T +>true ? E.A : x : E | T >true : true ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E >x : T var r14 = true ? x : E.A; ->r14 : E.A | T ->true ? x : E.A : E.A | T +>r14 : E | T +>true ? x : E.A : E | T >true : true >x : T ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E var af: typeof f; >af : typeof f diff --git a/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameter.types.diff b/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameter.types.diff index ce2272e2de..809dae287c 100644 --- a/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameter.types.diff +++ b/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameter.types.diff @@ -42,11 +42,6 @@ >foo : T enum E { A } -->E : E -+>E : E.A - >A : E.A - - function f() { } @@= skipped -31, +32 lines =@@ // errors throughout function f2(x: T, y: U) { @@ -177,28 +172,23 @@ var r14 = true ? E.A : x; ->r14 : T | E ->true ? E.A : x : T | E -+>r14 : E.A | T -+>true ? E.A : x : E.A | T ++>r14 : E | T ++>true ? E.A : x : E | T >true : true -->E.A : E -+>E.A : E.A + >E.A : E >E : typeof E -->A : E -+>A : E.A +@@= skipped -9, +9 lines =@@ >x : T var r14 = true ? x : E.A; ->r14 : T | E ->true ? x : E.A : T | E -+>r14 : E.A | T -+>true ? x : E.A : E.A | T ++>r14 : E | T ++>true ? x : E.A : E | T >true : true >x : T -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A + >E.A : E +@@= skipped -10, +10 lines =@@ var af: typeof f; >af : typeof f @@ -206,7 +196,7 @@ var r15 = true ? af : x; >r15 : T | typeof f -@@= skipped -37, +36 lines =@@ +@@= skipped -18, +17 lines =@@ var ac: typeof c; >ac : typeof c diff --git a/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints2.types b/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints2.types index d04af6fbf7..994a9337d4 100644 --- a/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints2.types +++ b/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints2.types @@ -152,7 +152,7 @@ class C2 { foo: T; } >foo : T enum E { A } ->E : E.A +>E : E >A : E.A function f() { } @@ -457,7 +457,7 @@ function f15>(x: T) { } function f16(x: T) { ->f16 : (x: T) => void +>f16 : (x: T) => void >T : T >x : T @@ -476,22 +476,22 @@ function f16(x: T) { >E : typeof E var r14 = true ? E.A : x; // ok ->r14 : E.A ->true ? E.A : x : E.A +>r14 : E +>true ? E.A : x : E >true : true ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E >x : T var r14 = true ? x : E.A; // ok ->r14 : E.A ->true ? x : E.A : E.A +>r14 : E +>true ? x : E.A : E >true : true >x : T ->E.A : E.A +>E.A : E >E : typeof E ->A : E.A +>A : E } function f17(x: T) { diff --git a/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints2.types.diff b/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints2.types.diff index dfede5ae5f..cebf671879 100644 --- a/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints2.types.diff +++ b/testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints2.types.diff @@ -44,11 +44,6 @@ >foo : T enum E { A } -->E : E -+>E : E.A - >A : E.A - - function f() { } @@= skipped -30, +31 lines =@@ function f4(x: T) { @@ -179,45 +174,15 @@ >x : T var c2: C2; -@@= skipped -21, +22 lines =@@ - } +@@= skipped -22, +23 lines =@@ function f16(x: T) { -->f16 : (x: T) => void -+>f16 : (x: T) => void + >f16 : (x: T) => void +>T : T >x : T var r13 = true ? E : x; // ok -@@= skipped -18, +19 lines =@@ - >E : typeof E - - var r14 = true ? E.A : x; // ok -->r14 : E -->true ? E.A : x : E -+>r14 : E.A -+>true ? E.A : x : E.A - >true : true -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - >x : T - - var r14 = true ? x : E.A; // ok -->r14 : E -->true ? x : E.A : E -+>r14 : E.A -+>true ? x : E.A : E.A - >true : true - >x : T -->E.A : E -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - } +@@= skipped -37, +38 lines =@@ function f17(x: T) { >f17 : (x: T) => void @@ -231,7 +196,7 @@ var r15 = true ? af : x; // ok >r15 : typeof f -@@= skipped -44, +43 lines =@@ +@@= skipped -24, +23 lines =@@ function f18(x: T) { >f18 : (x: T) => void diff --git a/testdata/baselines/reference/submodule/conformance/typeAliases.types b/testdata/baselines/reference/submodule/conformance/typeAliases.types index 5ea9370832..736dd2d9d4 100644 --- a/testdata/baselines/reference/submodule/conformance/typeAliases.types +++ b/testdata/baselines/reference/submodule/conformance/typeAliases.types @@ -166,7 +166,7 @@ type Meters = number >Meters : number enum E { x = 10 } ->E : E.x +>E : E >x : E.x >10 : 10 @@ -183,9 +183,9 @@ f15(E.x).toLowerCase(); >f15(E.x).toLowerCase : () => string >f15(E.x) : string >f15 : { (a: string): boolean; (a: number): string; } ->E.x : E.x +>E.x : E >E : typeof E ->x : E.x +>x : E >toLowerCase : () => string type StringAndBoolean = [string, boolean] diff --git a/testdata/baselines/reference/submodule/conformance/typeAliases.types.diff b/testdata/baselines/reference/submodule/conformance/typeAliases.types.diff index 5b651478cb..6a30c1ac1e 100644 --- a/testdata/baselines/reference/submodule/conformance/typeAliases.types.diff +++ b/testdata/baselines/reference/submodule/conformance/typeAliases.types.diff @@ -60,12 +60,7 @@ >x : string type Meters = number - >Meters : number - - enum E { x = 10 } -->E : E -+>E : E.x - >x : E.x +@@= skipped -20, +20 lines =@@ >10 : 10 declare function f15(a: string): boolean; @@ -83,12 +78,7 @@ >f15(E.x).toLowerCase : () => string >f15(E.x) : string ->f15 : { (a: string): boolean; (a: Meters): string; } -->E.x : E +>f15 : { (a: string): boolean; (a: number): string; } -+>E.x : E.x + >E.x : E >E : typeof E -->x : E -+>x : E.x - >toLowerCase : () => string - - type StringAndBoolean = [string, boolean] + >x : E diff --git a/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.types b/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.types index 36ae6e1d80..8e372cef9e 100644 --- a/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.types +++ b/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.types @@ -62,11 +62,11 @@ foo({ }); enum E1 { X } ->E1 : E1.X +>E1 : E1 >X : E1.X enum E2 { X } ->E2 : E2.X +>E2 : E2 >X : E2.X // Check that we infer from both a.r and b before fixing T in a.w @@ -110,62 +110,62 @@ var v1 = f1({ w: x => x, r: () => 0 }, E1.X); >r : () => number >() => 0 : () => number >0 : 0 ->E1.X : E1.X +>E1.X : E1 >E1 : typeof E1 ->X : E1.X +>X : E1 var v1 = f1({ w: x => x, r: () => E1.X }, 0); >v1 : number >f1({ w: x => x, r: () => E1.X }, 0) : number >f1 : (a: { w: (x: T) => U; r: () => T; }, b: T) => U ->{ w: x => x, r: () => E1.X } : { w: (x: 0) => number; r: () => E1.X; } +>{ w: x => x, r: () => E1.X } : { w: (x: 0) => number; r: () => E1; } >w : (x: 0) => number >x => x : (x: 0) => number >x : 0 >x : 0 ->r : () => E1.X ->() => E1.X : () => E1.X ->E1.X : E1.X +>r : () => E1 +>() => E1.X : () => E1 +>E1.X : E1 >E1 : typeof E1 ->X : E1.X +>X : E1 >0 : 0 var v2: E1; ->v2 : E1.X +>v2 : E1 var v2 = f1({ w: x => x, r: () => E1.X }, E1.X); ->v2 : E1.X ->f1({ w: x => x, r: () => E1.X }, E1.X) : E1.X +>v2 : E1 +>f1({ w: x => x, r: () => E1.X }, E1.X) : E1 >f1 : (a: { w: (x: T) => U; r: () => T; }, b: T) => U ->{ w: x => x, r: () => E1.X } : { w: (x: E1.X) => E1.X; r: () => E1.X; } ->w : (x: E1.X) => E1.X ->x => x : (x: E1.X) => E1.X ->x : E1.X +>{ w: x => x, r: () => E1.X } : { w: (x: E1.X) => E1; r: () => E1; } +>w : (x: E1.X) => E1 +>x => x : (x: E1.X) => E1 >x : E1.X ->r : () => E1.X ->() => E1.X : () => E1.X ->E1.X : E1.X +>x : E1 +>r : () => E1 +>() => E1.X : () => E1 +>E1.X : E1 >E1 : typeof E1 ->X : E1.X ->E1.X : E1.X +>X : E1 +>E1.X : E1 >E1 : typeof E1 ->X : E1.X +>X : E1 var v3 = f1({ w: x => x, r: () => E1.X }, E2.X); // Error >v3 : unknown >f1({ w: x => x, r: () => E1.X }, E2.X) : unknown >f1 : (a: { w: (x: T) => U; r: () => T; }, b: T) => U ->{ w: x => x, r: () => E1.X } : { w: (x: E1.X) => E1.X; r: () => E1.X; } ->w : (x: E1.X) => E1.X ->x => x : (x: E1.X) => E1.X ->x : E1.X ->x : E1.X ->r : () => E1.X ->() => E1.X : () => E1.X ->E1.X : E1.X +>{ w: x => x, r: () => E1.X } : { w: (x: E1) => E1; r: () => E1; } +>w : (x: E1) => E1 +>x => x : (x: E1) => E1 +>x : E1 +>x : E1 +>r : () => E1 +>() => E1.X : () => E1 +>E1.X : E1 >E1 : typeof E1 ->X : E1.X ->E2.X : E2.X +>X : E1 +>E2.X : E2 >E2 : typeof E2 ->X : E2.X +>X : E2 diff --git a/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.types.diff b/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.types.diff index 31821612db..969c98cf35 100644 --- a/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.types.diff +++ b/testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.types.diff @@ -18,20 +18,7 @@ >x : Computed var s: string; -@@= skipped -46, +47 lines =@@ - }); - - enum E1 { X } -->E1 : E1 -+>E1 : E1.X - >X : E1.X - - enum E2 { X } -->E2 : E2 -+>E2 : E2.X - >X : E2.X - - // Check that we infer from both a.r and b before fixing T in a.w +@@= skipped -57, +58 lines =@@ declare function f1(a: { w: (x: T) => U; r: () => T; }, b: T): U; >f1 : (a: { w: (x: T) => U; r: () => T; }, b: T) => U @@ -40,97 +27,3 @@ >a : { w: (x: T) => U; r: () => T; } >w : (x: T) => U >x : T -@@= skipped -46, +48 lines =@@ - >r : () => number - >() => 0 : () => number - >0 : 0 -->E1.X : E1 -+>E1.X : E1.X - >E1 : typeof E1 -->X : E1 -+>X : E1.X - - var v1 = f1({ w: x => x, r: () => E1.X }, 0); - >v1 : number - >f1({ w: x => x, r: () => E1.X }, 0) : number - >f1 : (a: { w: (x: T) => U; r: () => T; }, b: T) => U -->{ w: x => x, r: () => E1.X } : { w: (x: 0) => number; r: () => E1; } -+>{ w: x => x, r: () => E1.X } : { w: (x: 0) => number; r: () => E1.X; } - >w : (x: 0) => number - >x => x : (x: 0) => number - >x : 0 - >x : 0 -->r : () => E1 -->() => E1.X : () => E1 -->E1.X : E1 -+>r : () => E1.X -+>() => E1.X : () => E1.X -+>E1.X : E1.X - >E1 : typeof E1 -->X : E1 -+>X : E1.X - >0 : 0 - - var v2: E1; -->v2 : E1 -+>v2 : E1.X - - var v2 = f1({ w: x => x, r: () => E1.X }, E1.X); -->v2 : E1 -->f1({ w: x => x, r: () => E1.X }, E1.X) : E1 -+>v2 : E1.X -+>f1({ w: x => x, r: () => E1.X }, E1.X) : E1.X - >f1 : (a: { w: (x: T) => U; r: () => T; }, b: T) => U -->{ w: x => x, r: () => E1.X } : { w: (x: E1.X) => E1; r: () => E1; } -->w : (x: E1.X) => E1 -->x => x : (x: E1.X) => E1 -+>{ w: x => x, r: () => E1.X } : { w: (x: E1.X) => E1.X; r: () => E1.X; } -+>w : (x: E1.X) => E1.X -+>x => x : (x: E1.X) => E1.X - >x : E1.X -->x : E1 -->r : () => E1 -->() => E1.X : () => E1 -->E1.X : E1 -+>x : E1.X -+>r : () => E1.X -+>() => E1.X : () => E1.X -+>E1.X : E1.X - >E1 : typeof E1 -->X : E1 -->E1.X : E1 -+>X : E1.X -+>E1.X : E1.X - >E1 : typeof E1 -->X : E1 -+>X : E1.X - - var v3 = f1({ w: x => x, r: () => E1.X }, E2.X); // Error - >v3 : unknown - >f1({ w: x => x, r: () => E1.X }, E2.X) : unknown - >f1 : (a: { w: (x: T) => U; r: () => T; }, b: T) => U -->{ w: x => x, r: () => E1.X } : { w: (x: E1) => E1; r: () => E1; } -->w : (x: E1) => E1 -->x => x : (x: E1) => E1 -->x : E1 -->x : E1 -->r : () => E1 -->() => E1.X : () => E1 -->E1.X : E1 -+>{ w: x => x, r: () => E1.X } : { w: (x: E1.X) => E1.X; r: () => E1.X; } -+>w : (x: E1.X) => E1.X -+>x => x : (x: E1.X) => E1.X -+>x : E1.X -+>x : E1.X -+>r : () => E1.X -+>() => E1.X : () => E1.X -+>E1.X : E1.X - >E1 : typeof E1 -->X : E1 -->E2.X : E2 -+>X : E1.X -+>E2.X : E2.X - >E2 : typeof E2 -->X : E2 -+>X : E2.X - diff --git a/testdata/baselines/reference/submodule/conformance/typeofANonExportedType.types b/testdata/baselines/reference/submodule/conformance/typeofANonExportedType.types index 8d5c31b3c5..5bb79e321d 100644 --- a/testdata/baselines/reference/submodule/conformance/typeofANonExportedType.types +++ b/testdata/baselines/reference/submodule/conformance/typeofANonExportedType.types @@ -89,7 +89,7 @@ export var r9: typeof Z.foo; >Z : typeof M enum E { ->E : E.A +>E : E A >A : E.A @@ -98,7 +98,7 @@ export var r10: typeof E; >r10 : typeof E export var r11: typeof E.A; ->r11 : E.A +>r11 : E >E : typeof E export var r12: typeof r12; diff --git a/testdata/baselines/reference/submodule/conformance/typeofANonExportedType.types.diff b/testdata/baselines/reference/submodule/conformance/typeofANonExportedType.types.diff index cc6de13001..5464f1dc19 100644 --- a/testdata/baselines/reference/submodule/conformance/typeofANonExportedType.types.diff +++ b/testdata/baselines/reference/submodule/conformance/typeofANonExportedType.types.diff @@ -75,20 +75,16 @@ ->foo : string enum E { -->E : E -+>E : E.A - - A - >A : E.A + >E : E +@@= skipped -16, +13 lines =@@ } export var r10: typeof E; >r10 : typeof E ->E : typeof E export var r11: typeof E.A; -->r11 : E + >r11 : E ->E.A : E -+>r11 : E.A >E : typeof E ->A : E @@ -98,7 +94,7 @@ function foo() { } >foo : typeof foo -@@= skipped -47, +40 lines =@@ +@@= skipped -31, +27 lines =@@ } export var r13: typeof foo; >r13 : typeof foo diff --git a/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.types b/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.types index 783ea202bb..ace700f6e8 100644 --- a/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.types +++ b/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.types @@ -89,7 +89,7 @@ export var r9: typeof Z.foo; >Z : typeof M export enum E { ->E : E.A +>E : E A >A : E.A @@ -98,7 +98,7 @@ export var r10: typeof E; >r10 : typeof E export var r11: typeof E.A; ->r11 : E.A +>r11 : E >E : typeof E export var r12: typeof r12; diff --git a/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.types.diff b/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.types.diff index fb5a1a5a07..cde592012e 100644 --- a/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.types.diff +++ b/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.types.diff @@ -75,20 +75,16 @@ ->foo : string export enum E { -->E : E -+>E : E.A - - A - >A : E.A + >E : E +@@= skipped -16, +13 lines =@@ } export var r10: typeof E; >r10 : typeof E ->E : typeof E export var r11: typeof E.A; -->r11 : E + >r11 : E ->E.A : E -+>r11 : E.A >E : typeof E ->A : E @@ -98,7 +94,7 @@ export function foo() { } >foo : typeof foo -@@= skipped -47, +40 lines =@@ +@@= skipped -31, +27 lines =@@ } export var r13: typeof foo; >r13 : typeof foo diff --git a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.types b/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.types index d125891ce5..81cd79c348 100644 --- a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.types +++ b/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.types @@ -8,15 +8,15 @@ class C { } var c = new C(); // error C is private ->c : C ->new C() : C +>c : any +>new C() : any >C : typeof C var r: () => void = c.constructor; >r : () => void ->c.constructor : Function ->c : C ->constructor : Function +>c.constructor : any +>c : any +>constructor : any class C2 { >C2 : C2 @@ -29,14 +29,14 @@ class C2 { } var c2 = new C2(); // error C2 is private ->c2 : C2 ->new C2() : C2 +>c2 : any +>new C2() : any >C2 : typeof C2 var r2: (x: number) => void = c2.constructor; >r2 : (x: number) => void >x : number ->c2.constructor : Function ->c2 : C2 ->constructor : Function +>c2.constructor : any +>c2 : any +>constructor : any diff --git a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.types.diff b/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.types.diff deleted file mode 100644 index c486e06810..0000000000 --- a/testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.types.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- old.typesWithPrivateConstructor.types -+++ new.typesWithPrivateConstructor.types -@@= skipped -7, +7 lines =@@ - } - - var c = new C(); // error C is private -->c : any -->new C() : any -+>c : C -+>new C() : C - >C : typeof C - - var r: () => void = c.constructor; - >r : () => void -->c.constructor : any -->c : any -->constructor : any -+>c.constructor : Function -+>c : C -+>constructor : Function - - class C2 { - >C2 : C2 -@@= skipped -21, +21 lines =@@ - } - - var c2 = new C2(); // error C2 is private -->c2 : any -->new C2() : any -+>c2 : C2 -+>new C2() : C2 - >C2 : typeof C2 - - var r2: (x: number) => void = c2.constructor; - >r2 : (x: number) => void - >x : number -->c2.constructor : any -->c2 : any -->constructor : any -+>c2.constructor : Function -+>c2 : C2 -+>constructor : Function - diff --git a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.types b/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.types index 86a79a727c..99a4168b2f 100644 --- a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.types +++ b/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.types @@ -8,15 +8,15 @@ class C { } var c = new C(); // error C is protected ->c : C ->new C() : C +>c : any +>new C() : any >C : typeof C var r: () => void = c.constructor; >r : () => void ->c.constructor : Function ->c : C ->constructor : Function +>c.constructor : any +>c : any +>constructor : any class C2 { >C2 : C2 @@ -29,14 +29,14 @@ class C2 { } var c2 = new C2(); // error C2 is protected ->c2 : C2 ->new C2() : C2 +>c2 : any +>new C2() : any >C2 : typeof C2 var r2: (x: number) => void = c2.constructor; >r2 : (x: number) => void >x : number ->c2.constructor : Function ->c2 : C2 ->constructor : Function +>c2.constructor : any +>c2 : any +>constructor : any diff --git a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.types.diff b/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.types.diff deleted file mode 100644 index f2966315fa..0000000000 --- a/testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.types.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- old.typesWithProtectedConstructor.types -+++ new.typesWithProtectedConstructor.types -@@= skipped -7, +7 lines =@@ - } - - var c = new C(); // error C is protected -->c : any -->new C() : any -+>c : C -+>new C() : C - >C : typeof C - - var r: () => void = c.constructor; - >r : () => void -->c.constructor : any -->c : any -->constructor : any -+>c.constructor : Function -+>c : C -+>constructor : Function - - class C2 { - >C2 : C2 -@@= skipped -21, +21 lines =@@ - } - - var c2 = new C2(); // error C2 is protected -->c2 : any -->new C2() : any -+>c2 : C2 -+>new C2() : C2 - >C2 : typeof C2 - - var r2: (x: number) => void = c2.constructor; - >r2 : (x: number) => void - >x : number -->c2.constructor : any -->c2 : any -->constructor : any -+>c2.constructor : Function -+>c2 : C2 -+>constructor : Function - diff --git a/testdata/baselines/reference/submodule/conformance/undefinedAssignableToEveryType.types b/testdata/baselines/reference/submodule/conformance/undefinedAssignableToEveryType.types index 4fc38c0fd2..61109073b4 100644 --- a/testdata/baselines/reference/submodule/conformance/undefinedAssignableToEveryType.types +++ b/testdata/baselines/reference/submodule/conformance/undefinedAssignableToEveryType.types @@ -20,11 +20,11 @@ var ai: I; >ai : I enum E { A } ->E : E.A +>E : E >A : E.A var ae: E; ->ae : E.A +>ae : E var b: number = undefined; >b : number @@ -83,7 +83,7 @@ ai = undefined; ae = undefined; >ae = undefined : undefined ->ae : E.A +>ae : E >undefined : undefined var m: number[] = undefined; diff --git a/testdata/baselines/reference/submodule/conformance/undefinedAssignableToEveryType.types.diff b/testdata/baselines/reference/submodule/conformance/undefinedAssignableToEveryType.types.diff index b9a2dfcaad..b3f87df536 100644 --- a/testdata/baselines/reference/submodule/conformance/undefinedAssignableToEveryType.types.diff +++ b/testdata/baselines/reference/submodule/conformance/undefinedAssignableToEveryType.types.diff @@ -9,30 +9,7 @@ foo: string; >foo : string } -@@= skipped -7, +9 lines =@@ - >ai : I - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - var ae: E; -->ae : E -+>ae : E.A - - var b: number = undefined; - >b : number -@@= skipped -63, +63 lines =@@ - - ae = undefined; - >ae = undefined : undefined -->ae : E -+>ae : E.A - >undefined : undefined - - var m: number[] = undefined; -@@= skipped -14, +14 lines =@@ +@@= skipped -84, +86 lines =@@ var o: (x: T) => T = undefined; >o : (x: T) => T diff --git a/testdata/baselines/reference/submodule/conformance/undefinedIsSubtypeOfEverything.types b/testdata/baselines/reference/submodule/conformance/undefinedIsSubtypeOfEverything.types index fb526dc6a7..4978654e30 100644 --- a/testdata/baselines/reference/submodule/conformance/undefinedIsSubtypeOfEverything.types +++ b/testdata/baselines/reference/submodule/conformance/undefinedIsSubtypeOfEverything.types @@ -144,7 +144,7 @@ class D10 extends Base { } enum E { A } ->E : E.A +>E : E >A : E.A class D11 extends Base { @@ -152,7 +152,7 @@ class D11 extends Base { >Base : Base foo: E; ->foo : E.A +>foo : E } function f() { } diff --git a/testdata/baselines/reference/submodule/conformance/undefinedIsSubtypeOfEverything.types.diff b/testdata/baselines/reference/submodule/conformance/undefinedIsSubtypeOfEverything.types.diff index a6f3bf2521..14d25ff1f9 100644 --- a/testdata/baselines/reference/submodule/conformance/undefinedIsSubtypeOfEverything.types.diff +++ b/testdata/baselines/reference/submodule/conformance/undefinedIsSubtypeOfEverything.types.diff @@ -25,25 +25,7 @@ bar: string; >bar : string } -@@= skipped -21, +23 lines =@@ - } - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - class D11 extends Base { -@@= skipped -8, +8 lines =@@ - >Base : Base - - foo: E; -->foo : E -+>foo : E.A - } - - function f() { } -@@= skipped -19, +19 lines =@@ +@@= skipped -48, +50 lines =@@ foo: typeof f; >foo : typeof f diff --git a/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.types b/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.types index 4227d7356c..9de9cdcebe 100644 --- a/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.types +++ b/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.types @@ -204,7 +204,7 @@ interface I13 { enum E2 { A } ->E2 : E2.A +>E2 : E2 >A : E2.A interface I14 { diff --git a/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.types.diff b/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.types.diff index b5af89db20..c80c2db017 100644 --- a/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.types.diff +++ b/testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.types.diff @@ -124,12 +124,7 @@ >x : T foo: string | number; -@@= skipped -13, +16 lines =@@ - - - enum E2 { A } -->E2 : E2 -+>E2 : E2.A +@@= skipped -17, +20 lines =@@ >A : E2.A interface I14 { @@ -138,7 +133,7 @@ [x: string]: E2; >x : string -@@= skipped -26, +28 lines =@@ +@@= skipped -22, +24 lines =@@ >1 : 1 } interface I15 { diff --git a/testdata/baselines/reference/submodule/conformance/validNullAssignments.types b/testdata/baselines/reference/submodule/conformance/validNullAssignments.types index 0c23c9c7a1..983999e140 100644 --- a/testdata/baselines/reference/submodule/conformance/validNullAssignments.types +++ b/testdata/baselines/reference/submodule/conformance/validNullAssignments.types @@ -21,7 +21,7 @@ e = null; // ok >e : any enum E { A } ->E : E.A +>E : E >A : E.A E.A = null; // error diff --git a/testdata/baselines/reference/submodule/conformance/validNullAssignments.types.diff b/testdata/baselines/reference/submodule/conformance/validNullAssignments.types.diff index 2314b23699..b209758ce9 100644 --- a/testdata/baselines/reference/submodule/conformance/validNullAssignments.types.diff +++ b/testdata/baselines/reference/submodule/conformance/validNullAssignments.types.diff @@ -8,14 +8,6 @@ e = null; // ok >e = null : null - >e : any - - enum E { A } -->E : E -+>E : E.A - >A : E.A - - E.A = null; // error @@= skipped -32, +31 lines =@@ >C : any diff --git a/testdata/baselines/reference/submodule/conformance/validNumberAssignments.types b/testdata/baselines/reference/submodule/conformance/validNumberAssignments.types index e2f5e7a99c..1a08d9fa30 100644 --- a/testdata/baselines/reference/submodule/conformance/validNumberAssignments.types +++ b/testdata/baselines/reference/submodule/conformance/validNumberAssignments.types @@ -18,21 +18,21 @@ var c: number = x; >x : number enum E { A }; ->E : E.A +>E : E >A : E.A var d: E = x; ->d : E.A +>d : E >x : number var e = E.A; ->e : E.A ->E.A : E.A +>e : E +>E.A : E >E : typeof E ->A : E.A +>A : E e = x; >e = x : number ->e : E.A +>e : E >x : number diff --git a/testdata/baselines/reference/submodule/conformance/validNumberAssignments.types.diff b/testdata/baselines/reference/submodule/conformance/validNumberAssignments.types.diff deleted file mode 100644 index 238be1a020..0000000000 --- a/testdata/baselines/reference/submodule/conformance/validNumberAssignments.types.diff +++ /dev/null @@ -1,30 +0,0 @@ ---- old.validNumberAssignments.types -+++ new.validNumberAssignments.types -@@= skipped -17, +17 lines =@@ - >x : number - - enum E { A }; -->E : E -+>E : E.A - >A : E.A - - var d: E = x; -->d : E -+>d : E.A - >x : number - - var e = E.A; -->e : E -->E.A : E -+>e : E.A -+>E.A : E.A - >E : typeof E -->A : E -+>A : E.A - - e = x; - >e = x : number -->e : E -+>e : E.A - >x : number - diff --git a/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxConstEnum.types b/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxConstEnum.types index cceb90d806..a65663c715 100644 --- a/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxConstEnum.types +++ b/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxConstEnum.types @@ -2,7 +2,7 @@ === verbatimModuleSyntaxConstEnum.ts === export const enum E { ->E : E.A +>E : E A = 1, >A : E.A diff --git a/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxConstEnum.types.diff b/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxConstEnum.types.diff deleted file mode 100644 index 66b44203c7..0000000000 --- a/testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxConstEnum.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.verbatimModuleSyntaxConstEnum.types -+++ new.verbatimModuleSyntaxConstEnum.types -@@= skipped -1, +1 lines =@@ - - === verbatimModuleSyntaxConstEnum.ts === - export const enum E { -->E : E -+>E : E.A - - A = 1, - >A : E.A From aecd11df1b33b8def0b2399788de515a76088f11 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 17 Mar 2025 05:48:14 -0700 Subject: [PATCH 31/31] Use Number.Remainder and fix issue in that function --- internal/checker/checker.go | 4 +--- internal/jsnum/jsnum.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/checker/checker.go b/internal/checker/checker.go index 8f427ad44d..75881c01df 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -11533,10 +11533,8 @@ func (c *Checker) checkBinaryLikeExpression(left *ast.Node, operatorToken *ast.N ast.KindGreaterThanGreaterThanGreaterThanEqualsToken: rhsEval := c.evaluate(right, right) if numValue, ok := rhsEval.Value.(jsnum.Number); ok && numValue.Abs() >= 32 { - // Adding 0 removes sign from -0 - shiftMod32 := math.Mod(float64(numValue), 32) + 0 // Elevate from suggestion to error within an enum member - c.errorOrSuggestion(ast.IsEnumMember(ast.WalkUpParenthesizedExpressions(right.Parent.Parent)), errorNode, diagnostics.This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2, scanner.GetTextOfNode(left), scanner.TokenToString(operator), shiftMod32) + c.errorOrSuggestion(ast.IsEnumMember(ast.WalkUpParenthesizedExpressions(right.Parent.Parent)), errorNode, diagnostics.This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2, scanner.GetTextOfNode(left), scanner.TokenToString(operator), numValue.Remainder(32)) } } } diff --git a/internal/jsnum/jsnum.go b/internal/jsnum/jsnum.go index 15399c9edb..14d8338a08 100644 --- a/internal/jsnum/jsnum.go +++ b/internal/jsnum/jsnum.go @@ -137,12 +137,10 @@ func (n Number) Remainder(d Number) Number { case n == 0: return n } - r := n - d*(n/d).trunc() - if r == 0 || n < 0 { + if r == 0 && n < 0 { return negativeZero } - return r }