Index: pkg/analyzer_cli/lib/src/build_mode.dart |
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart |
index a2c921881175b9269f0c1886bb6a985b612e4703..4111aefabb9099319a2c76f03f12da700d6735ea 100644 |
--- a/pkg/analyzer_cli/lib/src/build_mode.dart |
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart |
@@ -145,7 +145,11 @@ class BuildMode { |
// Set context options. |
Driver.setAnalysisContextOptions( |
- context, options, (AnalysisOptionsImpl contextOptions) {}); |
+ context, options, (AnalysisOptionsImpl contextOptions) { |
+ if (options.buildSummaryOnlyDiet) { |
+ contextOptions.analyzeFunctionBodies = false; |
+ } |
+ }); |
// Configure using summaries. |
context.typeProvider = sdk.context.typeProvider; |