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

Side by Side Diff: pkg/analyzer/lib/src/context/context.dart

Issue 2200263004: Disallow assigning null to non-nullable variables (Closed) Base URL: https://github.com/dart-lang/sdk@master
Patch Set: Address lgtm comment 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.context.context; 5 library analyzer.src.context.context;
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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 this._options.preserveComments != options.preserveComments || 285 this._options.preserveComments != options.preserveComments ||
286 this._options.strongMode != options.strongMode || 286 this._options.strongMode != options.strongMode ||
287 this._options.enableAssertMessage != options.enableAssertMessage || 287 this._options.enableAssertMessage != options.enableAssertMessage ||
288 ((options is AnalysisOptionsImpl) 288 ((options is AnalysisOptionsImpl)
289 ? this._options.strongModeHints != options.strongModeHints 289 ? this._options.strongModeHints != options.strongModeHints
290 : false) || 290 : false) ||
291 ((options is AnalysisOptionsImpl) 291 ((options is AnalysisOptionsImpl)
292 ? this._options.implicitCasts != options.implicitCasts 292 ? this._options.implicitCasts != options.implicitCasts
293 : false) || 293 : false) ||
294 ((options is AnalysisOptionsImpl) 294 ((options is AnalysisOptionsImpl)
295 ? this._options.nonnullableTypes != options.nonnullableTypes
296 : false) ||
297 ((options is AnalysisOptionsImpl)
295 ? this._options.implicitDynamic != options.implicitDynamic 298 ? this._options.implicitDynamic != options.implicitDynamic
296 : false) || 299 : false) ||
297 this._options.enableStrictCallChecks != 300 this._options.enableStrictCallChecks !=
298 options.enableStrictCallChecks || 301 options.enableStrictCallChecks ||
299 this._options.enableGenericMethods != options.enableGenericMethods || 302 this._options.enableGenericMethods != options.enableGenericMethods ||
300 this._options.enableAsync != options.enableAsync || 303 this._options.enableAsync != options.enableAsync ||
301 this._options.enableSuperMixins != options.enableSuperMixins; 304 this._options.enableSuperMixins != options.enableSuperMixins;
302 int cacheSize = options.cacheSize; 305 int cacheSize = options.cacheSize;
303 if (this._options.cacheSize != cacheSize) { 306 if (this._options.cacheSize != cacheSize) {
304 this._options.cacheSize = cacheSize; 307 this._options.cacheSize = cacheSize;
(...skipping 14 matching lines...) Expand all
319 this._options.incrementalApi = options.incrementalApi; 322 this._options.incrementalApi = options.incrementalApi;
320 this._options.incrementalValidation = options.incrementalValidation; 323 this._options.incrementalValidation = options.incrementalValidation;
321 this._options.lint = options.lint; 324 this._options.lint = options.lint;
322 this._options.preserveComments = options.preserveComments; 325 this._options.preserveComments = options.preserveComments;
323 this._options.strongMode = options.strongMode; 326 this._options.strongMode = options.strongMode;
324 this._options.trackCacheDependencies = options.trackCacheDependencies; 327 this._options.trackCacheDependencies = options.trackCacheDependencies;
325 this._options.finerGrainedInvalidation = options.finerGrainedInvalidation; 328 this._options.finerGrainedInvalidation = options.finerGrainedInvalidation;
326 if (options is AnalysisOptionsImpl) { 329 if (options is AnalysisOptionsImpl) {
327 this._options.strongModeHints = options.strongModeHints; 330 this._options.strongModeHints = options.strongModeHints;
328 this._options.implicitCasts = options.implicitCasts; 331 this._options.implicitCasts = options.implicitCasts;
332 this._options.nonnullableTypes = options.nonnullableTypes;
329 this._options.implicitDynamic = options.implicitDynamic; 333 this._options.implicitDynamic = options.implicitDynamic;
330 } 334 }
331 if (needsRecompute) { 335 if (needsRecompute) {
332 for (WorkManager workManager in workManagers) { 336 for (WorkManager workManager in workManagers) {
333 workManager.onAnalysisOptionsChanged(); 337 workManager.onAnalysisOptionsChanged();
334 } 338 }
335 } 339 }
336 } 340 }
337 341
338 @override 342 @override
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 } 2305 }
2302 DartSdk sdk = factory.dartSdk; 2306 DartSdk sdk = factory.dartSdk;
2303 if (sdk == null) { 2307 if (sdk == null) {
2304 throw new IllegalArgumentException( 2308 throw new IllegalArgumentException(
2305 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2309 "The source factory for an SDK analysis context must have a DartUriRes olver");
2306 } 2310 }
2307 return new AnalysisCache( 2311 return new AnalysisCache(
2308 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 2312 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
2309 } 2313 }
2310 } 2314 }
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