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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_loader.dart

Issue 2828693003: Add local type inference logic for integer literals. (Closed)
Patch Set: Sort declarations 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/source/source_loader.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index e367dd2830849f3c08714df4b21257006106369b..64447de5ed846088ef9d7b3773905b7f30ece6c9 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -126,8 +126,10 @@ class SourceLoader<L> extends Loader<L> {
}
DietListener createDietListener(LibraryBuilder library) {
- return new DietListener(library, hierarchy, coreTypes,
- new KernelTypeInferrer(coreTypes, hierarchy, instrumentation));
+ var typeInferrer = target.strongMode
+ ? new KernelTypeInferrer(coreTypes, hierarchy, instrumentation)
+ : null;
+ return new DietListener(library, hierarchy, coreTypes, typeInferrer);
}
void resolveParts() {

Powered by Google App Engine
This is Rietveld 408576698