Version 2.17.0-217.0.dev
Merge commit 'fd4e41a7af2c1913efb9282603b083029ced354d' into 'dev'
diff --git a/DEPS b/DEPS
index c0ff65e..3e05793 100644
--- a/DEPS
+++ b/DEPS
@@ -174,7 +174,7 @@
"WebCore_rev": "bcb10901266c884e7b3740abc597ab95373ab55c",
"webdev_rev": "832b096c0c24798d3df46faa7b7661fe930573c2",
"webkit_inspection_protocol_rev": "dd6fb5d8b536e19cedb384d0bbf1f5631923f1e8",
- "yaml_edit_rev": "df1452bfe1653286277a1a8f34dddf3e4fbedd9e",
+ "yaml_edit_rev": "4fadb43801b07f90b3f0c6065dbce4efc6d8d55e",
"yaml_rev": "ad0779d1baa25c6b10a192d080efc45de02b6a32",
"zlib_rev": "bf44340d1b6be1af8950bbdf664fec0cf5a831cc",
"crashpad_rev": "bf327d8ceb6a669607b0dbab5a83a275d03f99ed",
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
index 40c42a8..652e463 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -6114,6 +6114,17 @@
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeInvalidEscapeStarted = messageInvalidEscapeStarted;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageInvalidEscapeStarted = const MessageCode(
+ "InvalidEscapeStarted",
+ index: 126,
+ problemMessage: r"""The string '\' can't stand alone.""",
+ correctionMessage:
+ r"""Try adding another backslash (\) to escape the '\'.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String name)>
templateInvalidGetterSetterTypeFieldContext =
const Template<Message Function(String name)>(
@@ -6438,11 +6449,34 @@
}
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Null> codeInvalidUnicodeEscape = messageInvalidUnicodeEscape;
+const Code<Null> codeInvalidUnicodeEscapeUBracket =
+ messageInvalidUnicodeEscapeUBracket;
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const MessageCode messageInvalidUnicodeEscape = const MessageCode(
- "InvalidUnicodeEscape",
+const MessageCode messageInvalidUnicodeEscapeUBracket = const MessageCode(
+ "InvalidUnicodeEscapeUBracket",
+ index: 125,
+ problemMessage:
+ r"""An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeInvalidUnicodeEscapeUNoBracket =
+ messageInvalidUnicodeEscapeUNoBracket;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageInvalidUnicodeEscapeUNoBracket = const MessageCode(
+ "InvalidUnicodeEscapeUNoBracket",
+ index: 124,
+ problemMessage:
+ r"""An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeInvalidUnicodeEscapeUStarted =
+ messageInvalidUnicodeEscapeUStarted;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageInvalidUnicodeEscapeUStarted = const MessageCode(
+ "InvalidUnicodeEscapeUStarted",
index: 38,
problemMessage:
r"""An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.""");
diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/quote.dart b/pkg/_fe_analyzer_shared/lib/src/parser/quote.dart
index c9ec28a..fe146ce 100644
--- a/pkg/_fe_analyzer_shared/lib/src/parser/quote.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/parser/quote.dart
@@ -193,8 +193,9 @@
code = $LF;
} else if (!isRaw && code == $BACKSLASH) {
if (codeUnits.length == ++i) {
+ // This should only be reachable in error cases.
listener.handleUnescapeError(
- codes.messageInvalidUnicodeEscape, location, i, /* length = */ 1);
+ codes.messageInvalidEscapeStarted, location, i, /* length = */ 1);
return new String.fromCharCodes(codeUnits);
}
code = codeUnits[i];
@@ -240,47 +241,78 @@
} else if (code == $u) {
int begin = i;
if (codeUnits.length == i + 1) {
- listener.handleUnescapeError(codes.messageInvalidUnicodeEscape,
- location, begin, codeUnits.length + 1 - begin);
+ listener.handleUnescapeError(
+ codes.messageInvalidUnicodeEscapeUStarted,
+ location,
+ begin,
+ codeUnits.length + 1 - begin);
return new String.fromCharCodes(codeUnits);
}
code = codeUnits[i + 1];
+ bool foundEndBracket = false;
if (code == $OPEN_CURLY_BRACKET) {
// Expect 1-6 hex digits followed by '}'.
if (codeUnits.length == ++i) {
- listener.handleUnescapeError(codes.messageInvalidUnicodeEscape,
- location, begin, i + 1 - begin);
+ listener.handleUnescapeError(
+ codes.messageInvalidUnicodeEscapeUBracket,
+ location,
+ begin,
+ i + 1 - begin);
return new String.fromCharCodes(codeUnits);
}
code = 0;
for (int j = 0; j < 7; j++) {
if (codeUnits.length == ++i) {
- listener.handleUnescapeError(codes.messageInvalidUnicodeEscape,
- location, begin, i + 1 - begin);
+ listener.handleUnescapeError(
+ codes.messageInvalidUnicodeEscapeUBracket,
+ location,
+ begin,
+ i + 1 - begin);
return new String.fromCharCodes(codeUnits);
}
int digit = codeUnits[i];
- if (j != 0 && digit == $CLOSE_CURLY_BRACKET) break;
+ if (j != 0 && digit == $CLOSE_CURLY_BRACKET) {
+ foundEndBracket = true;
+ break;
+ } else if (j == 6) {
+ break;
+ }
if (!isHexDigit(digit)) {
- listener.handleUnescapeError(codes.messageInvalidUnicodeEscape,
- location, begin, i + 2 - begin);
+ listener.handleUnescapeError(
+ codes.messageInvalidUnicodeEscapeUBracket,
+ location,
+ begin,
+ i + 2 - begin);
return new String.fromCharCodes(codeUnits);
}
code = (code << 4) + hexDigitValue(digit);
}
+ if (!foundEndBracket) {
+ listener.handleUnescapeError(
+ codes.messageInvalidUnicodeEscapeUBracket,
+ location,
+ begin,
+ i + 1 - begin);
+ }
} else {
// Expect exactly 4 hex digits.
if (codeUnits.length <= i + 4) {
- listener.handleUnescapeError(codes.messageInvalidUnicodeEscape,
- location, begin, codeUnits.length + 1 - begin);
+ listener.handleUnescapeError(
+ codes.messageInvalidUnicodeEscapeUNoBracket,
+ location,
+ begin,
+ codeUnits.length + 1 - begin);
return new String.fromCharCodes(codeUnits);
}
code = 0;
for (int j = 0; j < 4; j++) {
int digit = codeUnits[++i];
if (!isHexDigit(digit)) {
- listener.handleUnescapeError(codes.messageInvalidUnicodeEscape,
- location, begin, i + 1 - begin);
+ listener.handleUnescapeError(
+ codes.messageInvalidUnicodeEscapeUNoBracket,
+ location,
+ begin,
+ i + 1 - begin);
return new String.fromCharCodes(codeUnits);
}
code = (code << 4) + hexDigitValue(digit);
diff --git a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
index c3c7bc1..41043e5 100644
--- a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
+++ b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
@@ -2096,7 +2096,13 @@
status: needsEvaluation
ParserErrorCode.INVALID_THIS_IN_INITIALIZER:
status: needsEvaluation
-ParserErrorCode.INVALID_UNICODE_ESCAPE:
+ParserErrorCode.INVALID_UNICODE_ESCAPE_STARTED:
+ status: needsEvaluation
+ParserErrorCode.INVALID_UNICODE_ESCAPE_U_BRACKET:
+ status: needsEvaluation
+ParserErrorCode.INVALID_UNICODE_ESCAPE_U_NO_BRACKET:
+ status: needsEvaluation
+ParserErrorCode.INVALID_UNICODE_ESCAPE_U_STARTED:
status: needsEvaluation
ParserErrorCode.INVALID_USE_OF_COVARIANT_IN_EXTENSION:
status: needsEvaluation
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index b28918d..19f32cc 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -805,7 +805,10 @@
ParserErrorCode.INVALID_SUPER_IN_INITIALIZER,
ParserErrorCode.INVALID_SYNC,
ParserErrorCode.INVALID_THIS_IN_INITIALIZER,
- ParserErrorCode.INVALID_UNICODE_ESCAPE,
+ ParserErrorCode.INVALID_UNICODE_ESCAPE_STARTED,
+ ParserErrorCode.INVALID_UNICODE_ESCAPE_U_BRACKET,
+ ParserErrorCode.INVALID_UNICODE_ESCAPE_U_NO_BRACKET,
+ ParserErrorCode.INVALID_UNICODE_ESCAPE_U_STARTED,
ParserErrorCode.INVALID_USE_OF_COVARIANT_IN_EXTENSION,
ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST,
ParserErrorCode.LITERAL_WITH_CLASS_AND_NEW,
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
index 1b0f41c..41bb550 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
@@ -52,7 +52,7 @@
ParserErrorCode.MISSING_ASSIGNABLE_SELECTOR,
ParserErrorCode.MISSING_INITIALIZER,
ParserErrorCode.LIBRARY_DIRECTIVE_NOT_FIRST,
- ParserErrorCode.INVALID_UNICODE_ESCAPE,
+ ParserErrorCode.INVALID_UNICODE_ESCAPE_U_STARTED,
ParserErrorCode.INVALID_OPERATOR,
ParserErrorCode.INVALID_HEX_ESCAPE,
ParserErrorCode.EXPECTED_INSTEAD,
@@ -138,6 +138,9 @@
ParserErrorCode.MULTIPLE_CLAUSES,
ParserErrorCode.OUT_OF_ORDER_CLAUSES,
ParserErrorCode.UNEXPECTED_TOKENS,
+ ParserErrorCode.INVALID_UNICODE_ESCAPE_U_NO_BRACKET,
+ ParserErrorCode.INVALID_UNICODE_ESCAPE_U_BRACKET,
+ ParserErrorCode.INVALID_UNICODE_ESCAPE_STARTED,
];
class ParserErrorCode extends ErrorCode {
@@ -1018,8 +1021,29 @@
"'this.namedConstructor())",
);
- static const ParserErrorCode INVALID_UNICODE_ESCAPE = ParserErrorCode(
- 'INVALID_UNICODE_ESCAPE',
+ static const ParserErrorCode INVALID_UNICODE_ESCAPE_STARTED = ParserErrorCode(
+ 'INVALID_UNICODE_ESCAPE_STARTED',
+ "The string '\\' can't stand alone.",
+ correctionMessage: "Try adding another backslash (\\) to escape the '\\'.",
+ );
+
+ static const ParserErrorCode INVALID_UNICODE_ESCAPE_U_BRACKET =
+ ParserErrorCode(
+ 'INVALID_UNICODE_ESCAPE_U_BRACKET',
+ "An escape sequence starting with '\\u{' must be followed by 1 to 6 "
+ "hexadecimal digits followed by a '}'.",
+ );
+
+ static const ParserErrorCode INVALID_UNICODE_ESCAPE_U_NO_BRACKET =
+ ParserErrorCode(
+ 'INVALID_UNICODE_ESCAPE_U_NO_BRACKET',
+ "An escape sequence starting with '\\u' must be followed by 4 hexadecimal "
+ "digits.",
+ );
+
+ static const ParserErrorCode INVALID_UNICODE_ESCAPE_U_STARTED =
+ ParserErrorCode(
+ 'INVALID_UNICODE_ESCAPE_U_STARTED',
"An escape sequence starting with '\\u' must be followed by 4 hexadecimal "
"digits or from 1 to 6 digits between '{' and '}'.",
);
diff --git a/pkg/analyzer/test/generated/error_parser_test.dart b/pkg/analyzer/test/generated/error_parser_test.dart
index 139bb79..a8779b3 100644
--- a/pkg/analyzer/test/generated/error_parser_test.dart
+++ b/pkg/analyzer/test/generated/error_parser_test.dart
@@ -1705,43 +1705,64 @@
void test_invalidUnicodeEscape_incomplete_noDigits() {
Expression expression = parseStringLiteral("'\\u{'");
expectNotNullIfNoErrors(expression);
- listener.assertErrors(
- [expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE, 1, 3)]);
+ listener.assertErrors([
+ expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE_U_BRACKET, 1, 3)
+ ]);
+ }
+
+ void test_invalidUnicodeEscape_incomplete_noDigits_noBracket() {
+ Expression expression = parseStringLiteral("'\\u'");
+ expectNotNullIfNoErrors(expression);
+ listener.assertErrors([
+ expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE_U_STARTED, 1, 2)
+ ]);
}
void test_invalidUnicodeEscape_incomplete_someDigits() {
Expression expression = parseStringLiteral("'\\u{0A'");
expectNotNullIfNoErrors(expression);
- listener.assertErrors(
- [expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE, 1, 5)]);
+ listener.assertErrors([
+ expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE_U_BRACKET, 1, 5)
+ ]);
}
void test_invalidUnicodeEscape_invalidDigit() {
Expression expression = parseStringLiteral("'\\u0 and some more'");
expectNotNullIfNoErrors(expression);
+ listener.assertErrors([
+ expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE_U_NO_BRACKET, 1, 3)
+ ]);
+ }
+
+ void test_invalidUnicodeEscape_too_high_number_variable() {
+ Expression expression = parseStringLiteral("'\\u{110000}'");
+ expectNotNullIfNoErrors(expression);
listener.assertErrors(
- [expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE, 1, 3)]);
+ [expectedError(ParserErrorCode.INVALID_CODE_POINT, 1, 9)]);
}
void test_invalidUnicodeEscape_tooFewDigits_fixed() {
Expression expression = parseStringLiteral("'\\u04'");
expectNotNullIfNoErrors(expression);
- listener.assertErrors(
- [expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE, 1, 4)]);
+ listener.assertErrors([
+ expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE_U_NO_BRACKET, 1, 4)
+ ]);
}
void test_invalidUnicodeEscape_tooFewDigits_variable() {
Expression expression = parseStringLiteral("'\\u{}'");
expectNotNullIfNoErrors(expression);
- listener.assertErrors(
- [expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE, 1, 4)]);
+ listener.assertErrors([
+ expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE_U_BRACKET, 1, 4)
+ ]);
}
void test_invalidUnicodeEscape_tooManyDigits_variable() {
- Expression expression = parseStringLiteral("'\\u{12345678}'");
+ Expression expression = parseStringLiteral("'\\u{0000000001}'");
expectNotNullIfNoErrors(expression);
- listener.assertErrors(
- [expectedError(ParserErrorCode.INVALID_CODE_POINT, 1, 9)]);
+ listener.assertErrors([
+ expectedError(ParserErrorCode.INVALID_UNICODE_ESCAPE_U_BRACKET, 1, 9)
+ ]);
}
void test_libraryDirectiveNotFirst() {
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 730af31..0fcd0f7 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -1308,16 +1308,40 @@
- "'\\x0'"
- "'\\x0y'"
-InvalidUnicodeEscape:
+InvalidUnicodeEscapeUStarted:
index: 38
problemMessage: "An escape sequence starting with '\\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'."
- analyzerCode: ParserErrorCode.INVALID_UNICODE_ESCAPE
+ analyzerCode: ParserErrorCode.INVALID_UNICODE_ESCAPE_U_STARTED
expression:
- "'\\u'"
+
+InvalidUnicodeEscapeUNoBracket:
+ index: 124
+ problemMessage: "An escape sequence starting with '\\u' must be followed by 4 hexadecimal digits."
+ analyzerCode: ParserErrorCode.INVALID_UNICODE_ESCAPE_U_NO_BRACKET
+ expression:
- "'\\u0F'"
+
+InvalidUnicodeEscapeUBracket:
+ index: 125
+ problemMessage: "An escape sequence starting with '\\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'."
+ analyzerCode: ParserErrorCode.INVALID_UNICODE_ESCAPE_U_BRACKET
+ expression:
- "'\\u{'"
- "'\\u{03'"
- "'\\u{0Z}'"
+ - "'\\u{0000003}'"
+
+InvalidEscapeStarted:
+ index: 126
+ problemMessage: "The string '\\' can't stand alone."
+ correctionMessage: "Try adding another backslash (\\) to escape the '\\'."
+ analyzerCode: ParserErrorCode.INVALID_UNICODE_ESCAPE_STARTED
+ exampleAllowMoreCodes: true
+ expression:
+ - |
+ print('Hello, World!\
+ ');
UnexpectedDollarInString:
problemMessage: "A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({})."
diff --git a/pkg/front_end/test/fasta/messages_suite.dart b/pkg/front_end/test/fasta/messages_suite.dart
index df8fbb5..6b0ae9a 100644
--- a/pkg/front_end/test/fasta/messages_suite.dart
+++ b/pkg/front_end/test/fasta/messages_suite.dart
@@ -844,8 +844,11 @@
}
return fail(
null,
- suite.formatProblems("Too many messages reported in ${example.name}:",
- example, messages));
+ suite.formatProblems(
+ "Too many or unexpected messages (${messages.length}) reported "
+ "in ${example.name}:",
+ example,
+ messages));
}
}
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index 0093dce..ac64436 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -22,6 +22,7 @@
acov
across
activated
+actively
adequate
adi
advantage
@@ -1363,6 +1364,7 @@
unconstrained
undeclare
undergo
+undermine
undo
undoable
unequal
diff --git a/pkg/front_end/test/spell_checking_list_messages.txt b/pkg/front_end/test/spell_checking_list_messages.txt
index 664608e..329dc17 100644
--- a/pkg/front_end/test/spell_checking_list_messages.txt
+++ b/pkg/front_end/test/spell_checking_list_messages.txt
@@ -50,6 +50,7 @@
loadlibrary
macro
migrate
+n
name.#name
name.stack
nameokempty
@@ -68,11 +69,13 @@
patch(es)
placing
pubspec.yaml
+r
re
sdksummary
size
solutions
stacktrace
+stand
staticinterop
stringokempty
struct<#name
@@ -80,6 +83,7 @@
super.namedconstructor
superinterface
supermixin
+t
team
this.namedconstructor
this.x
diff --git a/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.expect b/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.expect
index 749bace..5c448ec 100644
--- a/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.expect
+++ b/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.expect
@@ -2,7 +2,7 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/rasta/bad_unicode.dart:6:10: Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+// pkg/front_end/testcases/rasta/bad_unicode.dart:6:10: Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
// print("\u00"); // Bad Unicode escape, must have 4 hex digits.
// ^^^^
//
diff --git a/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.modular.expect b/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.modular.expect
index 749bace..5c448ec 100644
--- a/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.modular.expect
+++ b/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.modular.expect
@@ -2,7 +2,7 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/rasta/bad_unicode.dart:6:10: Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+// pkg/front_end/testcases/rasta/bad_unicode.dart:6:10: Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
// print("\u00"); // Bad Unicode escape, must have 4 hex digits.
// ^^^^
//
diff --git a/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.transformed.expect b/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.transformed.expect
index 749bace..5c448ec 100644
--- a/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/rasta/bad_unicode.dart.weak.transformed.expect
@@ -2,7 +2,7 @@
//
// Problems in library:
//
-// pkg/front_end/testcases/rasta/bad_unicode.dart:6:10: Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+// pkg/front_end/testcases/rasta/bad_unicode.dart:6:10: Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
// print("\u00"); // Bad Unicode escape, must have 4 hex digits.
// ^^^^
//
diff --git a/tests/language/string/escape4_test.dart b/tests/language/string/escape4_test.dart
index 6f4efba..0f2a6cb 100644
--- a/tests/language/string/escape4_test.dart
+++ b/tests/language/string/escape4_test.dart
@@ -9,23 +9,21 @@
// static error updater tool, so if you need to tweak the static error
// expectations in this test, you may need to do so manually.
print('Hello, World!\
+ // ^
+ // [cfe] Can't find ')' to match '('.
+ // ^
+ // [cfe] String starting with ' must end with '.
+ // ^
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_STARTED
+ // [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL
+ // [cfe] The string '\' can't stand alone.
');
-// [error line 11, column 8, length 1]
-// [cfe] Can't find ')' to match '('.
-// [error line 11, column 9, length 1]
-// [cfe] String starting with ' must end with '.
-// [error line 11, column 23, length 1]
-// [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE
-// [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
-// [error line 11, column 23, length 1]
-// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL
-// [error line 12, column 1, length 3]
+// [error column 1, length 3]
// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
// [cfe] Expected ';' after this.
-// [error line 12, column 1]
// [cfe] String starting with ' must end with '.
-// [error line 12, column 3, length 1]
+//^
// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL
}
-// [error line 29, column 1, length 1]
+// [error column 1, length 1]
// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language/string/unicode1_test.dart b/tests/language/string/unicode1_test.dart
index 04a9f5f..bf87c76 100644
--- a/tests/language/string/unicode1_test.dart
+++ b/tests/language/string/unicode1_test.dart
@@ -7,10 +7,10 @@
main() {
var str = "Foo\u00";
// ^^^^
- // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE
- // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_NO_BRACKET
+ // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
str = "Foo\uDEEMBar";
// ^^^^^
- // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE
- // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_NO_BRACKET
+ // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
}
diff --git a/tests/language/string/unicode2_test.dart b/tests/language/string/unicode2_test.dart
index 4624fbd..ace2a0f 100644
--- a/tests/language/string/unicode2_test.dart
+++ b/tests/language/string/unicode2_test.dart
@@ -7,11 +7,14 @@
main() {
var str = "Foo\u{}Bar";
// ^^^^
- // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE
- // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_BRACKET
+ // [cfe] An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'.
str = "Foo\u{000000000}Bar";
+ // ^^^^^^^^^
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_BRACKET
+ // [cfe] An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'.
str = "Foo\u{DEAF!}Bar";
// ^^^^^^^^
- // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE
- // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_BRACKET
+ // [cfe] An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'.
}
diff --git a/tests/language_2/string/escape4_test.dart b/tests/language_2/string/escape4_test.dart
index fb83da2..cfedc5d 100644
--- a/tests/language_2/string/escape4_test.dart
+++ b/tests/language_2/string/escape4_test.dart
@@ -11,23 +11,21 @@
// static error updater tool, so if you need to tweak the static error
// expectations in this test, you may need to do so manually.
print('Hello, World!\
+ // ^
+ // [cfe] Can't find ')' to match '('.
+ // ^
+ // [cfe] String starting with ' must end with '.
+ // ^
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_STARTED
+ // [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL
+ // [cfe] The string '\' can't stand alone.
');
-// [error line 13, column 8, length 1]
-// [cfe] Can't find ')' to match '('.
-// [error line 13, column 9, length 1]
-// [cfe] String starting with ' must end with '.
-// [error line 13, column 23, length 1]
-// [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE
-// [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
-// [error line 13, column 23, length 1]
-// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL
-// [error line 14, column 1, length 3]
+// [error column 1, length 3]
// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
// [cfe] Expected ';' after this.
-// [error line 14, column 1]
// [cfe] String starting with ' must end with '.
-// [error line 14, column 3, length 1]
+//^
// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL
}
-// [error line 31, column 1, length 1]
+// [error column 1, length 1]
// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
diff --git a/tests/language_2/string/unicode1_test.dart b/tests/language_2/string/unicode1_test.dart
index 58b39bd..7844330 100644
--- a/tests/language_2/string/unicode1_test.dart
+++ b/tests/language_2/string/unicode1_test.dart
@@ -9,10 +9,10 @@
main() {
var str = "Foo\u00";
// ^^^^
- // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE
- // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_NO_BRACKET
+ // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
str = "Foo\uDEEMBar";
// ^^^^^
- // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE
- // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_NO_BRACKET
+ // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
}
diff --git a/tests/language_2/string/unicode2_test.dart b/tests/language_2/string/unicode2_test.dart
index 042b642..6c2cb90 100644
--- a/tests/language_2/string/unicode2_test.dart
+++ b/tests/language_2/string/unicode2_test.dart
@@ -9,11 +9,14 @@
main() {
var str = "Foo\u{}Bar";
// ^^^^
- // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE
- // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_BRACKET
+ // [cfe] An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'.
str = "Foo\u{000000000}Bar";
+ // ^^^^^^^^^
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_BRACKET
+ // [cfe] An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'.
str = "Foo\u{DEAF!}Bar";
// ^^^^^^^^
- // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE
- // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.
+ // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_BRACKET
+ // [cfe] An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'.
}
diff --git a/tools/VERSION b/tools/VERSION
index fa720fe..780cc26 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 17
PATCH 0
-PRERELEASE 216
+PRERELEASE 217
PRERELEASE_PATCH 0
\ No newline at end of file