@@ -9648,6 +9648,8 @@ class TypeAliasElementImpl extends TypeDefiningElementImpl
96489648 @override
96499649 final TypeAliasFragmentImpl firstFragment;
96509650
9651+ TypeImpl ? _aliasedType;
9652+
96519653 TypeAliasElementImpl (this .reference, this .firstFragment) {
96529654 reference.element = this ;
96539655 firstFragment.element = this ;
@@ -9671,14 +9673,19 @@ class TypeAliasElementImpl extends TypeDefiningElementImpl
96719673 }
96729674
96739675 @override
9674- TypeImpl get aliasedType => firstFragment.aliasedType;
9676+ TypeImpl get aliasedType {
9677+ _ensureReadResolution ();
9678+ return _aliasedType! ;
9679+ }
96759680
9676- set aliasedType (TypeImpl value) {
9677- firstFragment.aliasedType = value;
9681+ set aliasedType (DartType rawType) {
9682+ // TODO(paulberry): eliminate this cast by changing the type of the
9683+ // `rawType` parameter.
9684+ _aliasedType = rawType as TypeImpl ;
96789685 }
96799686
96809687 /// The aliased type, might be `null` if not yet linked.
9681- TypeImpl ? get aliasedTypeRaw => firstFragment.aliasedTypeRaw ;
9688+ TypeImpl ? get aliasedTypeRaw => _aliasedType ;
96829689
96839690 @override
96849691 TypeAliasElementImpl get baseElement => this ;
@@ -9889,7 +9896,6 @@ class TypeAliasFragmentImpl extends _ExistingFragmentImpl
98899896 bool isFunctionTypeAliasBased = false ;
98909897
98919898 FragmentImpl ? _aliasedElement;
9892- TypeImpl ? _aliasedType;
98939899
98949900 @override
98959901 late TypeAliasElementImpl element;
@@ -9914,25 +9920,6 @@ class TypeAliasFragmentImpl extends _ExistingFragmentImpl
99149920 return _aliasedElement;
99159921 }
99169922
9917- /// The aliased type.
9918- ///
9919- /// If non-function type aliases feature is enabled for the enclosing library,
9920- /// this type might be just anything. If the feature is disabled, return
9921- /// a [FunctionType] .
9922- TypeImpl get aliasedType {
9923- _ensureReadResolution ();
9924- return _aliasedType! ;
9925- }
9926-
9927- set aliasedType (DartType rawType) {
9928- // TODO(paulberry): eliminate this cast by changing the type of the
9929- // `rawType` parameter.
9930- _aliasedType = rawType as TypeImpl ;
9931- }
9932-
9933- /// The aliased type, might be `null` if not yet linked.
9934- TypeImpl ? get aliasedTypeRaw => _aliasedType;
9935-
99369923 @override
99379924 List <Fragment > get children => const [];
99389925
0 commit comments