| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 {} |
| OLD | NEW |