@@ -306,6 +306,7 @@ class InformativeDataApplier {
306306 (element, info) {
307307 element as ConstructorElementImpl ;
308308 element.setCodeRange (info.codeOffset, info.codeLength);
309+ element.typeNameOffset = info.typeNameOffset;
309310 element.periodOffset = info.periodOffset;
310311 element.nameOffset = info.nameOffset;
311312 element.nameEnd = info.nameEnd;
@@ -462,6 +463,7 @@ class InformativeDataApplier {
462463 infoRep.constructorCodeOffset,
463464 infoRep.constructorCodeLength,
464465 );
466+ primaryConstructor.typeNameOffset = infoRep.typeNameOffset;
465467 primaryConstructor.periodOffset = infoRep.constructorPeriodOffset;
466468 primaryConstructor.nameOffset = infoRep.constructorNameOffset;
467469 primaryConstructor.nameEnd = infoRep.constructorNameEnd;
@@ -976,6 +978,7 @@ class _InfoCombinator {
976978class _InfoConstructorDeclaration {
977979 final int codeOffset;
978980 final int codeLength;
981+ final int ? typeNameOffset;
979982 final int ? periodOffset;
980983 final int nameOffset;
981984 final int ? nameEnd;
@@ -988,6 +991,7 @@ class _InfoConstructorDeclaration {
988991 return _InfoConstructorDeclaration ._(
989992 codeOffset: reader.readUInt30 (),
990993 codeLength: reader.readUInt30 (),
994+ typeNameOffset: reader.readUInt30 (),
991995 periodOffset: reader.readOptionalUInt30 (),
992996 nameOffset: reader.readUInt30 (),
993997 nameEnd: reader.readOptionalUInt30 (),
@@ -1003,6 +1007,7 @@ class _InfoConstructorDeclaration {
10031007 _InfoConstructorDeclaration ._({
10041008 required this .codeOffset,
10051009 required this .codeLength,
1010+ required this .typeNameOffset,
10061011 required this .periodOffset,
10071012 required this .nameOffset,
10081013 required this .nameEnd,
@@ -1092,6 +1097,7 @@ class _InfoExtensionTypeDeclaration {
10921097class _InfoExtensionTypeRepresentation {
10931098 final int constructorCodeOffset;
10941099 final int constructorCodeLength;
1100+ final int ? typeNameOffset;
10951101 final int ? constructorPeriodOffset;
10961102 final int constructorNameOffset;
10971103 final int ? constructorNameEnd;
@@ -1106,6 +1112,7 @@ class _InfoExtensionTypeRepresentation {
11061112 return _InfoExtensionTypeRepresentation ._(
11071113 constructorCodeOffset: reader.readUInt30 (),
11081114 constructorCodeLength: reader.readUInt30 (),
1115+ typeNameOffset: reader.readOptionalUInt30 (),
11091116 constructorPeriodOffset: reader.readOptionalUInt30 (),
11101117 constructorNameOffset: reader.readUInt30 (),
11111118 constructorNameEnd: reader.readOptionalUInt30 (),
@@ -1121,6 +1128,7 @@ class _InfoExtensionTypeRepresentation {
11211128 _InfoExtensionTypeRepresentation ._({
11221129 required this .constructorCodeOffset,
11231130 required this .constructorCodeLength,
1131+ required this .typeNameOffset,
11241132 required this .constructorPeriodOffset,
11251133 required this .constructorNameOffset,
11261134 required this .constructorNameEnd,
@@ -1650,6 +1658,7 @@ class _InformativeDataWriter {
16501658 sink.writeList2 <ConstructorDeclaration >(members, (node) {
16511659 sink.writeUInt30 (node.offset);
16521660 sink.writeUInt30 (node.length);
1661+ sink.writeUInt30 (node.returnType.offset);
16531662 sink.writeOptionalUInt30 (node.period? .offset);
16541663 var nameNode = node.name ?? node.returnType;
16551664 sink.writeUInt30 (nameNode.offset);
@@ -1903,9 +1912,10 @@ class _InformativeDataWriter {
19031912 // Constructor code range.
19041913 sink.writeUInt30 (node.offset);
19051914 sink.writeUInt30 (node.length);
1915+ sink.writeOptionalUInt30 (declaration.name.offsetIfNotEmpty);
19061916
19071917 var constructorName = node.constructorName;
1908- if (constructorName != null ) {
1918+ if (constructorName != null ) {
19091919 sink.writeOptionalUInt30 (constructorName.period.offset);
19101920 sink.writeUInt30 (constructorName.name.offset);
19111921 sink.writeOptionalUInt30 (constructorName.name.end);
0 commit comments