| Index: pkg/analyzer/test/src/summary/summary_common.dart
|
| diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
|
| index 41737589144f75efe371464219ca6f3853ac822e..c824bf19ce5806793f358e859a9dc44d7aee06d0 100644
|
| --- a/pkg/analyzer/test/src/summary/summary_common.dart
|
| +++ b/pkg/analyzer/test/src/summary/summary_common.dart
|
| @@ -3888,6 +3888,16 @@ class C {
|
| operators: [UnlinkedConstOperation.pushInt], ints: [0]);
|
| }
|
|
|
| + test_field_final_invalidConstExpr() {
|
| + UnlinkedVariable variable = serializeClassText(r'''
|
| +class C {
|
| + final int f = 1 + m();
|
| + static int m() => 42;
|
| +}''').fields[0];
|
| + expect(variable.isFinal, isTrue);
|
| + _assertUnlinkedConst(variable.constExpr, isValid: false);
|
| + }
|
| +
|
| test_field_formal_param_inferred_type_explicit() {
|
| UnlinkedClass cls = serializeClassText(
|
| 'class C extends D { var v; C(int this.v); }'
|
| @@ -5425,13 +5435,15 @@ var v;''';
|
| }
|
|
|
| void _assertUnlinkedConst(UnlinkedConst constExpr,
|
| - {List<UnlinkedConstOperation> operators,
|
| + {bool isValid: true,
|
| + List<UnlinkedConstOperation> operators: const <UnlinkedConstOperation>[],
|
| List<int> ints: const <int>[],
|
| List<double> doubles: const <double>[],
|
| List<String> strings: const <String>[],
|
| List<_EntityRefValidator> referenceValidators:
|
| const <_EntityRefValidator>[]}) {
|
| expect(constExpr, isNotNull);
|
| + expect(constExpr.isValid, isValid);
|
| expect(constExpr.operations, operators);
|
| expect(constExpr.ints, ints);
|
| expect(constExpr.doubles, doubles);
|
|
|