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

Side by Side Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 2205743002: Add non-null types list to StrongModeOptions (Closed) Base URL: https://github.com/dart-lang/sdk@master
Patch Set: Address comments Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/type_system.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.generated.engine; 5 library analyzer.src.generated.engine;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 bool trackCacheDependencies = true; 1296 bool trackCacheDependencies = true;
1297 1297
1298 /** 1298 /**
1299 * A flag indicating whether implicit casts are allowed in [strongMode] 1299 * A flag indicating whether implicit casts are allowed in [strongMode]
1300 * (they are always allowed in Dart 1.0 mode). 1300 * (they are always allowed in Dart 1.0 mode).
1301 * 1301 *
1302 * This option is experimental and subject to change. 1302 * This option is experimental and subject to change.
1303 */ 1303 */
1304 bool implicitCasts = true; 1304 bool implicitCasts = true;
1305 1305
1306 /**
1307 * A list of non-nullable type names, prefixed by the library URI they belong
1308 * to, e.g., 'dart:core,int', 'dart:core,bool', 'file:///foo.dart,bar', etc.
1309 */
1310 List<String> nonnullableTypes = NONNULLABLE_TYPES;
1311
1306 @override 1312 @override
1307 bool finerGrainedInvalidation = false; 1313 bool finerGrainedInvalidation = false;
1308 1314
1309 /** 1315 /**
1310 * A flag indicating whether implicit dynamic type is allowed, on by default. 1316 * A flag indicating whether implicit dynamic type is allowed, on by default.
1311 * 1317 *
1312 * This flag can be used without necessarily enabling [strongMode], but it is 1318 * This flag can be used without necessarily enabling [strongMode], but it is
1313 * designed with strong mode's type inference in mind. Without type inference, 1319 * designed with strong mode's type inference in mind. Without type inference,
1314 * it will raise many errors. Also it does not provide type safety without 1320 * it will raise many errors. Also it does not provide type safety without
1315 * strong mode. 1321 * strong mode.
1316 * 1322 *
1317 * This option is experimental and subject to change. 1323 * This option is experimental and subject to change.
1318 */ 1324 */
1319 bool implicitDynamic = true; 1325 bool implicitDynamic = true;
1320 1326
1321 /** 1327 /**
1328 * The default list of non-nullable type names.
1329 */
1330 static const List<String> NONNULLABLE_TYPES = const <String>[];
1331
1332 /**
1322 * Initialize a newly created set of analysis options to have their default 1333 * Initialize a newly created set of analysis options to have their default
1323 * values. 1334 * values.
1324 */ 1335 */
1325 AnalysisOptionsImpl(); 1336 AnalysisOptionsImpl();
1326 1337
1327 /** 1338 /**
1328 * Initialize a newly created set of analysis options to have the same values 1339 * Initialize a newly created set of analysis options to have the same values
1329 * as those in the given set of analysis [options]. 1340 * as those in the given set of analysis [options].
1330 */ 1341 */
1331 AnalysisOptionsImpl.from(AnalysisOptions options) { 1342 AnalysisOptionsImpl.from(AnalysisOptions options) {
(...skipping 11 matching lines...) Expand all
1343 hint = options.hint; 1354 hint = options.hint;
1344 incremental = options.incremental; 1355 incremental = options.incremental;
1345 incrementalApi = options.incrementalApi; 1356 incrementalApi = options.incrementalApi;
1346 incrementalValidation = options.incrementalValidation; 1357 incrementalValidation = options.incrementalValidation;
1347 lint = options.lint; 1358 lint = options.lint;
1348 preserveComments = options.preserveComments; 1359 preserveComments = options.preserveComments;
1349 strongMode = options.strongMode; 1360 strongMode = options.strongMode;
1350 if (options is AnalysisOptionsImpl) { 1361 if (options is AnalysisOptionsImpl) {
1351 strongModeHints = options.strongModeHints; 1362 strongModeHints = options.strongModeHints;
1352 implicitCasts = options.implicitCasts; 1363 implicitCasts = options.implicitCasts;
1364 nonnullableTypes = options.nonnullableTypes;
1353 implicitDynamic = options.implicitDynamic; 1365 implicitDynamic = options.implicitDynamic;
1354 } 1366 }
1355 trackCacheDependencies = options.trackCacheDependencies; 1367 trackCacheDependencies = options.trackCacheDependencies;
1356 finerGrainedInvalidation = options.finerGrainedInvalidation; 1368 finerGrainedInvalidation = options.finerGrainedInvalidation;
1357 } 1369 }
1358 1370
1359 bool get analyzeFunctionBodies { 1371 bool get analyzeFunctionBodies {
1360 if (identical(analyzeFunctionBodiesPredicate, _analyzeAllFunctionBodies)) { 1372 if (identical(analyzeFunctionBodiesPredicate, _analyzeAllFunctionBodies)) {
1361 return true; 1373 return true;
1362 } else if (identical( 1374 } else if (identical(
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after
2703 * The data that was created from the source. 2715 * The data that was created from the source.
2704 */ 2716 */
2705 final E data; 2717 final E data;
2706 2718
2707 /** 2719 /**
2708 * Initialize a newly created holder to associate the given [data] with the 2720 * Initialize a newly created holder to associate the given [data] with the
2709 * given [modificationTime]. 2721 * given [modificationTime].
2710 */ 2722 */
2711 TimestampedData(this.modificationTime, this.data); 2723 TimestampedData(this.modificationTime, this.data);
2712 } 2724 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/type_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698