@@ -2545,7 +2545,6 @@ class ElementAnnotationImpl implements ElementAnnotation {
25452545 }
25462546}
25472547
2548- /// A base class for concrete implementations of an [Element] or [Element2] .
25492548abstract class ElementImpl implements Element , ElementOrMember {
25502549 static const _metadataFlag_isReady = 1 << 0 ;
25512550 static const _metadataFlag_hasDeprecated = 1 << 1 ;
@@ -2628,8 +2627,8 @@ abstract class ElementImpl implements Element, ElementOrMember {
26282627 ElementImpl ? get enclosingElement3 => _enclosingElement3;
26292628
26302629 /// Set the enclosing element of this element to the given [element] .
2631- set enclosingElement3 (Element ? element) {
2632- _enclosingElement3 = element as ElementImpl ? ;
2630+ set enclosingElement3 (ElementImpl ? element) {
2631+ _enclosingElement3 = element;
26332632 }
26342633
26352634 /// Return the enclosing unit element (which might be the same as `this` ), or
@@ -3084,9 +3083,8 @@ abstract class ElementImpl implements Element, ElementOrMember {
30843083 }
30853084
30863085 /// Set this element as the enclosing element for given [elements] .
3087- void encloseElements (List <Element > elements) {
3088- for (Element element in elements) {
3089- element as ElementImpl ;
3086+ void encloseElements (List <ElementImpl > elements) {
3087+ for (var element in elements) {
30903088 element._enclosingElement3 = this ;
30913089 }
30923090 }
@@ -3399,11 +3397,11 @@ class ElementLocationImpl implements ElementLocation {
33993397 late final List <String > _components;
34003398
34013399 /// Initialize a newly created location to represent the given [element] .
3402- ElementLocationImpl .con1 (Element element) {
3400+ ElementLocationImpl .con1 (ElementImpl element) {
34033401 List <String > components = < String > [];
3404- Element ? ancestor = element;
3402+ ElementImpl ? ancestor = element;
34053403 while (ancestor != null ) {
3406- components.insert (0 , ( ancestor as ElementImpl ) .identifier);
3404+ components.insert (0 , ancestor.identifier);
34073405 if (ancestor is CompilationUnitElementImpl ) {
34083406 components.insert (0 , ancestor.library.identifier);
34093407 break ;
@@ -3502,8 +3500,8 @@ class ElementLocationImpl implements ElementLocation {
35023500 }
35033501}
35043502
3505- /// A shared internal interface of [ Element] and [Member] .
3506- /// Used during migration to avoid referencing [ Element] .
3503+ /// A shared internal interface of ` Element` and [Member] .
3504+ /// Used during migration to avoid referencing ` Element` .
35073505abstract class ElementOrMember {}
35083506
35093507/// An [InterfaceElementImpl] which is an enum.
@@ -7873,7 +7871,7 @@ class LocalVariableElementImpl extends NonParameterVariableElementImpl
78737871 Fragment get enclosingFragment => enclosingElement3 as Fragment ;
78747872
78757873 set enclosingFragment (Fragment value) {
7876- enclosingElement3 = value as Element ;
7874+ enclosingElement3 = value as ElementImpl ;
78777875 }
78787876
78797877 @override
@@ -8733,7 +8731,7 @@ enum Modifier {
87338731 /// but is used as a library.
87348732 HAS_PART_OF_DIRECTIVE ,
87358733
8736- /// Indicates that the value of [Element .sinceSdkVersion] was computed.
8734+ /// Indicates that the value of [ElementImpl .sinceSdkVersion] was computed.
87378735 HAS_SINCE_SDK_VERSION_COMPUTED ,
87388736
87398737 /// [HAS_SINCE_SDK_VERSION_COMPUTED] and the value was not `null` .
0 commit comments