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

Unified Diff: pkg/analyzer/lib/src/task/options.dart

Issue 1412573012: Option support for `enableGenericMethods`. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 1 month 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 | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/options.dart
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index 689bff2eebbd5b212bf0decb42562883051f97a4..5b968b075a2deb439b2031dc71a86b01981665ee 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -35,6 +35,7 @@ void configureContextOptions(
/// `analyzer` analysis options constants.
class AnalyzerOptions {
static const String analyzer = 'analyzer';
+ static const String enableGenericMethods = 'enableGenericMethods';
static const String enableSuperMixins = 'enableSuperMixins';
static const String errors = 'errors';
static const String exclude = 'exclude';
@@ -61,7 +62,10 @@ class AnalyzerOptions {
];
/// Supported `analyzer` language configuration options.
- static const List<String> languageOptions = const [enableSuperMixins];
+ static const List<String> languageOptions = const [
+ enableGenericMethods,
+ enableSuperMixins
+ ];
}
/// Validates `analyzer` options.
@@ -391,11 +395,19 @@ class _OptionsProcessor {
if (feature == AnalyzerOptions.enableSuperMixins) {
if (isTrue(v.value)) {
AnalysisOptionsImpl options =
- new AnalysisOptionsImpl.from(context.analysisOptions);
+ new AnalysisOptionsImpl.from(context.analysisOptions);
options.enableSuperMixins = true;
context.analysisOptions = options;
}
}
+ if (feature == AnalyzerOptions.enableGenericMethods) {
+ if (isTrue(v.value)) {
+ AnalysisOptionsImpl options =
+ new AnalysisOptionsImpl.from(context.analysisOptions);
+ options.enableGenericMethods = true;
+ context.analysisOptions = options;
+ }
+ }
}
});
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698