Skip to content

Commit f675798

Browse files
Accepted baselines.
1 parent c4500bd commit f675798

File tree

48 files changed

+115
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+115
-1
lines changed

tests/baselines/reference/ES5For-of17.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts(3,20): error
77
for (let v of [v]) {
88
~
99
!!! error TS2448: Block-scoped variable 'v' used before its declaration.
10+
!!! related TS2728 tests/cases/conformance/statements/for-ofStatements/ES5For-of17.ts:3:14: 'v' was declared here.
1011
var x = v;
1112
v++;
1213
}

tests/baselines/reference/ES5For-of20.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(4,15): error
88
for (let v of [v]) {
99
~
1010
!!! error TS2448: Block-scoped variable 'v' used before its declaration.
11+
!!! related TS2728 tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts:3:14: 'v' was declared here.
1112
const v;
1213
~
1314
!!! error TS1155: 'const' declarations must be initialized.

tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(2,31): erro
3232
export var Instance = new A();
3333
~
3434
!!! error TS2449: Class 'A' used before its declaration.
35+
!!! related TS2728 tests/cases/conformance/internalModules/DeclarationMerging/simple.ts:6:7: 'A' was declared here.
3536
}
3637

3738
// duplicate identifier

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5418,6 +5418,7 @@ declare namespace ts {
54185418
Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: DiagnosticMessage;
54195419
Cannot_find_lib_definition_for_0: DiagnosticMessage;
54205420
Cannot_find_lib_definition_for_0_Did_you_mean_1: DiagnosticMessage;
5421+
_0_was_declared_here: DiagnosticMessage;
54215422
Import_declaration_0_is_using_private_name_1: DiagnosticMessage;
54225423
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: DiagnosticMessage;
54235424
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: DiagnosticMessage;

tests/baselines/reference/blockScopedBindingUsedBeforeDef.errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts(8,7): error TS2448: Bloc
88
for (let {[a]: a} of [{ }]) continue;
99
~
1010
!!! error TS2448: Block-scoped variable 'a' used before its declaration.
11+
!!! related TS2728 tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts:2:16: 'a' was declared here.
1112

1213
// 2:
1314
for (let {[a]: a} = { }; false; ) continue;
1415
~
1516
!!! error TS2448: Block-scoped variable 'a' used before its declaration.
17+
!!! related TS2728 tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts:5:16: 'a' was declared here.
1618

1719
// 3:
1820
let {[b]: b} = { };
1921
~
20-
!!! error TS2448: Block-scoped variable 'b' used before its declaration.
22+
!!! error TS2448: Block-scoped variable 'b' used before its declaration.
23+
!!! related TS2728 tests/cases/compiler/blockScopedBindingUsedBeforeDef.ts:8:11: 'b' was declared here.

tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(100,12): error TS2448:
99
let a = x;
1010
~
1111
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
12+
!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:3:9: 'x' was declared here.
1213
let x;
1314
}
1415

@@ -67,6 +68,7 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(100,12): error TS2448:
6768
static a = x;
6869
~
6970
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
71+
!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:60:9: 'x' was declared here.
7072
}
7173
let x;
7274
}
@@ -76,6 +78,7 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(100,12): error TS2448:
7678
static a = x;
7779
~
7880
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
81+
!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:67:9: 'x' was declared here.
7982
}
8083
let x;
8184
}
@@ -113,6 +116,7 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(100,12): error TS2448:
113116
a: x
114117
~
115118
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
119+
!!! related TS2728 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts:102:9: 'x' was declared here.
116120
}
117121
let x
118122
}

tests/baselines/reference/circularImportAlias.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tests/cases/conformance/internalModules/importDeclarations/circularImportAlias.t
99
export class D extends a.C {
1010
~
1111
!!! error TS2449: Class 'C' used before its declaration.
12+
!!! related TS2728 tests/cases/conformance/internalModules/importDeclarations/circularImportAlias.ts:11:18: 'C' was declared here.
1213
id: number;
1314
}
1415
}

tests/baselines/reference/classAbstractInstantiations2.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst
4545
var x : any = C;
4646
~
4747
!!! error TS2449: Class 'C' used before its declaration.
48+
!!! related TS2728 tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts:26:7: 'C' was declared here.
4849
new x; // okay -- undefined behavior at runtime
4950

5051
class C extends B { } // error -- not declared abstract

tests/baselines/reference/classDeclarationShouldBeOutOfScopeInComputedNames.errors.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ tests/cases/compiler/classDeclarationShouldBeOutOfScopeInComputedNames.ts(8,6):
1212
static readonly [A.p1] = 0;
1313
~
1414
!!! error TS2449: Class 'A' used before its declaration.
15+
!!! related TS2728 tests/cases/compiler/classDeclarationShouldBeOutOfScopeInComputedNames.ts:1:7: 'A' was declared here.
1516
static [A.p2]() { return 0 };
1617
~
1718
!!! error TS2449: Class 'A' used before its declaration.
19+
!!! related TS2728 tests/cases/compiler/classDeclarationShouldBeOutOfScopeInComputedNames.ts:1:7: 'A' was declared here.
1820
[A.p1]() { }
1921
~
2022
!!! error TS2449: Class 'A' used before its declaration.
23+
!!! related TS2728 tests/cases/compiler/classDeclarationShouldBeOutOfScopeInComputedNames.ts:1:7: 'A' was declared here.
2124
[A.p2] = 0
2225
~
2326
!!! error TS2449: Class 'A' used before its declaration.
27+
!!! related TS2728 tests/cases/compiler/classDeclarationShouldBeOutOfScopeInComputedNames.ts:1:7: 'A' was declared here.
2428
}
2529

tests/baselines/reference/classExtendsItselfIndirectly.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
1414
!!! error TS2506: 'C' is referenced directly or indirectly in its own base expression.
1515
~
1616
!!! error TS2449: Class 'E' used before its declaration.
17+
!!! related TS2728 tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts:5:7: 'E' was declared here.
1718

1819
class D extends C { bar: string; }
1920
~
@@ -28,6 +29,7 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
2829
!!! error TS2506: 'C2' is referenced directly or indirectly in its own base expression.
2930
~~
3031
!!! error TS2449: Class 'E2' used before its declaration.
32+
!!! related TS2728 tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts:11:7: 'E2' was declared here.
3133

3234
class D2<T> extends C2<T> { bar: T; }
3335
~~

tests/baselines/reference/classExtendsItselfIndirectly2.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
1414
!!! error TS2506: 'C' is referenced directly or indirectly in its own base expression.
1515
~
1616
!!! error TS2449: Class 'E' used before its declaration.
17+
!!! related TS2728 tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts:9:18: 'E' was declared here.
1718

1819
module M {
1920
export class D extends C { bar: string; }
@@ -34,6 +35,7 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
3435
!!! error TS2506: 'C2' is referenced directly or indirectly in its own base expression.
3536
~~
3637
!!! error TS2449: Class 'E2' used before its declaration.
38+
!!! related TS2728 tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts:20:22: 'E2' was declared here.
3739

3840
module P {
3941
export class D2<T> extends C2<T> { bar: T; }

tests/baselines/reference/classInheritence.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ tests/cases/compiler/classInheritence.ts(2,7): error TS2506: 'A' is referenced d
66
class B extends A { }
77
~
88
!!! error TS2449: Class 'A' used before its declaration.
9+
!!! related TS2728 tests/cases/compiler/classInheritence.ts:2:7: 'A' was declared here.
910
class A extends A { }
1011
~
1112
!!! error TS2506: 'A' is referenced directly or indirectly in its own base expression.

tests/baselines/reference/classMergedWithInterfaceMultipleBasesNoError.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ tests/cases/compiler/classMergedWithInterfaceMultipleBasesNoError.ts(8,30): erro
1212
readonly observer = this.handleIntersection;
1313
~~~~~~~~~~~~~~~~~~
1414
!!! error TS2448: Block-scoped variable 'handleIntersection' used before its declaration.
15+
!!! related TS2728 tests/cases/compiler/classMergedWithInterfaceMultipleBasesNoError.ts:9:14: 'handleIntersection' was declared here.
1516
readonly handleIntersection = () => { }
1617
}

tests/baselines/reference/classOrder2.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ tests/cases/compiler/classOrder2.ts(1,17): error TS2449: Class 'B' used before i
55
class A extends B {
66
~
77
!!! error TS2449: Class 'B' used before its declaration.
8+
!!! related TS2728 tests/cases/compiler/classOrder2.ts:7:7: 'B' was declared here.
89

910
foo() { this.bar(); }
1011

tests/baselines/reference/classSideInheritance2.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tests/cases/compiler/classSideInheritance2.ts(7,23): error TS2449: Class 'TextBa
1111
class SubText extends TextBase {
1212
~~~~~~~~
1313
!!! error TS2449: Class 'TextBase' used before its declaration.
14+
!!! related TS2728 tests/cases/compiler/classSideInheritance2.ts:14:7: 'TextBase' was declared here.
1415

1516
constructor(text: IText, span: TextSpan) {
1617
super();

tests/baselines/reference/classStaticInitializersUsePropertiesBeforeDeclaration.errors.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,21 @@ tests/cases/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.ts(4,
1010
static enumMember = Enum.A;
1111
~~~~
1212
!!! error TS2450: Enum 'Enum' used before its declaration.
13+
!!! related TS2728 tests/cases/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.ts:7:6: 'Enum' was declared here.
1314
~
1415
!!! error TS2448: Block-scoped variable 'A' used before its declaration.
16+
!!! related TS2728 tests/cases/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.ts:8:5: 'A' was declared here.
1517
static objLiteralMember = ObjLiteral.A;
1618
~~~~~~~~~~
1719
!!! error TS2448: Block-scoped variable 'ObjLiteral' used before its declaration.
20+
!!! related TS2728 tests/cases/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.ts:11:7: 'ObjLiteral' was declared here.
1821
~
1922
!!! error TS2448: Block-scoped variable 'A' used before its declaration.
23+
!!! related TS2728 tests/cases/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.ts:12:5: 'A' was declared here.
2024
static namespaceMember = Namespace.A;
2125
~
2226
!!! error TS2448: Block-scoped variable 'A' used before its declaration.
27+
!!! related TS2728 tests/cases/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.ts:16:16: 'A' was declared here.
2328
}
2429

2530
enum Enum {

tests/baselines/reference/complexClassRelationships.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ tests/cases/compiler/complexClassRelationships.ts(2,23): error TS2449: Class 'Ba
66
class Derived extends Base {
77
~~~~
88
!!! error TS2449: Class 'Base' used before its declaration.
9+
!!! related TS2728 tests/cases/compiler/complexClassRelationships.ts:13:7: 'Base' was declared here.
910
public static createEmpty(): Derived {
1011
var item = new Derived();
1112
return item;

tests/baselines/reference/computedPropertyNamesWithStaticProperty.errors.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticPr
99
get [C.staticProp]() {
1010
~
1111
!!! error TS2449: Class 'C' used before its declaration.
12+
!!! related TS2728 tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts:1:7: 'C' was declared here.
1213
return "hello";
1314
}
1415
set [C.staticProp](x: string) {
1516
~
1617
!!! error TS2449: Class 'C' used before its declaration.
18+
!!! related TS2728 tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts:1:7: 'C' was declared here.
1719
var y = x;
1820
}
1921
[C.staticProp]() { }
2022
~
2123
!!! error TS2449: Class 'C' used before its declaration.
24+
!!! related TS2728 tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts:1:7: 'C' was declared here.
2225
}

tests/baselines/reference/constDeclarations-useBeforeDefinition.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tests/cases/compiler/constDeclarations-useBeforeDefinition.ts(8,5): error TS2448
77
c1;
88
~~
99
!!! error TS2448: Block-scoped variable 'c1' used before its declaration.
10+
!!! related TS2728 tests/cases/compiler/constDeclarations-useBeforeDefinition.ts:3:11: 'c1' was declared here.
1011
const c1 = 0;
1112
}
1213

@@ -15,6 +16,7 @@ tests/cases/compiler/constDeclarations-useBeforeDefinition.ts(8,5): error TS2448
1516
v1;
1617
~~
1718
!!! error TS2448: Block-scoped variable 'v1' used before its declaration.
19+
!!! related TS2728 tests/cases/compiler/constDeclarations-useBeforeDefinition.ts:9:11: 'v1' was declared here.
1820
const v1 = 0;
1921
}
2022

tests/baselines/reference/constDeclarations-useBeforeDefinition2.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ tests/cases/compiler/file1.ts(1,1): error TS2448: Block-scoped variable 'c' used
55
c;
66
~
77
!!! error TS2448: Block-scoped variable 'c' used before its declaration.
8+
!!! related TS2728 tests/cases/compiler/file2.ts:1:7: 'c' was declared here.
89

910
==== tests/cases/compiler/file2.ts (0 errors) ====
1011
const c = 0;

tests/baselines/reference/derivedClasses.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ tests/cases/compiler/derivedClasses.ts(1,19): error TS2449: Class 'Color' used b
55
class Red extends Color {
66
~~~~~
77
!!! error TS2449: Class 'Color' used before its declaration.
8+
!!! related TS2728 tests/cases/compiler/derivedClasses.ts:8:7: 'Color' was declared here.
89
public shade() {
910
var getHue = () => { return this.hue(); };
1011
return getHue() + " red";

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment3.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
99
const [c, d = c, e = e] = [1]; // error for e = e
1010
~
1111
!!! error TS2448: Block-scoped variable 'e' used before its declaration.
12+
!!! related TS2728 tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment3.ts:2:18: 'e' was declared here.
1213
const [f, g = f, h = i, i = f] = [1]; // error for h = i
1314
~
1415
!!! error TS2448: Block-scoped variable 'i' used before its declaration.
16+
!!! related TS2728 tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment3.ts:3:25: 'i' was declared here.
1517

1618
(function ([a, b = a]) { // ok
1719
})([1]);

tests/baselines/reference/destructuringObjectBindingPatternAndAssignment4.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAs
1111
e = f, // error
1212
~
1313
!!! error TS2448: Block-scoped variable 'f' used before its declaration.
14+
!!! related TS2728 tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment4.ts:7:5: 'f' was declared here.
1415
f = f // error
1516
~
1617
!!! error TS2448: Block-scoped variable 'f' used before its declaration.
18+
!!! related TS2728 tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment4.ts:7:5: 'f' was declared here.
1719
} = { } as any;
1820

tests/baselines/reference/enumUsedBeforeDeclaration.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ tests/cases/compiler/enumUsedBeforeDeclaration.ts(1,18): error TS2450: Enum 'Col
55
const v: Color = Color.Green;
66
~~~~~
77
!!! error TS2450: Enum 'Color' used before its declaration.
8+
!!! related TS2728 tests/cases/compiler/enumUsedBeforeDeclaration.ts:3:6: 'Color' was declared here.
89
const v2: ConstColor = ConstColor.Green;
910
enum Color { Red, Green, Blue }
1011
const enum ConstColor { Red, Green, Blue }

tests/baselines/reference/es5ExportDefaultClassDeclaration3.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ tests/cases/compiler/es5ExportDefaultClassDeclaration3.ts(1,21): error TS2449: C
55
var before: C = new C();
66
~
77
!!! error TS2449: Class 'C' used before its declaration.
8+
!!! related TS2728 tests/cases/compiler/es5ExportDefaultClassDeclaration3.ts:3:22: 'C' was declared here.
89

910
export default class C {
1011
method(): C {

tests/baselines/reference/exportAssignmentImportMergeNoCrash.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ tests/cases/compiler/user.ts(3,25): error TS2448: Block-scoped variable 'Obj' us
2121
!!! error TS2395: Individual declarations in merged declaration 'Obj' must be all exported or all local.
2222
~~~
2323
!!! error TS2448: Block-scoped variable 'Obj' used before its declaration.
24+
!!! related TS2728 tests/cases/compiler/user.ts:3:14: 'Obj' was declared here.
2425

tests/baselines/reference/exportBinding.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tests/cases/conformance/es6/modules/exportVars.ts(3,16): error TS2454: Variable
99
export default x;
1010
~
1111
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
12+
!!! related TS2728 tests/cases/conformance/es6/modules/exportConsts.ts:5:7: 'x' was declared here.
1213
~
1314
!!! error TS2454: Variable 'x' is used before being assigned.
1415

tests/baselines/reference/exportedBlockScopedDeclarations.errors.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,41 @@ tests/cases/compiler/exportedBlockScopedDeclarations.ts(16,21): error TS2448: Bl
1212
const foo = foo; // compile error
1313
~~~
1414
!!! error TS2448: Block-scoped variable 'foo' used before its declaration.
15+
!!! related TS2728 tests/cases/compiler/exportedBlockScopedDeclarations.ts:1:7: 'foo' was declared here.
1516
export const bar = bar; // should be compile error
1617
~~~
1718
!!! error TS2448: Block-scoped variable 'bar' used before its declaration.
19+
!!! related TS2728 tests/cases/compiler/exportedBlockScopedDeclarations.ts:2:14: 'bar' was declared here.
1820
function f() {
1921
const bar = bar; // compile error
2022
~~~
2123
!!! error TS2448: Block-scoped variable 'bar' used before its declaration.
24+
!!! related TS2728 tests/cases/compiler/exportedBlockScopedDeclarations.ts:4:9: 'bar' was declared here.
2225
}
2326
namespace NS {
2427
export const bar = bar; // should be compile error
2528
~~~
2629
!!! error TS2448: Block-scoped variable 'bar' used before its declaration.
30+
!!! related TS2728 tests/cases/compiler/exportedBlockScopedDeclarations.ts:7:16: 'bar' was declared here.
2731
}
2832

2933
let foo1 = foo1; // compile error
3034
~~~~
3135
!!! error TS2448: Block-scoped variable 'foo1' used before its declaration.
36+
!!! related TS2728 tests/cases/compiler/exportedBlockScopedDeclarations.ts:10:5: 'foo1' was declared here.
3237
export let bar1 = bar1; // should be compile error
3338
~~~~
3439
!!! error TS2448: Block-scoped variable 'bar1' used before its declaration.
40+
!!! related TS2728 tests/cases/compiler/exportedBlockScopedDeclarations.ts:11:12: 'bar1' was declared here.
3541
function f1() {
3642
let bar1 = bar1; // compile error
3743
~~~~
3844
!!! error TS2448: Block-scoped variable 'bar1' used before its declaration.
45+
!!! related TS2728 tests/cases/compiler/exportedBlockScopedDeclarations.ts:13:7: 'bar1' was declared here.
3946
}
4047
namespace NS1 {
4148
export let bar1 = bar1; // should be compile error
4249
~~~~
4350
!!! error TS2448: Block-scoped variable 'bar1' used before its declaration.
51+
!!! related TS2728 tests/cases/compiler/exportedBlockScopedDeclarations.ts:16:14: 'bar1' was declared here.
4452
}

tests/baselines/reference/extendBaseClassBeforeItsDeclared.errors.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ tests/cases/compiler/extendBaseClassBeforeItsDeclared.ts(1,23): error TS2449: Cl
55
class derived extends base { }
66
~~~~
77
!!! error TS2449: Class 'base' used before its declaration.
8+
!!! related TS2728 tests/cases/compiler/extendBaseClassBeforeItsDeclared.ts:3:7: 'base' was declared here.
89

910
class base { constructor (public n: number) { } }

0 commit comments

Comments
 (0)