Skip to content

Commit e1078dd

Browse files
committed
Update baselines for labeled function declaration errors
1 parent 6a1ff4b commit e1078dd

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

tests/baselines/reference/labeledStatementWithLabel.errors.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1+
labeledStatementWithLabel.ts(1,17): error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
2+
labeledStatementWithLabel.ts(2,18): error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
3+
labeledStatementWithLabel.ts(3,23): error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
14
labeledStatementWithLabel.ts(11,8): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
25
labeledStatementWithLabel.ts(12,8): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
36

47

5-
==== labeledStatementWithLabel.ts (2 errors) ====
8+
==== labeledStatementWithLabel.ts (5 errors) ====
69
label: function fn() { }
10+
~~
11+
!!! error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
712
label: function* gen() { }
13+
~~~
14+
!!! error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
815
label: async function gen1() { }
16+
~~~~
17+
!!! error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
918
label: enum E {}
1019
label: interface I {}
1120
label: class C { }

tests/baselines/reference/labeledStatementWithLabel_es2015.errors.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1+
labeledStatementWithLabel_es2015.ts(1,17): error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
2+
labeledStatementWithLabel_es2015.ts(2,18): error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
3+
labeledStatementWithLabel_es2015.ts(3,23): error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
14
labeledStatementWithLabel_es2015.ts(11,8): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
25
labeledStatementWithLabel_es2015.ts(12,8): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
36

47

5-
==== labeledStatementWithLabel_es2015.ts (2 errors) ====
8+
==== labeledStatementWithLabel_es2015.ts (5 errors) ====
69
label: function fn() { }
10+
~~
11+
!!! error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
712
label: function* gen() { }
13+
~~~
14+
!!! error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
815
label: async function gen1() { }
16+
~~~~
17+
!!! error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
918
label: enum E {}
1019
label: interface I {}
1120
label: class C { }

tests/baselines/reference/labeledStatementWithLabel_strict.errors.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
labeledStatementWithLabel_strict.ts(2,1): error TS1344: 'A label is not allowed here.
2+
labeledStatementWithLabel_strict.ts(2,17): error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
23
labeledStatementWithLabel_strict.ts(3,1): error TS1344: 'A label is not allowed here.
4+
labeledStatementWithLabel_strict.ts(3,18): error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
35
labeledStatementWithLabel_strict.ts(4,1): error TS1344: 'A label is not allowed here.
6+
labeledStatementWithLabel_strict.ts(4,23): error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
47
labeledStatementWithLabel_strict.ts(5,1): error TS1344: 'A label is not allowed here.
58
labeledStatementWithLabel_strict.ts(6,1): error TS1344: 'A label is not allowed here.
69
labeledStatementWithLabel_strict.ts(7,1): error TS1344: 'A label is not allowed here.
@@ -14,17 +17,23 @@ labeledStatementWithLabel_strict.ts(13,8): error TS1235: A namespace declaration
1417
labeledStatementWithLabel_strict.ts(14,1): error TS1344: 'A label is not allowed here.
1518

1619

17-
==== labeledStatementWithLabel_strict.ts (14 errors) ====
20+
==== labeledStatementWithLabel_strict.ts (17 errors) ====
1821
"use strict"
1922
label: function fn() { }
2023
~~~~~
2124
!!! error TS1344: 'A label is not allowed here.
25+
~~
26+
!!! error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
2227
label: function* gen() { }
2328
~~~~~
2429
!!! error TS1344: 'A label is not allowed here.
30+
~~~
31+
!!! error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
2532
label: async function gen1() { }
2633
~~~~~
2734
!!! error TS1344: 'A label is not allowed here.
35+
~~~~
36+
!!! error TS1256: Function declarations are not allowed inside statements. Use a block statement to wrap the function declaration.
2837
label: enum E {}
2938
~~~~~
3039
!!! error TS1344: 'A label is not allowed here.

0 commit comments

Comments
 (0)