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

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

Issue 2853113002: Infer types of double literals. (Closed)
Patch Set: Add expectations for compile/outline pipelines. Created 3 years, 8 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 3b8cc43bb21099cf28a3ce7f64e80b3c47d88d73..ff133dd3939abdd2f2067b2618bb960c3754b9f8 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
@@ -78,6 +78,14 @@ abstract class TypeInferrerImpl<S, E, V, F> extends TypeInferrer<S, E, V, F> {
/// initializer.
E getFieldInitializer(F field);
+ /// Performs the core type inference algorithm for double literals.
+ ///
+ /// [typeContext], [typeNeeded], and the return value behave as described in
+ /// [inferExpression].
+ DartType inferDoubleLiteral(DartType typeContext, bool typeNeeded) {
+ return typeNeeded ? coreTypes.doubleClass.rawType : null;
+ }
+
/// Performs type inference on the given [expression].
///
/// [typeContext] is the expected type of the expression, based on surrounding

Powered by Google App Engine
This is Rietveld 408576698