Version 2.12.0-9.0.dev
Merge commit '98ba51c48e952f850541547fb4393b879d31e406' into 'dev'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4336a2e..9774dfa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -41,8 +41,19 @@
#### Linter
-Updated the Linter to `0.1.121`, which includes:
+Updated the Linter to `0.1.122`, which includes:
+* A fixed NPE in `unnecessary_null_checks`.
+* A fixed NPE in `missing_whitespace_between_adjacent_strings`.
+* Updates to `void_checks` for NNBD.
+* A fixed range error in `unnecessary_string_escapes`.
+* A fixed false positives in `unnecessary_null_types`.
+* Fixes to `prefer_constructors_over_static_methods` to respect type parameters.
+* Updates to `always_require_non_null_named_parameters` to be NNBD-aware.
+* Updates tp `unnecessary_nullable_for_final_variable_declarations` to allow dynamic.
+* Updates `overridden_fields` to not report on abstract parent fields.
+* Fixes to `unrelated_type_equality_checks` for NNBD.
+* Improvements to `type_init_formals`to allow types not equal to the field type.
* Performance improvements to `always_use_package_imports`,
`avoid_renaming_method_parameters`, `prefer_relative_imports` and
`public_member_api_docs`.
diff --git a/DEPS b/DEPS
index 610a69f..7735b47 100644
--- a/DEPS
+++ b/DEPS
@@ -117,7 +117,7 @@
"intl_tag": "0.17.0-nullsafety",
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
"json_rpc_2_rev": "8f189db8f0c299187a0e8fa959dba7e9b0254be5",
- "linter_tag": "0.1.121",
+ "linter_tag": "0.1.122",
"logging_rev": "9d2a7fdd05b09bc06474881152b5baaf38fd1329",
"markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
"markdown_rev": "6f89681d59541ddb1cf3a58efbdaa2304ffc3f51",
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index ba0c30b..17fee72 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -1494,7 +1494,7 @@
Element prevElement = _exportedElements[name];
if (element != null && prevElement != null && prevElement != element) {
_errorReporter.reportErrorForNode(
- CompileTimeErrorCode.AMBIGUOUS_EXPORT, directive, [
+ CompileTimeErrorCode.AMBIGUOUS_EXPORT, directive.uri, [
name,
prevElement.library.definingCompilationUnit.source.uri,
element.library.definingCompilationUnit.source.uri
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index fa3349b..7db1cf7 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -258,14 +258,16 @@
final init = node.initializers;
for (int i = 0, last = init.length - 1; i < last; i++) {
- final node = init[i];
- if (node is SuperConstructorInvocation) {
+ final initializer = init[i];
+ if (initializer is SuperConstructorInvocation) {
// TODO(srawlins): Don't report this when
// [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR] or
// [CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS] is reported for
// this constructor.
- _recordMessage(
- node, CompileTimeErrorCode.INVALID_SUPER_INVOCATION, [node]);
+ var source = (node.root as CompilationUnit).declaredElement.source;
+ var token = initializer.superKeyword;
+ reporter.onError(AnalysisError(source, token.offset, token.length,
+ CompileTimeErrorCode.INVALID_SUPER_INVOCATION, [initializer]));
}
}
}
@@ -927,6 +929,8 @@
}
void _recordMessage(AstNode node, ErrorCode errorCode, List arguments) {
+ // TODO(brianwilkerson) Convert this class to use an ErrorReporter so that
+ // the logic for converting types is in one place.
arguments = arguments.map((argument) {
if (argument is DartType) {
return argument.getDisplayString(withNullability: false);
diff --git a/pkg/analyzer/test/src/diagnostics/ambiguous_export_test.dart b/pkg/analyzer/test/src/diagnostics/ambiguous_export_test.dart
index 17142d7..b22efa2 100644
--- a/pkg/analyzer/test/src/diagnostics/ambiguous_export_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/ambiguous_export_test.dart
@@ -26,7 +26,7 @@
export 'lib1.dart';
export 'lib2.dart';
''', [
- error(CompileTimeErrorCode.AMBIGUOUS_EXPORT, 20, 19),
+ error(CompileTimeErrorCode.AMBIGUOUS_EXPORT, 27, 11),
]);
}
@@ -41,7 +41,7 @@
export 'lib1.dart';
export 'lib2.dart';
''', [
- error(CompileTimeErrorCode.AMBIGUOUS_EXPORT, 20, 19),
+ error(CompileTimeErrorCode.AMBIGUOUS_EXPORT, 27, 11),
]);
}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_super_invocation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_super_invocation_test.dart
index bf48fa1..68f2839 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_super_invocation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_super_invocation_test.dart
@@ -21,7 +21,7 @@
A(int x) : super(), assert(x != null);
}
''', [
- error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 23, 7),
+ error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 23, 5),
]);
}
@@ -32,7 +32,7 @@
A() : super(), x = 1;
}
''', [
- error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 33, 7),
+ error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 33, 5),
]);
}
}
diff --git a/pkg/analyzer/test/src/diagnostics/multiple_super_initializers_test.dart b/pkg/analyzer/test/src/diagnostics/multiple_super_initializers_test.dart
index dea4b59..8147f29 100644
--- a/pkg/analyzer/test/src/diagnostics/multiple_super_initializers_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/multiple_super_initializers_test.dart
@@ -22,7 +22,7 @@
B() : super(), super() {}
}
''', [
- error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 39, 7),
+ error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 39, 5),
error(CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS, 48, 7),
]);
}
diff --git a/pkg/analyzer/test/src/diagnostics/super_in_redirecting_constructor_test.dart b/pkg/analyzer/test/src/diagnostics/super_in_redirecting_constructor_test.dart
index cbd6cdd..9fafaa1 100644
--- a/pkg/analyzer/test/src/diagnostics/super_in_redirecting_constructor_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/super_in_redirecting_constructor_test.dart
@@ -33,7 +33,7 @@
A.name() {}
}
''', [
- error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 18, 7),
+ error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 18, 5),
error(CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR, 18, 7),
]);
}
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index b71fb4b..c8fda9d 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -4522,7 +4522,7 @@
main() => new Derived();
''', [
- error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 170, 7),
+ error(CompileTimeErrorCode.INVALID_SUPER_INVOCATION, 170, 5),
]);
}
diff --git a/tests/language/variable/initializer_super_last_test.dart b/tests/language/variable/initializer_super_last_test.dart
index 5a96d03..7e2b0b8 100644
--- a/tests/language/variable/initializer_super_last_test.dart
+++ b/tests/language/variable/initializer_super_last_test.dart
@@ -39,7 +39,7 @@
C.cc09(int x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x;
//^
@@ -47,7 +47,7 @@
C.cc10(int x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x;
//^
@@ -55,7 +55,7 @@
C.cc11(this.x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -63,7 +63,7 @@
C.cc12(this.x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -71,7 +71,7 @@
C.cc13(int x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x,
//^
@@ -82,7 +82,7 @@
C.cc14(int x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x,
//^
@@ -93,7 +93,7 @@
C.cc15(int x)
: x = x,
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -101,7 +101,7 @@
C.cc16(int x)
: x = x,
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -132,7 +132,7 @@
const C.cc25(int x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x;
//^
@@ -140,7 +140,7 @@
const C.cc26(int x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x;
//^
@@ -148,7 +148,7 @@
const C.cc27(this.x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -156,7 +156,7 @@
const C.cc28(this.x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -164,7 +164,7 @@
const C.cc29(int x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x,
//^
@@ -175,7 +175,7 @@
const C.cc30(int x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x,
//^
@@ -186,7 +186,7 @@
const C.cc31(int x)
: x = x,
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -194,7 +194,7 @@
const C.cc32(int x)
: x = x,
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
diff --git a/tests/language_2/variable/initializer_super_last_test.dart b/tests/language_2/variable/initializer_super_last_test.dart
index 5a96d03..7e2b0b8 100644
--- a/tests/language_2/variable/initializer_super_last_test.dart
+++ b/tests/language_2/variable/initializer_super_last_test.dart
@@ -39,7 +39,7 @@
C.cc09(int x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x;
//^
@@ -47,7 +47,7 @@
C.cc10(int x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x;
//^
@@ -55,7 +55,7 @@
C.cc11(this.x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -63,7 +63,7 @@
C.cc12(this.x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -71,7 +71,7 @@
C.cc13(int x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x,
//^
@@ -82,7 +82,7 @@
C.cc14(int x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x,
//^
@@ -93,7 +93,7 @@
C.cc15(int x)
: x = x,
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -101,7 +101,7 @@
C.cc16(int x)
: x = x,
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -132,7 +132,7 @@
const C.cc25(int x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x;
//^
@@ -140,7 +140,7 @@
const C.cc26(int x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x;
//^
@@ -148,7 +148,7 @@
const C.cc27(this.x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -156,7 +156,7 @@
const C.cc28(this.x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -164,7 +164,7 @@
const C.cc29(int x)
: //
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x,
//^
@@ -175,7 +175,7 @@
const C.cc30(int x)
: //
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
x = x,
//^
@@ -186,7 +186,7 @@
const C.cc31(int x)
: x = x,
super(),
-// ^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
@@ -194,7 +194,7 @@
const C.cc32(int x)
: x = x,
super.named(),
-// ^^^^^^^^^^^^^
+// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_SUPER_INVOCATION
assert(x == x);
// ^
diff --git a/tools/VERSION b/tools/VERSION
index 072fa48..bbf4b49 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 12
PATCH 0
-PRERELEASE 8
+PRERELEASE 9
PRERELEASE_PATCH 0
\ No newline at end of file