| Index: pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
|
| diff --git a/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart b/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
|
| index 09e8649b3ca9a59af41ad540be323c497aa1979d..796811370f0062a4597812705ac9013670f8c09c 100644
|
| --- a/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
|
| +++ b/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
|
| @@ -81,7 +81,8 @@ abstract class NullableTypeInference {
|
|
|
| if (element is PropertyAccessorElement && element.isGetter) {
|
| PropertyInducingElement variable = element.variable;
|
| - return variable.computeConstantValue()?.isNull ?? true;
|
| + var isVirtual = variable is FieldElement && variable.isVirtual;
|
| + return isVirtual || (variable.computeConstantValue()?.isNull ?? true);
|
| }
|
|
|
| // Other types of identifiers are nullable (parameters, fields).
|
|
|