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

Unified Diff: lib/strong_mode.dart

Issue 1235503010: fixes #219, able to compile multiple entry points (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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: lib/strong_mode.dart
diff --git a/lib/strong_mode.dart b/lib/strong_mode.dart
index ffe69474d84cbd7d98a35e72f55601d3aa693636..71c2d10ffc8d98add8d76755cfec2370993b9a6d 100644
--- a/lib/strong_mode.dart
+++ b/lib/strong_mode.dart
@@ -20,8 +20,8 @@ import 'package:analyzer/src/generated/error.dart'
import 'package:analyzer/src/generated/source.dart' show Source;
import 'package:args/args.dart';
+import 'src/analysis_context.dart' show enableDevCompilerInference;
import 'src/checker/checker.dart' show CodeChecker;
-import 'src/checker/resolver.dart' show LibraryResolverWithInference;
import 'src/checker/rules.dart' show RestrictedRules;
/// A type checker for Dart code that operates under stronger rules, and has
@@ -35,14 +35,7 @@ class StrongChecker {
factory StrongChecker(
AnalysisContextImpl context, StrongModeOptions options) {
- // TODO(jmesserly): is there a cleaner way to plug this in?
- if (context.libraryResolverFactory != null) {
- throw new ArgumentError.value(context, 'context',
- 'Analysis context must not have libraryResolverFactory already set.');
- }
- context.libraryResolverFactory =
- (c) => new LibraryResolverWithInference(c, options);
-
+ enableDevCompilerInference(context, options);
var rules = new RestrictedRules(context.typeProvider, options: options);
var reporter = new _ErrorCollector(options.hints);
var checker = new CodeChecker(rules, reporter, options);
« lib/src/summary.dart ('K') | « lib/src/testing.dart ('k') | test/all_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698