| 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 39f01308324edbb22a8b5d05d18574e643c087d4..c687eb2a31f577e24cf9844bb3b24c5d73771458 100644
|
| --- a/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
|
| +++ b/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
|
| @@ -4,6 +4,7 @@
|
|
|
| import 'dart:collection';
|
| import 'package:analyzer/dart/ast/ast.dart';
|
| +import 'package:analyzer/dart/ast/resolution_accessors.dart';
|
| import 'package:analyzer/dart/ast/token.dart' show TokenType;
|
| import 'package:analyzer/dart/ast/visitor.dart' show RecursiveAstVisitor;
|
| import 'package:analyzer/dart/element/element.dart';
|
| @@ -121,7 +122,7 @@ abstract class NullableTypeInference {
|
| return _isNullable(expr.expression, localIsNullable);
|
| }
|
| if (expr is InstanceCreationExpression) {
|
| - var e = expr.staticElement;
|
| + var e = staticElementForConstructorReference(expr);
|
| if (e == null) return true;
|
|
|
| // Follow redirects.
|
| @@ -165,7 +166,7 @@ abstract class NullableTypeInference {
|
| if (expr is MethodInvocation) {
|
| // TODO(vsm): This logic overlaps with the resolver.
|
| // Where is the best place to put this?
|
| - var e = expr.methodName.staticElement;
|
| + var e = staticElementForIdentifier(expr.methodName);
|
| if (isInlineJS(e)) {
|
| // Fix types for JS builtin calls.
|
| //
|
|
|