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

Unified Diff: pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart

Issue 2865403007: Get rid of promotedType=none annotations (Closed)
Patch Set: Created 3 years, 7 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
Index: pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index b96c845ae5197456ed7bd7fdfd113a040a7300bc..b4b6cfad15c09de3576979d2b06865d6f191a9b9 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -570,13 +570,10 @@ abstract class TypeInferrerImpl<S, E, V, F> extends TypeInferrer<S, E, V, F> {
void setPromotedType(DartType type)) {
DartType promotedType = typePromoter.computePromotedType(
typePromotionFact, typePromotionScope, mutatedInClosure);
- instrumentation?.record(
- Uri.parse(uri),
- offset,
- 'promotedType',
- promotedType != null
- ? new InstrumentationValueForType(promotedType)
- : const InstrumentationValueLiteral('none'));
+ if (promotedType != null) {
+ instrumentation?.record(Uri.parse(uri), offset, 'promotedType',
+ new InstrumentationValueForType(promotedType));
+ }
setPromotedType(promotedType);
return typeNeeded ? (promotedType ?? declaredOrInferredType) : null;
}
« no previous file with comments | « pkg/analyzer/test/src/task/strong/front_end_inference_test.dart ('k') | pkg/front_end/test/fasta/strong.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698