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

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

Issue 2942153002: Enable top level inference of instance property gets/sets. (Closed)
Patch Set: Created 3 years, 6 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_inference_engine.dart
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
index ff927810b104cdd6329e8ac5e2db4fa4c732a87e..57fa870701bebba765e895cc4fa800c0772db7b1 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
@@ -112,10 +112,6 @@ abstract class TypeInferenceEngineImpl extends TypeInferenceEngine {
/// Enables "expanded top level inference", which allows top level inference
/// to support all expressions, not just those defined as "immediately
/// evident" by https://github.com/dart-lang/sdk/pull/28218.
- ///
- /// Note that setting this value to `true` does not yet allow top level
- /// inference to depend on field and property accesses; that will require
- /// further work. TODO(paulberry): fix this.
static const bool expandedTopLevelInference = true;
/// Enables "fused top level inference", which fuses dependency collection and
@@ -127,12 +123,15 @@ abstract class TypeInferenceEngineImpl extends TypeInferenceEngine {
/// whether a dependency will be needed at the time we evaluate it.
///
/// Requires [expandedTopLevelInference] to be `true`.
- ///
- /// Note that setting this value to `true` does not yet allow top level
- /// inference to depend on field and property accesses; that will require
- /// further work. TODO(paulberry): fix this.
static const bool fusedTopLevelInference = true;
+ /// Enables "full top level inference", which allows a top level or static
+ /// field's inferred type to depend on the type of an instance field (provided
+ /// there are no circular dependencies).
+ ///
+ /// Requires [fusedTopLevelInference] to be `true`.
+ static const bool fullTopLevelInference = true;
+
final Instrumentation instrumentation;
final bool strongMode;

Powered by Google App Engine
This is Rietveld 408576698