| 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 51469d8b88a213ee0c8be154dfb88159393d1357..e9e2bab44ff6ab8724b51a06e2b0d0a86af202f6 100644
|
| --- a/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
|
| +++ b/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
|
| @@ -108,20 +108,17 @@ abstract class NullableTypeInference {
|
| // type.
|
| Element container = element.enclosingElement;
|
| if (container is ClassElement) {
|
| - DartType targetType = container.type;
|
| - InterfaceType implType = getImplementationType(targetType);
|
| + var targetType = container.type;
|
| + var implType = getImplementationType(targetType);
|
| if (implType != null) {
|
| - PropertyAccessorElement getter =
|
| - implType.lookUpGetter(name, dartCoreLibrary);
|
| + var getter = implType.lookUpGetter(name, dartCoreLibrary);
|
| if (getter != null) element = getter;
|
| }
|
| }
|
| // If the getter is a synthetic element, then any annotations will
|
| // be on the variable, so use those instead.
|
| - if (element is PropertyAccessorElement &&
|
| - element.isSynthetic &&
|
| - element.variable != null) {
|
| - element = (element as PropertyAccessorElement).variable;
|
| + if (element is PropertyAccessorElement && element.isSynthetic) {
|
| + return _assertedNotNull(element.variable);
|
| }
|
| // Return true if the element is annotated as returning a non-null value.
|
| return _assertedNotNull(element);
|
|
|