Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: pkg/analyzer/tool/summary/stats.dart

Issue 1691043002: In summary/stats.dart, don't count enums with index == 0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/tool/summary/stats.dart
diff --git a/pkg/analyzer/tool/summary/stats.dart b/pkg/analyzer/tool/summary/stats.dart
index 6d6f10b147a76dd223adb1f8313e927e6f619a5f..da524a0547535ac8871609d2c5dea928926b9a95 100644
--- a/pkg/analyzer/tool/summary/stats.dart
+++ b/pkg/analyzer/tool/summary/stats.dart
@@ -9,6 +9,7 @@
library analyzer.tool.summary.stats;
import 'dart:io';
+import 'dart:mirrors';
import 'package:analyzer/src/summary/base.dart';
import 'package:analyzer/src/summary/idl.dart';
@@ -80,7 +81,8 @@ class Stats {
value == 0 ||
value == false ||
value == '' ||
- value is List && value.isEmpty) {
+ value is List && value.isEmpty ||
+ reflect(value).type.isEnum && (value as dynamic).index == 0) {
return;
}
if (!typeCounts.containsKey(key)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698