Version 2.18.0-132.0.dev
Merge commit '3bc3e9f1cabf5f5abec2417d6c605e0508379197' into 'dev'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b412795..ab41e51 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,8 +15,15 @@
#### Linter
-Updated the Linter to `1.23.0`, which includes changes that
+Updated the Linter to `1.24.0`, which includes changes that
+- fixes `prefer_final_parameters` to support super parameters.
+- adds new lint: `unnecessary_to_list_in_spreads`.
+- fixes `unawaited_futures` to handle string interpolated
+ futures.
+- updates `use_colored_box` to not flag nullable colors,
+- adds new lint:
+ `unnecessary_null_aware_operator_on_extension_on_nullable`.
- fixes `no_leading_underscores_for_local_identifiers`
to lint local function declarations.
- fixes `avoid_init_to_null` to correctly handle super
diff --git a/DEPS b/DEPS
index 793556f..5da3497 100644
--- a/DEPS
+++ b/DEPS
@@ -118,10 +118,10 @@
"http_parser_rev": "9126ee04e77fd8e4e2e6435b503ee4dd708d7ddc",
"http_rev": "2c9b418f5086f999c150d18172d2eec1f963de7b",
"icu_rev": "81d656878ec611cb0b42d52c82e9dae93920d9ba",
- "intl_rev": "9669926609e7efc17dfd74fbb44ec719a7e573cc",
+ "intl_rev": "9145f308f1458f37630a1ffce3b7d3b471ebbc56",
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
"json_rpc_2_rev": "7e00f893440a72de0637970325e4ea44bd1e8c8e",
- "linter_rev": "4305b933c8ed0275f26a99bd1ade39fe9130e6a5", # 1.23.0
+ "linter_rev": "a8529c6692922b45bc287543b355c90d7b1286d3", # 1.24.0
"lints_rev": "8294e5648ab49474541527e2911e72e4c5aefe55",
"logging_rev": "dfbe88b890c3b4f7bc06da5a7b3b43e9e263b688",
"markdown_rev": "7479783f0493f6717e1d7ae31cb37d39a91026b2",
@@ -135,7 +135,7 @@
"platform_rev": "1ffad63428bbd1b3ecaa15926bacfb724023648c",
"ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
"pool_rev": "c40cc32eabecb9d60f1045d1403108d968805f9a",
- "process_rev": "56ece43b53b64c63ae51ec184b76bd5360c28d0b",
+ "process_rev": "2546dfef7ba839b1514e0c9045344692eb47b771",
"protobuf_rev": "c1eb6cb51af39ccbaa1a8e19349546586a5c8e31",
"pub_rev": "51435efcd574b7bc18d47a5dd620cb9759dea8f8",
"pub_semver_rev": "ea6c54019948dc03042c595ce9413e17aaf7aa38",
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 4c4210b..2faa043 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
@@ -1842,6 +1842,8 @@
status: hasFix
LintCode.unnecessary_null_aware_assignments:
status: hasFix
+LintCode.unnecessary_null_aware_operator_on_extension_on_nullable:
+ status: needsEvaluation
LintCode.unnecessary_null_checks:
status: needsEvaluation
LintCode.unnecessary_null_in_if_null_operators:
@@ -1862,6 +1864,8 @@
status: hasFix
LintCode.unnecessary_this:
status: hasFix
+LintCode.unnecessary_to_list_in_spreads:
+ status: needsEvaluation
LintCode.unrelated_type_equality_checks:
status: needsEvaluation
LintCode.unsafe_html_attribute:
diff --git a/pkg/compiler/lib/src/js/rewrite_async.dart b/pkg/compiler/lib/src/js/rewrite_async.dart
index 82d1662..ecc0cd2 100644
--- a/pkg/compiler/lib/src/js/rewrite_async.dart
+++ b/pkg/compiler/lib/src/js/rewrite_async.dart
@@ -2852,11 +2852,11 @@
@override
bool visitTry(js.Try node) {
+ if (node.finallyPart != null) hasFinally = true;
bool body = visit(node.body);
bool catchPart = (node.catchPart == null) ? false : visit(node.catchPart);
bool finallyPart =
(node.finallyPart == null) ? false : visit(node.finallyPart);
- if (finallyPart != null) hasFinally = true;
return body || catchPart || finallyPart;
}
diff --git a/pkg/compiler/test/async_await/async_await_js_transform_test.dart b/pkg/compiler/test/async_await/async_await_js_transform_test.dart
index 5897259..a39226a 100644
--- a/pkg/compiler/test/async_await/async_await_js_transform_test.dart
+++ b/pkg/compiler/test/async_await/async_await_js_transform_test.dart
@@ -1222,7 +1222,7 @@
function(m) {
var __goto = 0,
__completer = NewCompleter(CompleterType),
- __handler = 1, __currentError, __next = [], exception, __exception;
+ __handler = 1, __currentError, exception, __exception;
var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
if (__errorCode === 1) {
__currentError = __result;
diff --git a/runtime/vm/app_snapshot.cc b/runtime/vm/app_snapshot.cc
index c718234..2b20b44 100644
--- a/runtime/vm/app_snapshot.cc
+++ b/runtime/vm/app_snapshot.cc
@@ -3828,6 +3828,12 @@
for (intptr_t i = 0; i < count; i++) {
InstancePtr instance = objects_[i];
AutoTraceObject(instance);
+#if defined(DART_PRECOMPILER)
+ if (FLAG_write_v8_snapshot_profile_to != nullptr) {
+ ClassPtr cls = s->isolate_group()->class_table()->At(cid_);
+ s->AttributePropertyRef(cls, "<class>");
+ }
+#endif
intptr_t offset = Instance::NextFieldOffset();
while (offset < next_field_offset) {
if (unboxed_fields_bitmap.Get(offset / kCompressedWordSize)) {
@@ -4084,6 +4090,13 @@
void WriteType(Serializer* s, TypePtr type) {
AutoTraceObject(type);
+#if defined(DART_PRECOMPILER)
+ if (FLAG_write_v8_snapshot_profile_to != nullptr) {
+ ClassPtr type_class =
+ s->isolate_group()->class_table()->At(type->untag()->type_class_id_);
+ s->AttributePropertyRef(type_class, "<type_class>");
+ }
+#endif
WriteFromTo(type);
COMPILE_ASSERT(
std::is_unsigned<decltype(UntaggedType::type_class_id_)>::value);
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index b5eb2c6..e9375c8 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -161,6 +161,14 @@
}
}
+ // Enum constuctors cannot be invoked by the user, so ignore them.
+ if (func.IsGenerativeConstructor()) {
+ Class& cls = Class::Handle(func.Owner());
+ if (cls.is_enum_class()) {
+ return true;
+ }
+ }
+
return false;
}
diff --git a/runtime/vm/source_report_test.cc b/runtime/vm/source_report_test.cc
index f445ff1..4e7a409 100644
--- a/runtime/vm/source_report_test.cc
+++ b/runtime/vm/source_report_test.cc
@@ -1075,6 +1075,7 @@
ISOLATE_UNIT_TEST_CASE(SourceReport_Coverage_IssueCov386_EnhancedEnums) {
// https://github.com/dart-lang/coverage/issues/386
+ // https://github.com/dart-lang/coverage/issues/377
// WARNING: This MUST be big enough for the serialised JSON string.
const int kBufferSize = 1024;
char buffer[kBufferSize];
@@ -1082,9 +1083,10 @@
"enum FoodType {\n"
" candy();\n"
" const FoodType();\n"
+ " factory FoodType.candyFactory() => candy;\n"
"}\n"
"void main() {\n"
- " final food = FoodType.candy;\n"
+ " final food = FoodType.candyFactory();\n"
"}\n";
Library& lib = Library::Handle();
@@ -1103,19 +1105,14 @@
EXPECT_STREQ(
"{\"type\":\"SourceReport\",\"ranges\":["
- // There are two ranges at the FoodType constructor. This one is missed,
- // but the one below is hit, so it's ok. The point is that the synthetic
- // toString method doesn't appear in this hitmap.
- "{\"scriptIndex\":0,\"startPos\":29,\"endPos\":45,\"compiled\":true,"
- "\"coverage\":{\"hits\":[],\"misses\":[29]}},"
-
// Main is hit.
- "{\"scriptIndex\":0,\"startPos\":49,\"endPos\":94,\"compiled\":true,"
+ "{\"scriptIndex\":0,\"startPos\":49,\"endPos\":89,\"compiled\":true,"
"\"coverage\":{\"hits\":[49],\"misses\":[]}},"
- // FoodType constructor is hit.
- "{\"scriptIndex\":0,\"compiled\":true,\"startPos\":29,\"endPos\":45,"
- "\"coverage\":{\"hits\":[29],\"misses\":[]}}],"
+ // The enum's constructor, and toString, are not included in the hitmap,
+ // but the factory is included.
+ "{\"scriptIndex\":0,\"startPos\":93,\"endPos\":147,\"compiled\":true,"
+ "\"coverage\":{\"hits\":[93,131],\"misses\":[]}}],"
// Only one script in the script table.
"\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
diff --git a/tools/VERSION b/tools/VERSION
index 557f70e..21952de 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 18
PATCH 0
-PRERELEASE 131
+PRERELEASE 132
PRERELEASE_PATCH 0
\ No newline at end of file