Index: pkg/front_end/lib/src/fasta/source/source_library_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart |
index 368b3cd4868dbd1bf1c4d69345f9f2700a4c39f7..3ed4f7f9ff91d6620f17aa6dc7b6f30b6a84522c 100644 |
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart |
@@ -58,6 +58,10 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R> |
final List<List> implementationBuilders = <List<List>>[]; |
+ /// Indicates whether type inference (and type promotion) should be disabled |
+ /// for this library. |
+ final bool disableTypeInference; |
+ |
String name; |
String partOfName; |
@@ -80,7 +84,8 @@ abstract class SourceLibraryBuilder<T extends TypeBuilder, R> |
SourceLibraryBuilder.fromScopes( |
this.loader, this.fileUri, this.libraryDeclaration, this.importScope) |
- : currentDeclaration = libraryDeclaration, |
+ : disableTypeInference = loader.target.disableTypeInference, |
+ currentDeclaration = libraryDeclaration, |
super( |
fileUri, libraryDeclaration.toScope(importScope), new Scope.top()); |