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 d3e94d34b9d12b3deb0c00839e69f165275d3629..2401ea865012303886fe9823a0ea1da7cfd45b88 100644 |
--- a/pkg/analyzer/test/src/summary/summary_common.dart |
+++ b/pkg/analyzer/test/src/summary/summary_common.dart |
@@ -8446,12 +8446,19 @@ var v = f(g: (x, y) {}); |
} |
test_initializer_executable_with_bottom_return_type() { |
- // The synthetic executable for `v` has type `() => Bottom`. |
UnlinkedVariable variable = serializeVariableText('int v = null;'); |
expect(variable.initializer.returnType, isNull); |
- checkInferredTypeSlot( |
- variable.initializer.inferredReturnTypeSlot, null, null, '*bottom*', |
- onlyInStrongMode: false); |
+ if (strongMode) { |
+ // Strong mode infers a type for the closure of `() => int`. |
+ checkInferredTypeSlot(variable.initializer.inferredReturnTypeSlot, |
+ 'dart:core', 'dart:core', 'int', |
+ onlyInStrongMode: false); |
+ } else { |
+ // In Dart1 mode the synthetic executable for `v` has type `() => Bottom`. |
+ checkInferredTypeSlot( |
+ variable.initializer.inferredReturnTypeSlot, null, null, '*bottom*', |
+ onlyInStrongMode: false); |
+ } |
} |
test_initializer_executable_with_imported_return_type() { |