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

Unified Diff: lib/src/compiler/compiler.dart

Issue 1949163003: fix for #520, ListMixin should work again (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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
« no previous file with comments | « lib/src/compiler/code_generator.dart ('k') | lib/src/compiler/extension_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/compiler.dart
diff --git a/lib/src/compiler/compiler.dart b/lib/src/compiler/compiler.dart
index fa6ea22859aacc776736e5cc1df44dbabc3fba21..7f0db169609c93e60f713f00b0ddf50d5cac8030 100644
--- a/lib/src/compiler/compiler.dart
+++ b/lib/src/compiler/compiler.dart
@@ -42,9 +42,18 @@ import 'error_helpers.dart' show errorSeverity, formatError, sortErrors;
/// about them.
class ModuleCompiler {
final AnalysisContext context;
- final _extensionTypes = new ExtensionTypeSet();
+ final ExtensionTypeSet _extensionTypes;
- ModuleCompiler.withContext(this.context);
+ ModuleCompiler.withContext(AnalysisContext context)
+ : context = context,
+ _extensionTypes = new ExtensionTypeSet(context) {
+ if (!context.analysisOptions.strongMode) {
+ throw new ArgumentError('AnalysisContext must be strong mode');
+ }
+ if (!context.sourceFactory.dartSdk.context.analysisOptions.strongMode) {
+ throw new ArgumentError('AnalysisContext must have strong mode SDK');
+ }
+ }
ModuleCompiler(AnalyzerOptions analyzerOptions)
: this.withContext(createAnalysisContextWithSources(analyzerOptions));
« no previous file with comments | « lib/src/compiler/code_generator.dart ('k') | lib/src/compiler/extension_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698