| OLD | NEW |
| 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.dart.element.element; | 5 library analyzer.src.dart.element.element; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:math' show min; | 8 import 'dart:math' show min; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 7125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7136 _unlinkedVariable.inferredTypeSlot, typeParameterContext); | 7136 _unlinkedVariable.inferredTypeSlot, typeParameterContext); |
| 7137 _declaredType = enclosingUnit.resynthesizerContext.resolveTypeRef( | 7137 _declaredType = enclosingUnit.resynthesizerContext.resolveTypeRef( |
| 7138 _unlinkedVariable.type, typeParameterContext, | 7138 _unlinkedVariable.type, typeParameterContext, |
| 7139 declaredType: true); | 7139 declaredType: true); |
| 7140 } | 7140 } |
| 7141 return super.type; | 7141 return super.type; |
| 7142 } | 7142 } |
| 7143 | 7143 |
| 7144 @override | 7144 @override |
| 7145 void set type(DartType type) { | 7145 void set type(DartType type) { |
| 7146 // print('[type=] $type'); |
| 7146 _assertNotResynthesized(_unlinkedVariable); | 7147 _assertNotResynthesized(_unlinkedVariable); |
| 7147 _type = type; | 7148 _type = type; |
| 7148 } | 7149 } |
| 7149 | 7150 |
| 7150 /** | 7151 /** |
| 7151 * Subclasses need this getter, see [ConstVariableElement._unlinkedConst]. | 7152 * Subclasses need this getter, see [ConstVariableElement._unlinkedConst]. |
| 7152 */ | 7153 */ |
| 7153 UnlinkedExpr get _unlinkedConst => _unlinkedVariable?.initializer?.bodyExpr; | 7154 UnlinkedExpr get _unlinkedConst => _unlinkedVariable?.initializer?.bodyExpr; |
| 7154 } | 7155 } |
| 7155 | 7156 |
| (...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8880 | 8881 |
| 8881 @override | 8882 @override |
| 8882 void visitElement(Element element) { | 8883 void visitElement(Element element) { |
| 8883 int offset = element.nameOffset; | 8884 int offset = element.nameOffset; |
| 8884 if (offset != -1) { | 8885 if (offset != -1) { |
| 8885 map[offset] = element; | 8886 map[offset] = element; |
| 8886 } | 8887 } |
| 8887 super.visitElement(element); | 8888 super.visitElement(element); |
| 8888 } | 8889 } |
| 8889 } | 8890 } |
| OLD | NEW |