File tree Expand file tree Collapse file tree 5 files changed +15
-10
lines changed Expand file tree Collapse file tree 5 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -9151,6 +9151,9 @@ class PrefixFragmentImpl implements PrefixFragment {
91519151 @override
91529152 int nameOffset;
91539153
9154+ @override
9155+ FragmentNameImpl name2;
9156+
91549157 @override
91559158 final bool isDeferred;
91569159
@@ -9167,6 +9170,7 @@ class PrefixFragmentImpl implements PrefixFragment {
91679170 required this .enclosingFragment,
91689171 required this .name,
91699172 required this .nameOffset,
9173+ required this .name2,
91709174 required this .isDeferred,
91719175 });
91729176
@@ -9175,14 +9179,6 @@ class PrefixFragmentImpl implements PrefixFragment {
91759179
91769180 @override
91779181 CompilationUnitElementImpl get libraryFragment => enclosingFragment;
9178-
9179- @override
9180- FragmentName ? get name2 {
9181- return FragmentNameImpl (
9182- name: name,
9183- nameOffset: nameOffset,
9184- );
9185- }
91869182}
91879183
91889184abstract class PromotableElementImpl2 extends VariableElementImpl2
Original file line number Diff line number Diff line change @@ -1325,6 +1325,7 @@ class LibraryReader {
13251325 enclosingFragment: libraryFragment,
13261326 name: name,
13271327 nameOffset: - 1 ,
1328+ name2: FragmentNameImpl (name: name, nameOffset: - 1 ),
13281329 isDeferred: isDeferred,
13291330 );
13301331
Original file line number Diff line number Diff line change @@ -665,7 +665,10 @@ class InformativeDataApplier {
665665 }
666666 }
667667
668- element.prefix2? .nameOffset = info.prefixOffset;
668+ if (element.prefix2 case var prefixFragment? ) {
669+ prefixFragment.nameOffset = info.prefixOffset;
670+ prefixFragment.name2.nameOffset = info.prefixOffset;
671+ }
669672 _applyToCombinators (element.combinators, info.combinators);
670673 },
671674 );
Original file line number Diff line number Diff line change @@ -1203,6 +1203,10 @@ class LibraryBuilder with MacroApplicationsContainer {
12031203 var fragment = PrefixFragmentImpl (
12041204 enclosingFragment: libraryFragment,
12051205 name: name,
1206+ name2: FragmentNameImpl (
1207+ name: name,
1208+ nameOffset: nameOffset,
1209+ ),
12061210 nameOffset: nameOffset,
12071211 isDeferred: isDeferred,
12081212 );
Original file line number Diff line number Diff line change @@ -1579,7 +1579,8 @@ class _Element2Writer extends _AbstractElementWriter {
15791579 _sink.write ('fragments: ' );
15801580 _sink.write (e.fragments.map ((f) {
15811581 expect (f.element, same (e));
1582- return '@${f .nameOffset }' ;
1582+ expect (f.name2.name, e.name);
1583+ return '@${f .name2 .nameOffset }' ;
15831584 }).join (' ' ));
15841585 });
15851586 });
You can’t perform that action at this time.
0 commit comments