Skip to content

Commit d0054f6

Browse files
authored
Fixes #3111. Update expected errors positions (#3113)
Fixes #3111. Update positions of expected errors
1 parent 3f197e0 commit d0054f6

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

Language/Expressions/Maps/syntax_t08.dart

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,16 @@
1212
/// ;
1313
/// A map literal consists of zero or more entries. Each entry has a key and a
1414
/// value. Each key and each value is denoted by an expression.
15+
///
1516
/// @description Checks that it is a compile-time error if a map literal
1617
/// does not end with '}'.
1718
/// @author msyabro
1819
19-
2020
main() {
21-
// ^
22-
// [cfe] unspecified
23-
var x = {"key1": true, "key2":false;
24-
// ^
21+
var x = {"key1": true, "key2": false;
22+
// ^
2523
// [analyzer] unspecified
2624
// [cfe] unspecified
27-
}
28-
//^
25+
/**/}
26+
// ^
2927
// [analyzer] unspecified
30-
// [cfe] unspecified
31-
// [error line 32, column 0]
32-
// [analyzer] unspecified

Language/Statements/Switch/syntax_t08.dart

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,17 @@
1717
/// bracket of the switch statement's body is missing.
1818
/// @author vasya
1919
20-
2120
switchTest(value) {
22-
// ^
23-
// [cfe] unspecified
2421
var result;
2522

2623
switch (value) {
24+
// ^
25+
// [cfe] unspecified
2726
case 0: result = 0; break;
2827
default: result = -1;
2928
return result;
30-
}
29+
/**/}
30+
// ^
31+
// [analyzer] unspecified
3132

3233
main() {}
33-
// [error line 34, column 0]
34-
// [analyzer] unspecified

Language/Statements/Try/syntax_t04.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@
2222
/// implicitly) the type of exception object to be handled, one or two
2323
/// exception parameters and a block statement.
2424
/// 2. A finally clause, which consists of a block statement.
25+
///
2526
/// @description Checks that it is a compile-time error if the try block is
2627
/// missing the closing curly braces.
2728
/// @author vasya
2829
29-
3030
main() {
31-
// ^
32-
// [cfe] unspecified
3331
try {
3432
//^
3533
// [analyzer] unspecified
@@ -39,6 +37,6 @@ main() {
3937
// ^
4038
// [analyzer] unspecified
4139
// [cfe] unspecified
42-
}
43-
// [error line 44, column 0]
44-
// [analyzer] unspecified
40+
/**/}
41+
// ^
42+
// [analyzer] unspecified

0 commit comments

Comments
 (0)