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

Unified Diff: lib/src/options.dart

Issue 1050703002: Downwards closure inference (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Address comments Created 5 years, 9 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/info.dart ('k') | lib/src/testing.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/options.dart
diff --git a/lib/src/options.dart b/lib/src/options.dart
index 221c9b2ddc9f87b84d8382c4396f70ce2e34315d..381cbdc945d1c9fa9a005ce97f38de182932e588 100644
--- a/lib/src/options.dart
+++ b/lib/src/options.dart
@@ -79,10 +79,11 @@ class RulesOptions extends TypeOptions {
/// Whether to wrap closures for compatibility.
final bool wrapClosures;
+ static const wrapClosuresDefault = true;
RulesOptions({this.allowConstCasts: true, this.covariantGenerics: true,
this.inferDownwards: inferDownwardsDefault, this.relaxedCasts: true,
- this.ignoreTypes: false, this.wrapClosures: true});
+ this.ignoreTypes: false, this.wrapClosures: wrapClosuresDefault});
}
class JSCodeOptions {
@@ -219,10 +220,11 @@ class CompilerOptions implements RulesOptions, ResolverOptions, JSCodeOptions {
this.dumpInfo: false, this.dumpInfoFile, this.dumpSrcDir,
this.forceCompile: false, this.formatOutput: false,
this.cheapTestFormat: false, this.ignoreTypes: false,
- this.wrapClosures: true, this.outputDir, this.outputDart: false,
- this.useColors: true, this.covariantGenerics: true,
- this.relaxedCasts: true, this.useMultiPackage: false,
- this.packageRoot: 'packages/', this.packagePaths: const <String>[],
+ this.wrapClosures: RulesOptions.wrapClosuresDefault, this.outputDir,
+ this.outputDart: false, this.useColors: true,
+ this.covariantGenerics: true, this.relaxedCasts: true,
+ this.useMultiPackage: false, this.packageRoot: 'packages/',
+ this.packagePaths: const <String>[],
this.inferDownwards: RulesOptions.inferDownwardsDefault,
this.inferFromOverrides: ResolverOptions.inferFromOverridesDefault,
this.inferTransitively: ResolverOptions.inferTransitivelyDefault,
@@ -309,7 +311,9 @@ final ArgParser argParser = new ArgParser()
help: 'Use covariant generics', defaultsTo: true)
..addFlag('ignore-types',
help: 'Ignore types during codegen', defaultsTo: false)
- ..addFlag('wrap-closures', help: 'wrap closures implicitly', defaultsTo: true)
+ ..addFlag('wrap-closures',
+ help: 'wrap closures implicitly',
+ defaultsTo: RulesOptions.wrapClosuresDefault)
..addFlag('relaxed-casts',
help: 'Cast between Dart assignable types', defaultsTo: true)
..addOption('nonnullable',
« no previous file with comments | « lib/src/info.dart ('k') | lib/src/testing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698