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

Side by Side Diff: pkg/analyzer/lib/src/task/strong_mode.dart

Issue 1355773002: Make type system changes backwards compatible (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments, rebase Created 5 years, 3 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 | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/generated/all_the_rest_test.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.task.strong_mode; 5 library analyzer.src.task.strong_mode;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
10 import 'package:analyzer/src/generated/element.dart'; 10 import 'package:analyzer/src/generated/element.dart';
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 /** 105 /**
106 * The classes that have been visited while attempting to infer the types of 106 * The classes that have been visited while attempting to infer the types of
107 * instance members of some base class. 107 * instance members of some base class.
108 */ 108 */
109 HashSet<ClassElementImpl> elementsBeingInferred = 109 HashSet<ClassElementImpl> elementsBeingInferred =
110 new HashSet<ClassElementImpl>(); 110 new HashSet<ClassElementImpl>();
111 111
112 /** 112 /**
113 * Initialize a newly create inferrer. 113 * Initialize a newly create inferrer.
114 */ 114 */
115 InstanceMemberInferrer(this.typeProvider, this.typeSystem); 115 InstanceMemberInferrer(this.typeProvider, {TypeSystem typeSystem})
116 : typeSystem = (typeSystem != null) ? typeSystem : new TypeSystemImpl();
116 117
117 /** 118 /**
118 * Infer type information for all of the instance members in the given 119 * Infer type information for all of the instance members in the given
119 * compilation [unit]. 120 * compilation [unit].
120 */ 121 */
121 void inferCompilationUnit(CompilationUnitElement unit) { 122 void inferCompilationUnit(CompilationUnitElement unit) {
122 inheritanceManager = new InheritanceManager(unit.library); 123 inheritanceManager = new InheritanceManager(unit.library);
123 unit.types.forEach((ClassElement classElement) { 124 unit.types.forEach((ClassElement classElement) {
124 try { 125 try {
125 _inferClass(classElement); 126 _inferClass(classElement);
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 results.add(element); 470 results.add(element);
470 } 471 }
471 } 472 }
472 } 473 }
473 } 474 }
474 475
475 /** 476 /**
476 * A class of exception that is not used anywhere else. 477 * A class of exception that is not used anywhere else.
477 */ 478 */
478 class _CycleException implements Exception {} 479 class _CycleException implements Exception {}
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698