| Index: pkg/analyzer/test/generated/non_error_resolver_test.dart
|
| diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
|
| index c77d424e657979e532d2cf9f2ea6349aed7b1e0e..c1da94108bf40ee9de8f229fe5a7250694cbc84e 100644
|
| --- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
|
| +++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
|
| @@ -6,7 +6,6 @@ library engine.non_error_resolver_test;
|
|
|
| import 'package:analyzer/src/generated/ast.dart';
|
| import 'package:analyzer/src/generated/element.dart';
|
| -import 'package:analyzer/src/generated/engine.dart';
|
| import 'package:analyzer/src/generated/error.dart';
|
| import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
|
| import 'package:analyzer/src/generated/source_io.dart';
|
| @@ -5002,12 +5001,14 @@ class Bar extends Foo {
|
| verify([source]);
|
| }
|
|
|
| - void test_undefinedGetter_typeLiteral_conditionalAccess() {
|
| - // When applied to a type literal, the conditional access operator '?.' can
|
| - // be used to access instance getters of Type.
|
| + void test_undefinedGetter_static_conditionalAccess() {
|
| + // The conditional access operator '?.' can be used to access static
|
| + // fields.
|
| Source source = addSource('''
|
| -class A {}
|
| -f() => A?.hashCode;
|
| +class A {
|
| + static var x;
|
| +}
|
| +var a = A?.x;
|
| ''');
|
| computeLibrarySourceErrors(source);
|
| assertNoErrors(source);
|
| @@ -5089,12 +5090,14 @@ main() {
|
| // A call to verify(source) fails as '(() => null)()' isn't resolved.
|
| }
|
|
|
| - void test_undefinedMethod_typeLiteral_conditionalAccess() {
|
| - // When applied to a type literal, the conditional access operator '?.' can
|
| - // be used to access instance methods of Type.
|
| + void test_undefinedMethod_static_conditionalAccess() {
|
| + // The conditional access operator '?.' can be used to access static
|
| + // methods.
|
| Source source = addSource('''
|
| -class A {}
|
| -f() => A?.toString();
|
| +class A {
|
| + static void m() {}
|
| +}
|
| +f() { A?.m(); }
|
| ''');
|
| computeLibrarySourceErrors(source);
|
| assertNoErrors(source);
|
| @@ -5139,6 +5142,20 @@ main() {
|
| verify([source]);
|
| }
|
|
|
| + void test_undefinedSetter_static_conditionalAccess() {
|
| + // The conditional access operator '?.' can be used to access static
|
| + // fields.
|
| + Source source = addSource('''
|
| +class A {
|
| + static var x;
|
| +}
|
| +f() { A?.x = 1; }
|
| +''');
|
| + computeLibrarySourceErrors(source);
|
| + assertNoErrors(source);
|
| + verify([source]);
|
| + }
|
| +
|
| void test_undefinedSuperMethod_field() {
|
| Source source = addSource(r'''
|
| class A {
|
|
|