Version 2.13.0-34.0.dev
Merge commit 'e0fd546dc3f2006abe7b2403a820f40171c7c38b' into 'dev'
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 b372ad4..c8e1eff 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -9665,15 +9665,13 @@
r"""Try removing the keyword 'var', or replacing it with the name of the return type.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<
- Message Function(
- String
- name)> templateVariableCouldBeNullDueToWrite = const Template<
- Message Function(String name)>(
- messageTemplate:
- r"""Variable '#name' could be null due to a write occurring here.""",
- tipTemplate: r"""Try null checking the variable after the write.""",
- withArguments: _withArgumentsVariableCouldBeNullDueToWrite);
+const Template<Message Function(String name)>
+ templateVariableCouldBeNullDueToWrite =
+ const Template<Message Function(String name)>(
+ messageTemplate:
+ r"""Variable '#name' could be null due to an intervening write.""",
+ tipTemplate: r"""Try null checking the variable after the write.""",
+ withArguments: _withArgumentsVariableCouldBeNullDueToWrite);
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Message Function(String name)> codeVariableCouldBeNullDueToWrite =
@@ -9687,7 +9685,7 @@
name = demangleMixinApplicationName(name);
return new Message(codeVariableCouldBeNullDueToWrite,
message:
- """Variable '${name}' could be null due to a write occurring here.""",
+ """Variable '${name}' could be null due to an intervening write.""",
tip: """Try null checking the variable after the write.""",
arguments: {'name': name});
}
diff --git a/pkg/analysis_server/lib/src/analysis_server_abstract.dart b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
index d96b0c4..a5744ac 100644
--- a/pkg/analysis_server/lib/src/analysis_server_abstract.dart
+++ b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
@@ -112,6 +112,7 @@
final List<String> analyzableFilePatterns = <String>[
'**/*.${AnalysisEngine.SUFFIX_DART}',
'**/${AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE}',
+ '**/${AnalysisEngine.FIX_DATA_FILE}',
'**/${AnalysisEngine.PUBSPEC_YAML_FILE}',
'**/${AnalysisEngine.ANDROID_MANIFEST_FILE}'
];
diff --git a/pkg/analysis_server/lib/src/cider/fixes.dart b/pkg/analysis_server/lib/src/cider/fixes.dart
index d0ca2c8..3f3f087 100644
--- a/pkg/analysis_server/lib/src/cider/fixes.dart
+++ b/pkg/analysis_server/lib/src/cider/fixes.dart
@@ -8,6 +8,7 @@
import 'package:analysis_server/src/services/correction/fix_internal.dart';
import 'package:analyzer/error/error.dart';
import 'package:analyzer/instrumentation/service.dart';
+import 'package:analyzer/source/line_info.dart';
import 'package:analyzer/src/dart/analysis/performance_logger.dart';
import 'package:analyzer/src/dart/micro/resolve_file.dart';
import 'package:meta/meta.dart';
@@ -18,9 +19,12 @@
/// The fixes for the [error], might be empty.
final List<Fix> fixes;
+ final LineInfo lineInfo;
+
CiderErrorFixes({
@required this.error,
@required this.fixes,
+ @required this.lineInfo,
});
}
@@ -54,7 +58,7 @@
fixes.sort(Fix.SORT_BY_RELEVANCE);
result.add(
- CiderErrorFixes(error: error, fixes: fixes),
+ CiderErrorFixes(error: error, fixes: fixes, lineInfo: lineInfo),
);
}
}
diff --git a/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart
index 65bef9a..d6204de 100644
--- a/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart
@@ -392,8 +392,8 @@
String variableName, Expression writeExpression) {
return DiagnosticMessageImpl(
filePath: source.fullName,
- message:
- "Variable '$variableName' could be null due to a write occurring here.",
+ message: "Variable '$variableName' could be null due to an intervening "
+ "write.",
offset: writeExpression.offset,
length: writeExpression.length);
}
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 6f2cf9d..6536e46 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -15,6 +15,7 @@
defineReflectiveSuite(() {
defineReflectiveTests(NonConstantValueInInitializer);
defineReflectiveTests(NonErrorResolverTest);
+ defineReflectiveTests(NonErrorResolverWithoutNullSafetyTest);
});
}
@@ -54,9 +55,92 @@
@reflectiveTest
class NonErrorResolverTest extends PubPackageResolutionTest
- with WithoutNullSafetyMixin {
- // TODO(https://github.com/dart-lang/sdk/issues/44666): Use null safety in
- // test cases.
+ with NonErrorResolverTestCases {
+ test_await_flattened() async {
+ await assertNoErrorsInCode('''
+Future<Future<int>>? ffi() => null;
+f() async {
+ Future<int>? b = await ffi();
+ b;
+}
+''');
+ }
+
+ test_conflictingStaticGetterAndInstanceSetter_thisClass() async {
+ await assertErrorsInCode(r'''
+class A {
+ static get x => 0;
+ static set x(int p) {}
+}
+''', [
+ error(CompileTimeErrorCode.GETTER_NOT_SUBTYPE_SETTER_TYPES, 23, 1),
+ ]);
+ }
+
+ test_const_constructor_with_named_generic_parameter() async {
+ await assertNoErrorsInCode('''
+class C<T> {
+ const C({required T t});
+}
+const c = const C(t: 1);
+''');
+ }
+
+ test_inconsistentMethodInheritance_accessors_typeParameters1() async {
+ await assertNoErrorsInCode(r'''
+abstract class A<E> {
+ E? get x;
+}
+abstract class B<E> {
+ E? get x;
+}
+class C<E> implements A<E>, B<E> {
+ E? get x => null;
+}
+''');
+ }
+
+ test_inconsistentMethodInheritance_accessors_typeParameters2() async {
+ await assertNoErrorsInCode(r'''
+abstract class A<E> {
+ E? get x {return null;}
+}
+class B<E> {
+ E? get x {return null;}
+}
+class C<E> extends A<E> implements B<E> {}
+''');
+ }
+
+ test_inconsistentMethodInheritance_accessors_typeParameters_diamond() async {
+ await assertNoErrorsInCode(r'''
+abstract class F<E> extends B<E> {}
+class D<E> extends F<E> {
+ external E? get g;
+}
+abstract class C<E> {
+ E? get g;
+}
+abstract class B<E> implements C<E> {
+ E? get g { return null; }
+}
+class A<E> extends B<E> implements D<E> {
+}
+''');
+ }
+
+ test_typedef_not_function() async {
+ newFile('$testPackageLibPath/a.dart', content: '''
+typedef F = int;
+''');
+ await assertNoErrorsInCode('''
+import 'a.dart';
+F f = 0;
+''');
+ }
+}
+
+mixin NonErrorResolverTestCases on PubPackageResolutionTest {
test_ambiguousExport() async {
newFile("$testPackageLibPath/lib1.dart", content: r'''
library lib1;
@@ -258,13 +342,16 @@
class MaterialPageRoute {
final Widget Function() builder;
- const MaterialPageRoute({this.builder});
+ const MaterialPageRoute({this.builder = f});
}
+Widget f() => Widget();
+
void main() {
- print(MaterialPageRoute(
- builder: () { return Widget(); }
- ));
+ MaterialPageRoute(builder: () {
+ return Widget();
+ },
+ );
}
''');
}
@@ -272,7 +359,7 @@
test_argumentTypeNotAssignable_typedef_local() async {
await assertNoErrorsInCode(r'''
typedef A(int p1, String p2);
-A getA() => null;
+A getA() => (int p1, String p2) {};
f() {
A a = getA();
a(1, '2');
@@ -294,7 +381,7 @@
f() async {
assert(false, await g());
}
-Future<String> g() => null;
+Future<String> g() => Future.value('');
''');
}
@@ -344,32 +431,30 @@
// In the code below, the type of (() => f()) has a return type which is
// a class, and that class is inferred from the return type of the typedef
// F.
- await assertErrorsInCode('''
+ await assertNoErrorsInCode('''
class C {}
typedef C F();
-F f;
+F f = () => C();
main() {
F f2 = (() => f());
+ f2;
}
-''', [
- error(HintCode.UNUSED_LOCAL_VARIABLE, 44, 2),
- ]);
+''');
}
test_assignability_function_expr_rettype_from_typedef_typedef() async {
// In the code below, the type of (() => f()) has a return type which is
// a typedef, and that typedef is inferred from the return type of the
// typedef F.
- await assertErrorsInCode('''
+ await assertNoErrorsInCode('''
typedef G F();
typedef G();
-F f;
+F f = () => () => {};
main() {
F f2 = (() => f());
+ f2;
}
-''', [
- error(HintCode.UNUSED_LOCAL_VARIABLE, 46, 2),
- ]);
+''');
}
test_assignmentToFinal_prefixNegate() async {
@@ -403,7 +488,7 @@
set x(v) {}
}
class B {
- static A a;
+ static A a = A();
}
main() {
B.a.x = 0;
@@ -465,7 +550,7 @@
Future<int> futureInt = createFutureInt();
futureInt.then((int i) => print(i));
}
-Future<int> f() => null;
+Future<int> f() => Future.value(0);
''');
}
@@ -595,26 +680,14 @@
]);
}
- test_await_flattened() async {
- await assertErrorsInCode('''
-Future<Future<int>> ffi() => null;
-f() async {
- Future<int> b = await ffi();
-}
-''', [
- error(HintCode.UNUSED_LOCAL_VARIABLE, 61, 1),
- ]);
- }
-
test_await_simple() async {
- await assertErrorsInCode('''
-Future<int> fi() => null;
+ await assertNoErrorsInCode('''
+Future<int> fi() => Future.value(0);
f() async {
int a = await fi();
+ a;
}
-''', [
- error(HintCode.UNUSED_LOCAL_VARIABLE, 44, 1),
- ]);
+''');
}
test_awaitInWrongContext_async() async {
@@ -649,7 +722,7 @@
test_bug_24539_getter() async {
await assertNoErrorsInCode('''
class C<T> {
- List<Foo> get x => null;
+ List<Foo> get x => [];
}
typedef Foo(param);
@@ -729,24 +802,6 @@
''');
}
- test_conflictingStaticGetterAndInstanceSetter_thisClass() async {
- await assertNoErrorsInCode(r'''
-class A {
- static get x => 0;
- static set x(int p) {}
-}
-''');
- }
-
- test_const_constructor_with_named_generic_parameter() async {
- await assertNoErrorsInCode('''
-class C<T> {
- const C({T t});
-}
-const c = const C(t: 1);
-''');
- }
-
test_const_dynamic() async {
await assertNoErrorsInCode('''
const Type d = dynamic;
@@ -820,7 +875,7 @@
test_constConstructorWithNonFinalField_static() async {
await assertNoErrorsInCode(r'''
class A {
- static int x;
+ static int x = 0;
const A();
}
''');
@@ -908,10 +963,6 @@
const B.c3(String p) : v = p == 0;
const B.c4(String p) : v = p == 0.0;
const B.c5(String p) : v = p == '';
- const B.n1(num p) : v = p == null;
- const B.n2(num p) : v = null == p;
- const B.n3(Object p) : v = p == null;
- const B.n4(Object p) : v = null == p;
}
''');
}
@@ -935,10 +986,6 @@
const B.c3(String p) : v = p != 0;
const B.c4(String p) : v = p != 0.0;
const B.c5(String p) : v = p != '';
- const B.n1(num p) : v = p != null;
- const B.n2(num p) : v = null != p;
- const B.n3(Object p) : v = p != null;
- const B.n4(Object p) : v = null != p;
}
''');
}
@@ -1119,7 +1166,7 @@
test_extraPositionalArguments_typedef_local() async {
await assertNoErrorsInCode(r'''
typedef A(p1, p2);
-A getA() => null;
+A getA() => (p1, p2) {};
f() {
A a = getA();
a(1, 2);
@@ -1141,8 +1188,9 @@
class C {
final Function field;
- C({String this.field(int value)});
+ C({String this.field(int value) = f});
}
+String f(int value) => '';
''');
}
@@ -1161,8 +1209,9 @@
class C {
final Object Function(int, double) field;
- C({String Function(num, Object) this.field});
+ C({String Function(num, Object) this.field = f});
}
+String f(num a, Object b) => '';
''');
}
@@ -1196,8 +1245,8 @@
test_fieldInitializerOutsideConstructor_defaultParameters() async {
await assertNoErrorsInCode(r'''
class A {
- int x;
- A([this.x]) {}
+ int x = 0;
+ A([this.x = 1]) {}
}
''');
}
@@ -1424,7 +1473,7 @@
}
class A {
- Foo f;
+ Foo f = <T>(T x) => 0;
void test() {
f<String>("hello");
}
@@ -1442,7 +1491,7 @@
}
class A {
- Foo<int> f;
+ Foo<int> f = <T>(T x) => 0;
void test() {
f<String>("hello");
}
@@ -1460,7 +1509,7 @@
}
class A {
- Foo f;
+ Foo f = <T>(T x) {};
void test() {
f<String>("hello");
}
@@ -1468,18 +1517,6 @@
''');
}
- test_genericTypeAlias_invalidGenericFunctionType() async {
- // There is a parse error, but no crashes.
- await assertErrorsInCode('''
-typedef F = int;
-main(p) {
- p is F;
-}
-''', [
- error(ParserErrorCode.INVALID_GENERIC_FUNCTION_TYPE, 10, 1),
- ]);
- }
-
test_genericTypeAlias_noTypeParameters() async {
await assertNoErrorsInCode(r'''
typedef Foo = int Function<T>(T x);
@@ -1541,7 +1578,7 @@
await assertNoErrorsInCode(r'''
library lib;
import 'part.dart';
-A a;
+A a = A();
''');
}
@@ -1552,7 +1589,7 @@
await assertNoErrorsInCode(r'''
library lib;
import 'part.dart';
-A a;
+A a = A();
''');
}
@@ -1576,49 +1613,6 @@
''');
}
- test_inconsistentMethodInheritance_accessors_typeParameter2() async {
- await assertNoErrorsInCode(r'''
-abstract class A<E> {
- E get x {return null;}
-}
-class B<E> {
- E get x {return null;}
-}
-class C<E> extends A<E> implements B<E> {}
-''');
- }
-
- test_inconsistentMethodInheritance_accessors_typeParameters1() async {
- await assertNoErrorsInCode(r'''
-abstract class A<E> {
- E get x;
-}
-abstract class B<E> {
- E get x;
-}
-class C<E> implements A<E>, B<E> {
- E get x => null;
-}
-''');
- }
-
- test_inconsistentMethodInheritance_accessors_typeParameters_diamond() async {
- await assertNoErrorsInCode(r'''
-abstract class F<E> extends B<E> {}
-class D<E> extends F<E> {
- external E get g;
-}
-abstract class C<E> {
- E get g;
-}
-abstract class B<E> implements C<E> {
- E get g { return null; }
-}
-class A<E> extends B<E> implements D<E> {
-}
-''');
- }
-
test_inconsistentMethodInheritance_methods_typeParameter2() async {
await assertNoErrorsInCode(r'''
class A<E> {
@@ -1966,10 +1960,10 @@
test_invalidMethodOverrideNamedParamType() async {
await assertNoErrorsInCode(r'''
class A {
- m({int a}) {}
+ m({int a = 1}) {}
}
class B implements A {
- m({int a, int b}) {}
+ m({int a = 1, int b = 2}) {}
}
''');
}
@@ -2376,23 +2370,22 @@
}
test_mixinInference_with_actual_mixins() async {
- await assertErrorsInCode('''
+ await assertNoErrorsInCode('''
class I<X> {}
mixin M0<T> on I<T> {}
mixin M1<T> on I<T> {
- T foo() => null;
+ T foo(T a) => a;
}
class A = I<int> with M0, M1;
void main () {
- var x = new A().foo();
+ var x = new A().foo(0);
+ x;
}
-''', [
- error(HintCode.UNUSED_LOCAL_VARIABLE, 135, 1),
- ]);
+''');
var main = result.unit!.declarations.last as FunctionDeclaration;
var mainBody = main.functionExpression.body as BlockFunctionBody;
var xDecl = mainBody.block.statements[0] as VariableDeclarationStatement;
@@ -2927,11 +2920,11 @@
await assertNoErrorsInCode(r'''
f() {
var c = new C();
- c<String>().codeUnits;
+ c<String>('').codeUnits;
}
class C {
- T call<T>() => null;
+ T call<T>(T a) => a;
}
''');
}
@@ -3000,7 +2993,7 @@
test_regress34906() async {
await assertNoErrorsInCode(r'''
typedef G<X, Y extends Function(X)> = X Function(Function(Y));
-G<dynamic, Function(Null)> superBoundedG;
+f(G<dynamic, Function(Null)> superBoundedG) {}
''');
}
@@ -3039,16 +3032,6 @@
''');
}
- test_typedef_not_function() async {
- newFile('$testPackageLibPath/a.dart', content: '''
-typedef F = int;
-''');
- await assertNoErrorsInCode('''
-import 'a.dart';
-F f;
-''');
- }
-
test_typePromotion_booleanAnd_useInRight() async {
await assertNoErrorsInCode(r'''
main(Object p) {
@@ -3066,20 +3049,6 @@
''');
}
- test_typePromotion_conditional_issue14655() async {
- await assertNoErrorsInCode(r'''
-class A {}
-class B extends A {}
-class C extends B {
- mc() {}
-}
-print(_) {}
-main(A p) {
- (p is C) && (print(() => p) && (p is B)) ? p.mc() : p = null;
-}
-''');
- }
-
test_typePromotion_conditional_useInThen() async {
await assertNoErrorsInCode(r'''
main(Object p) {
@@ -3096,50 +3065,6 @@
''');
}
- test_typePromotion_functionType_arg_ignoreIfNotMoreSpecific() async {
- await assertNoErrorsInCode(r'''
-typedef FuncB(B b);
-typedef FuncA(A a);
-class A {}
-class B {}
-main(FuncA f) {
- if (f is FuncB) {
- f(new A());
- }
-}
-''');
- }
-
- test_typePromotion_functionType_return_ignoreIfNotMoreSpecific() async {
- await assertErrorsInCode(r'''
-class A {}
-typedef FuncAtoDyn(A a);
-typedef FuncDynToDyn(x);
-main(FuncAtoDyn f) {
- if (f is FuncDynToDyn) {
- A a = f(new A());
- }
-}
-''', [
- error(HintCode.UNUSED_LOCAL_VARIABLE, 115, 1),
- ]);
- }
-
- test_typePromotion_functionType_return_voidToDynamic() async {
- await assertErrorsInCode(r'''
-typedef FuncDynToDyn(x);
-typedef void FuncDynToVoid(x);
-class A {}
-main(FuncDynToVoid f) {
- if (f is FuncDynToDyn) {
- A a = f(null);
- }
-}
-''', [
- error(HintCode.UNUSED_LOCAL_VARIABLE, 124, 1),
- ]);
- }
-
test_typePromotion_if_accessedInClosure_noAssignment() async {
await assertNoErrorsInCode(r'''
callMe(f()) { f(); }
@@ -3153,23 +3078,6 @@
''');
}
- test_typePromotion_if_extends_moreSpecific() async {
- await assertNoErrorsInCode(r'''
-class V {}
-class VP extends V {}
-class A<T> {}
-class B<S> extends A<S> {
- var b;
-}
-
-main(A<V> p) {
- if (p is B<VP>) {
- p.b;
- }
-}
-''');
- }
-
test_typePromotion_if_hasAssignment_outsideAfter() async {
await assertNoErrorsInCode(r'''
main(Object p) {
@@ -3191,23 +3099,6 @@
}''');
}
- test_typePromotion_if_implements_moreSpecific() async {
- await assertNoErrorsInCode(r'''
-class V {}
-class VP extends V {}
-class A<T> {}
-class B<S> implements A<S> {
- var b;
-}
-
-main(A<V> p) {
- if (p is B<VP>) {
- p.b;
- }
-}
-''');
- }
-
test_typePromotion_if_inClosure_assignedAfter_inSameFunction() async {
await assertErrorsInCode(r'''
main() {
@@ -3373,3 +3264,144 @@
''');
}
}
+
+@reflectiveTest
+class NonErrorResolverWithoutNullSafetyTest extends PubPackageResolutionTest
+ with WithoutNullSafetyMixin, NonErrorResolverTestCases {
+ test_conflictingStaticGetterAndInstanceSetter_thisClass() async {
+ await assertNoErrorsInCode(r'''
+class A {
+ static get x => 0;
+ static set x(int p) {}
+}
+''');
+ }
+
+ test_constEvalTypeBoolNumString_equal_null() async {
+ await assertNoErrorsInCode(r'''
+class B {
+ final v;
+ const B.n1(num p) : v = p == null;
+ const B.n2(num p) : v = null == p;
+ const B.n3(Object p) : v = p == null;
+ const B.n4(Object p) : v = null == p;
+}
+''');
+ }
+
+ test_constEvalTypeBoolNumString_notEqual_null() async {
+ await assertNoErrorsInCode('''
+class B {
+ final v;
+ const B.n1(num p) : v = p != null;
+ const B.n2(num p) : v = null != p;
+ const B.n3(Object p) : v = p != null;
+ const B.n4(Object p) : v = null != p;
+}
+''');
+ }
+
+ test_genericTypeAlias_invalidGenericFunctionType() async {
+ // There is a parse error, but no crashes.
+ await assertErrorsInCode('''
+typedef F = int;
+main(p) {
+ p is F;
+}
+''', [
+ error(ParserErrorCode.INVALID_GENERIC_FUNCTION_TYPE, 10, 1),
+ ]);
+ }
+
+ test_typePromotion_conditional_issue14655() async {
+ await assertNoErrorsInCode(r'''
+class A {}
+class B extends A {}
+class C extends B {
+ mc() {}
+}
+print(_) {}
+main(A p) {
+ (p is C) && (print(() => p) && (p is B)) ? p.mc() : p = null;
+}
+''');
+ }
+
+ test_typePromotion_functionType_arg_ignoreIfNotMoreSpecific() async {
+ await assertNoErrorsInCode(r'''
+typedef FuncB(B b);
+typedef FuncA(A a);
+class A {}
+class B {}
+main(FuncA f) {
+ if (f is FuncB) {
+ f(new A());
+ }
+}
+''');
+ }
+
+ test_typePromotion_functionType_return_ignoreIfNotMoreSpecific() async {
+ await assertErrorsInCode(r'''
+class A {}
+typedef FuncAtoDyn(A a);
+typedef FuncDynToDyn(x);
+main(FuncAtoDyn f) {
+ if (f is FuncDynToDyn) {
+ A a = f(new A());
+ }
+}
+''', [
+ error(HintCode.UNUSED_LOCAL_VARIABLE, 115, 1),
+ ]);
+ }
+
+ test_typePromotion_functionType_return_voidToDynamic() async {
+ await assertErrorsInCode(r'''
+typedef FuncDynToDyn(x);
+typedef void FuncDynToVoid(x);
+class A {}
+main(FuncDynToVoid f) {
+ if (f is FuncDynToDyn) {
+ A a = f(null);
+ }
+}
+''', [
+ error(HintCode.UNUSED_LOCAL_VARIABLE, 124, 1),
+ ]);
+ }
+
+ test_typePromotion_if_extends_moreSpecific() async {
+ await assertNoErrorsInCode(r'''
+class V {}
+class VP extends V {}
+class A<T> {}
+class B<S> extends A<S> {
+ var b;
+}
+
+main(A<V> p) {
+ if (p is B<VP>) {
+ p.b;
+ }
+}
+''');
+ }
+
+ test_typePromotion_if_implements_moreSpecific() async {
+ await assertNoErrorsInCode(r'''
+class V {}
+class VP extends V {}
+class A<T> {}
+class B<S> implements A<S> {
+ var b;
+}
+
+main(A<V> p) {
+ if (p is B<VP>) {
+ p.b;
+ }
+}
+''');
+ }
+}
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 5d8cdd8..2ec9981 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -4589,7 +4589,7 @@
analyzerCode: ParserErrorCode.MULTIPLE_VARIANCE_MODIFIERS
VariableCouldBeNullDueToWrite:
- template: "Variable '#name' could be null due to a write occurring here."
+ template: "Variable '#name' could be null due to an intervening write."
tip: "Try null checking the variable after the write."
FieldNotPromoted:
diff --git a/pkg/front_end/test/spell_checking_list_messages.txt b/pkg/front_end/test/spell_checking_list_messages.txt
index 04eb66f..be9adce 100644
--- a/pkg/front_end/test/spell_checking_list_messages.txt
+++ b/pkg/front_end/test/spell_checking_list_messages.txt
@@ -36,6 +36,7 @@
h
https
interop
+intervening
js_util
libraries.json
list.filled
diff --git a/runtime/observatory/tests/service/service_kernel.status b/runtime/observatory/tests/service/service_kernel.status
index dab0b31..81cead9 100644
--- a/runtime/observatory/tests/service/service_kernel.status
+++ b/runtime/observatory/tests/service/service_kernel.status
@@ -26,6 +26,7 @@
evaluate_in_sync_star_activation_test: SkipByDesign # No incremental compiler available.
evaluate_with_escaping_closure_test: SkipByDesign # No incremental compiler available.
evaluate_with_scope_test: SkipByDesign # No incremental compiler available.
+get_allocation_traces_test: SkipByDesign # Allocation traces aren't consistent when running from snapshot.
get_object_rpc_test: SkipByDesign # App-JIT snapshots don't contain script sources.
pause_on_exceptions_test: SkipByDesign # No incremental compiler available.
rewind_optimized_out_test: SkipByDesign # No incremental compiler available.
@@ -108,6 +109,7 @@
evaluate_with_scope_test: SkipByDesign # Debugger is disabled in AOT mode.
field_script_test: SkipByDesign # Debugger is disabled in AOT mode.
get_allocation_samples_test: SkipByDesign # Debugger is disabled in AOT mode.
+get_allocation_traces_test: SkipByDesign # Debugger is disabled in AOT mode.
get_object_rpc_test: SkipByDesign # Debugger is disabled in AOT mode.
get_source_report_const_coverage_test: SkipByDesign # Debugger is disabled in AOT mode.
get_source_report_test: SkipByDesign # Debugger is disabled in AOT mode.
@@ -290,6 +292,7 @@
evaluate_in_frame_with_scope_test: RuntimeError # Issue #34736
evaluate_in_sync_star_activation_test: SkipByDesign # No incremental compiler available.
evaluate_with_scope_test: RuntimeError # Issue #34736
+get_allocation_traces_test: SkipByDesign # Stack traces are different running from snapshot.
pause_on_exceptions_test: RuntimeError, Timeout # Issue #34736
reload_sources_test: Skip # Times out.
rewind_optimized_out_test: RuntimeError # Issue #34736
diff --git a/runtime/observatory_2/tests/service_2/service_2_kernel.status b/runtime/observatory_2/tests/service_2/service_2_kernel.status
index 472d995..470019e 100644
--- a/runtime/observatory_2/tests/service_2/service_2_kernel.status
+++ b/runtime/observatory_2/tests/service_2/service_2_kernel.status
@@ -26,6 +26,7 @@
evaluate_in_sync_star_activation_test: SkipByDesign # No incremental compiler available.
evaluate_with_escaping_closure_test: SkipByDesign # No incremental compiler available.
evaluate_with_scope_test: SkipByDesign # No incremental compiler available.
+get_allocation_traces_test: SkipByDesign # Allocation traces aren't consistent when running from snapshot.
get_object_rpc_test: SkipByDesign # App-JIT snapshots don't contain script sources.
pause_on_exceptions_test: SkipByDesign # No incremental compiler available.
rewind_optimized_out_test: SkipByDesign # No incremental compiler available.
@@ -108,6 +109,7 @@
evaluate_with_scope_test: SkipByDesign # Debugger is disabled in AOT mode.
field_script_test: SkipByDesign # Debugger is disabled in AOT mode.
get_allocation_samples_test: SkipByDesign # Debugger is disabled in AOT mode.
+get_allocation_traces_test: SkipByDesign # Debugger is disabled in AOT mode.
get_object_rpc_test: SkipByDesign # Debugger is disabled in AOT mode.
get_source_report_const_coverage_test: SkipByDesign # Debugger is disabled in AOT mode.
get_source_report_test: SkipByDesign # Debugger is disabled in AOT mode.
@@ -289,6 +291,7 @@
evaluate_in_frame_with_scope_test: RuntimeError # Issue #34736
evaluate_in_sync_star_activation_test: SkipByDesign # No incremental compiler available.
evaluate_with_scope_test: RuntimeError # Issue #34736
+get_allocation_traces_test: SkipByDesign # Allocation traces aren't consistent when running from snapshot.
pause_on_exceptions_test: RuntimeError, Timeout # Issue #34736
reload_sources_test: Skip # Times out.
rewind_optimized_out_test: RuntimeError # Issue #34736
diff --git a/tools/VERSION b/tools/VERSION
index 65a92de..5505a1f 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 13
PATCH 0
-PRERELEASE 33
+PRERELEASE 34
PRERELEASE_PATCH 0
\ No newline at end of file