@@ -628,23 +628,23 @@ class ClassFragmentImpl extends ClassOrMixinFragmentImpl
628628 _constructors = constructorsToForward
629629 .map ((superclassConstructor) {
630630 var name = superclassConstructor.name2;
631- var implicitConstructor = ConstructorFragmentImpl (
631+ var implicitConstructorFragment = ConstructorFragmentImpl (
632632 name2: name,
633633 nameOffset: - 1 ,
634634 );
635- implicitConstructor .isSynthetic = true ;
636- implicitConstructor .typeName = name2;
635+ implicitConstructorFragment .isSynthetic = true ;
636+ implicitConstructorFragment .typeName = name2;
637637
638638 var containerRef = reference! .getChild ('@constructor' );
639639 var referenceName = name.ifNotEmptyOrElse ('new' );
640640 var implicitReference = containerRef.getChild (referenceName);
641- implicitConstructor .reference = implicitReference;
642- implicitReference.element = implicitConstructor ;
641+ implicitConstructorFragment .reference = implicitReference;
642+ implicitReference.element = implicitConstructorFragment ;
643643
644644 var hasMixinWithInstanceVariables = mixins.any (
645645 typeHasInstanceVariables,
646646 );
647- implicitConstructor .isConst =
647+ implicitConstructorFragment .isConst =
648648 superclassConstructor.isConst && ! hasMixinWithInstanceVariables;
649649 var superParameters = superclassConstructor.parameters;
650650 int count = superParameters.length;
@@ -696,11 +696,12 @@ class ClassFragmentImpl extends ClassOrMixinFragmentImpl
696696 ..setPseudoExpressionStaticType (implicitParameter.type),
697697 );
698698 }
699- implicitConstructor.parameters = implicitParameters.toFixedList ();
699+ implicitConstructorFragment.parameters =
700+ implicitParameters.toFixedList ();
700701 }
701- implicitConstructor .enclosingElement3 = this ;
702+ implicitConstructorFragment .enclosingElement3 = this ;
702703 // TODO(scheglov): Why do we manually map parameters types above?
703- implicitConstructor .superConstructor = ConstructorMember .from (
704+ implicitConstructorFragment .superConstructor = ConstructorMember .from (
704705 superclassConstructor,
705706 superType,
706707 );
@@ -727,9 +728,17 @@ class ClassFragmentImpl extends ClassOrMixinFragmentImpl
727728 );
728729 AstNodeImpl .linkNodeTokens (superInvocation);
729730 superInvocation.element = superclassConstructor.asElement2;
730- implicitConstructor.constantInitializers = [superInvocation];
731+ implicitConstructorFragment.constantInitializers = [superInvocation];
732+
733+ ConstructorElementImpl2 (
734+ name3: implicitConstructorFragment.name2,
735+ reference: element.reference
736+ .getChild ('@constructor' )
737+ .getChild (name),
738+ firstFragment: implicitConstructorFragment,
739+ );
731740
732- return implicitConstructor ;
741+ return implicitConstructorFragment ;
733742 })
734743 .toList (growable: false );
735744 }
@@ -814,13 +823,23 @@ class ConstructorElementImpl2 extends ExecutableElementImpl2
814823 ConstructorElementMixin2 ,
815824 _HasSinceSdkVersionMixin
816825 implements ConstructorElement {
826+ @override
827+ final Reference reference;
828+
817829 @override
818830 final String ? name3;
819831
820832 @override
821833 final ConstructorFragmentImpl firstFragment;
822834
823- ConstructorElementImpl2 (this .name3, this .firstFragment);
835+ ConstructorElementImpl2 ({
836+ required this .name3,
837+ required this .reference,
838+ required this .firstFragment,
839+ }) {
840+ reference.element2 = this ;
841+ firstFragment.element = this ;
842+ }
824843
825844 @override
826845 ConstructorElementImpl2 get baseElement => this ;
@@ -992,10 +1011,7 @@ mixin ConstructorElementMixin2
9921011class ConstructorFragmentImpl extends ExecutableFragmentImpl
9931012 with ConstructorElementMixin
9941013 implements ConstructorFragment {
995- late final ConstructorElementImpl2 element = ConstructorElementImpl2 (
996- name2,
997- this ,
998- );
1014+ late final ConstructorElementImpl2 element;
9991015
10001016 /// The super-constructor which this constructor is invoking, or `null` if
10011017 /// this constructor is not generative, or is redirecting, or the
0 commit comments