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

Unified Diff: lib/src/analyzer/context.dart

Issue 2016483002: Enable strong mode in DDC, fix all warnings/errors (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 | « bin/dartdevc.dart ('k') | lib/src/compiler/code_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/analyzer/context.dart
diff --git a/lib/src/analyzer/context.dart b/lib/src/analyzer/context.dart
index 3d9d06f3a2c62ded3219bc58b0dd191ed7f4e2c6..2bb9f7b2abce953c161c76f093371bc53e11ecd8 100644
--- a/lib/src/analyzer/context.dart
+++ b/lib/src/analyzer/context.dart
@@ -4,6 +4,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:args/args.dart' show ArgParser, ArgResults;
+import 'package:analyzer/src/context/context.dart' show AnalysisContextImpl;
import 'package:analyzer/src/generated/engine.dart'
show AnalysisContext, AnalysisEngine, AnalysisOptionsImpl;
import 'package:analyzer/src/generated/java_io.dart' show JavaFile;
@@ -64,13 +65,13 @@ class AnalyzerOptions {
: dartSdkPath = dartSdkPath ?? getSdkDir().path;
AnalyzerOptions.fromArguments(ArgResults args)
- : summaryPaths = args['summary'],
+ : summaryPaths = args['summary'] as List<String>,
useMockSdk = false,
dartSdkPath = args['dart-sdk'] ?? getSdkDir().path,
dartSdkSummaryPath = args['dart-sdk-summary'],
customUrlMappings = _parseUrlMappings(args['url-mapping']),
packageRoot = args['package-root'],
- packagePaths = args['package-paths']?.split(',') ?? [];
+ packagePaths = (args['package-paths'] as String)?.split(',') ?? [];
/// Whether to resolve 'package:' uris using the multi-package resolver.
bool get useMultiPackage => packagePaths.isNotEmpty;
@@ -139,7 +140,7 @@ AnalysisContext createAnalysisContextWithSources(AnalyzerOptions options,
}
/// Creates an analysis context that contains our restricted typing rules.
-AnalysisContext createAnalysisContext() {
+AnalysisContextImpl createAnalysisContext() {
var res = AnalysisEngine.instance.createAnalysisContext();
res.analysisOptions = new AnalysisOptionsImpl()..strongMode = true;
return res;
« no previous file with comments | « bin/dartdevc.dart ('k') | lib/src/compiler/code_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698