| Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
|
| diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
|
| index a12b342145f15d65d25da6cbb76c312ce0f64a07..c77f169cb1e1a9ac6fe275f830364bc8822738e3 100644
|
| --- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
|
| +++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
|
| @@ -897,7 +897,7 @@ class DynamicCallSiteTypeInformation extends CallSiteTypeInformation {
|
|
|
| // Walk over the found targets, and compute the joined union type mask
|
| // for all these targets.
|
| - return inferrer.types.joinTypeMasks(targets.map((element) {
|
| + TypeMask result = inferrer.types.joinTypeMasks(targets.map((element) {
|
| // If [canReachAll] is true, then we are iterating over all
|
| // targets that satisfy the untyped selector. We skip the return
|
| // type of the targets that can only be reached through
|
| @@ -942,6 +942,15 @@ class DynamicCallSiteTypeInformation extends CallSiteTypeInformation {
|
| return inferrer.typeOfElementWithSelector(element, typedSelector).type;
|
| }
|
| }));
|
| +
|
| + if (call is ast.Send) {
|
| + Send send = call;
|
| + if (send.isConditional && receiver.type.isNullable) {
|
| + // Conditional sends (e.g. `a?.b`) may be null if the receiver is null.
|
| + result = result.nullable();
|
| + }
|
| + }
|
| + return result;
|
| }
|
|
|
| void giveUp(TypeGraphInferrerEngine inferrer, {bool clearAssignments: true}) {
|
|
|