| 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 7782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7793 ParameterElementImpl_ofImplicitSetter( | 7793 ParameterElementImpl_ofImplicitSetter( |
| 7794 PropertyAccessorElementImpl_ImplicitSetter setter) | 7794 PropertyAccessorElementImpl_ImplicitSetter setter) |
| 7795 : setter = setter, | 7795 : setter = setter, |
| 7796 super('_${setter.variable.name}', setter.variable.nameOffset) { | 7796 super('_${setter.variable.name}', setter.variable.nameOffset) { |
| 7797 enclosingElement = setter; | 7797 enclosingElement = setter; |
| 7798 isSynthetic = true; | 7798 isSynthetic = true; |
| 7799 parameterKind = ParameterKind.REQUIRED; | 7799 parameterKind = ParameterKind.REQUIRED; |
| 7800 } | 7800 } |
| 7801 | 7801 |
| 7802 @override | 7802 @override |
| 7803 bool get inheritsCovariant { |
| 7804 PropertyInducingElement variable = setter.variable; |
| 7805 if (variable is FieldElementImpl && variable._unlinkedVariable != null) { |
| 7806 return enclosingUnit.resynthesizerContext |
| 7807 .inheritsCovariant(variable._unlinkedVariable.inheritsCovariantSlot); |
| 7808 } |
| 7809 return super.inheritsCovariant; |
| 7810 } |
| 7811 |
| 7812 @override |
| 7803 bool get isCovariant { | 7813 bool get isCovariant { |
| 7804 if (isExplicitlyCovariant || inheritsCovariant) { | 7814 if (isExplicitlyCovariant || inheritsCovariant) { |
| 7805 return true; | 7815 return true; |
| 7806 } | 7816 } |
| 7807 for (ElementAnnotationImpl annotation in setter.variable.metadata) { | 7817 for (ElementAnnotationImpl annotation in setter.variable.metadata) { |
| 7808 if (annotation.isCovariant) { | 7818 if (annotation.isCovariant) { |
| 7809 return true; | 7819 return true; |
| 7810 } | 7820 } |
| 7811 } | 7821 } |
| 7812 return false; | 7822 return false; |
| (...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9041 | 9051 |
| 9042 @override | 9052 @override |
| 9043 void visitElement(Element element) { | 9053 void visitElement(Element element) { |
| 9044 int offset = element.nameOffset; | 9054 int offset = element.nameOffset; |
| 9045 if (offset != -1) { | 9055 if (offset != -1) { |
| 9046 map[offset] = element; | 9056 map[offset] = element; |
| 9047 } | 9057 } |
| 9048 super.visitElement(element); | 9058 super.visitElement(element); |
| 9049 } | 9059 } |
| 9050 } | 9060 } |
| OLD | NEW |