| 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/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/visitor.dart'; | 10 import 'package:analyzer/dart/ast/visitor.dart'; |
| 11 import 'package:analyzer/dart/element/element.dart'; | 11 import 'package:analyzer/dart/element/element.dart'; |
| 12 import 'package:analyzer/dart/element/type.dart'; | 12 import 'package:analyzer/dart/element/type.dart'; |
| 13 import 'package:analyzer/src/dart/element/element.dart'; | 13 import 'package:analyzer/src/dart/element/element.dart'; |
| 14 import 'package:analyzer/src/dart/element/type.dart'; |
| 14 import 'package:analyzer/src/generated/resolver.dart' | 15 import 'package:analyzer/src/generated/resolver.dart' |
| 15 show TypeProvider, InheritanceManager; | 16 show TypeProvider, InheritanceManager; |
| 16 import 'package:analyzer/src/generated/type_system.dart'; | 17 import 'package:analyzer/src/generated/type_system.dart'; |
| 17 import 'package:analyzer/src/generated/utilities_dart.dart'; | 18 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 18 import 'package:analyzer/src/dart/element/type.dart'; | |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * Sets the type of the field. This is stored in the field itself, and the | 21 * Sets the type of the field. This is stored in the field itself, and the |
| 22 * synthetic getter/setter types. | 22 * synthetic getter/setter types. |
| 23 */ | 23 */ |
| 24 void setFieldType(VariableElement field, DartType newType) { | 24 void setFieldType(VariableElement field, DartType newType) { |
| 25 (field as VariableElementImpl).type = newType; | 25 (field as VariableElementImpl).type = newType; |
| 26 if (field.initializer != null) { | 26 if (field.initializer != null) { |
| 27 (field.initializer as ExecutableElementImpl).returnType = newType; | 27 (field.initializer as ExecutableElementImpl).returnType = newType; |
| 28 } | 28 } |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 results.add(element); | 471 results.add(element); |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 } | 474 } |
| 475 } | 475 } |
| 476 | 476 |
| 477 /** | 477 /** |
| 478 * A class of exception that is not used anywhere else. | 478 * A class of exception that is not used anywhere else. |
| 479 */ | 479 */ |
| 480 class _CycleException implements Exception {} | 480 class _CycleException implements Exception {} |
| OLD | NEW |