File tree Expand file tree Collapse file tree 5 files changed +8
-19
lines changed Expand file tree Collapse file tree 5 files changed +8
-19
lines changed Original file line number Diff line number Diff line change @@ -3779,11 +3779,6 @@ sealed class FunctionFragmentImpl extends ExecutableFragmentImpl
3779
3779
/// [offset] .
3780
3780
FunctionFragmentImpl ({required this .name, required super .firstTokenOffset});
3781
3781
3782
- /// Initialize a newly created function element to have no name and the given
3783
- /// [nameOffset] . This is used for function expressions, that have no name.
3784
- FunctionFragmentImpl .forOffset ({required super .firstTokenOffset})
3785
- : name = null ;
3786
-
3787
3782
@override
3788
3783
ExecutableFragmentImpl get declaration => this ;
3789
3784
}
@@ -3936,7 +3931,7 @@ class GenericFunctionTypeFragmentImpl extends FragmentImpl
3936
3931
3937
3932
/// Initialize a newly created function element to have no name and the given
3938
3933
/// [nameOffset] . This is used for function expressions, that have no name.
3939
- GenericFunctionTypeFragmentImpl . forOffset ({required super .firstTokenOffset});
3934
+ GenericFunctionTypeFragmentImpl ({required super .firstTokenOffset});
3940
3935
3941
3936
@override
3942
3937
List <Fragment > get children => [...typeParameters, ...parameters];
@@ -6842,9 +6837,6 @@ class LocalFunctionFragmentImpl extends FunctionFragmentImpl
6842
6837
required super .firstTokenOffset,
6843
6838
});
6844
6839
6845
- LocalFunctionFragmentImpl .forOffset ({required super .firstTokenOffset})
6846
- : super .forOffset ();
6847
-
6848
6840
@override
6849
6841
bool get _includeNameOffsetInIdentifier {
6850
6842
return super ._includeNameOffsetInIdentifier ||
Original file line number Diff line number Diff line change @@ -786,7 +786,8 @@ class ResolutionVisitor extends RecursiveAstVisitor<void> {
786
786
787
787
@override
788
788
void visitFunctionExpression (covariant FunctionExpressionImpl node) {
789
- var fragment = LocalFunctionFragmentImpl .forOffset (
789
+ var fragment = LocalFunctionFragmentImpl (
790
+ name: null ,
790
791
firstTokenOffset: node.offset,
791
792
);
792
793
@@ -901,7 +902,7 @@ class ResolutionVisitor extends RecursiveAstVisitor<void> {
901
902
902
903
@override
903
904
void visitGenericFunctionType (GenericFunctionType node) {
904
- var fragment = GenericFunctionTypeFragmentImpl . forOffset (
905
+ var fragment = GenericFunctionTypeFragmentImpl (
905
906
firstTokenOffset: node.offset,
906
907
);
907
908
_unitElement.encloseElement (fragment);
Original file line number Diff line number Diff line change @@ -694,9 +694,7 @@ class AstBinaryReader {
694
694
var type = _reader.readRequiredType () as FunctionTypeImpl ;
695
695
node.type = type;
696
696
697
- var fragment = GenericFunctionTypeFragmentImpl .forOffset (
698
- firstTokenOffset: null ,
699
- );
697
+ var fragment = GenericFunctionTypeFragmentImpl (firstTokenOffset: null );
700
698
fragment.parameters =
701
699
formalParameters.parameters
702
700
.map ((parameter) => parameter.declaredFragment! )
Original file line number Diff line number Diff line change @@ -1714,7 +1714,7 @@ class ResolutionReader {
1714
1714
_localElements.length -= typeParameters.length;
1715
1715
1716
1716
var fragment =
1717
- GenericFunctionTypeFragmentImpl . forOffset (firstTokenOffset: null )
1717
+ GenericFunctionTypeFragmentImpl (firstTokenOffset: null )
1718
1718
..typeParameters = typeParameters
1719
1719
..parameters = formalParameters
1720
1720
..returnType = returnType;
Original file line number Diff line number Diff line change @@ -1414,7 +1414,7 @@ class FragmentBuilder extends ThrowingAstVisitor<void> {
1414
1414
node.parameters.accept (this );
1415
1415
});
1416
1416
1417
- var aliasedElement = GenericFunctionTypeFragmentImpl . forOffset (
1417
+ var aliasedElement = GenericFunctionTypeFragmentImpl (
1418
1418
firstTokenOffset: null ,
1419
1419
);
1420
1420
aliasedElement.parameters = holder.parameters;
@@ -1470,9 +1470,7 @@ class FragmentBuilder extends ThrowingAstVisitor<void> {
1470
1470
1471
1471
@override
1472
1472
void visitGenericFunctionType (covariant GenericFunctionTypeImpl node) {
1473
- var fragment = GenericFunctionTypeFragmentImpl .forOffset (
1474
- firstTokenOffset: null ,
1475
- );
1473
+ var fragment = GenericFunctionTypeFragmentImpl (firstTokenOffset: null );
1476
1474
_unitElement.encloseElement (fragment);
1477
1475
1478
1476
node.declaredFragment = fragment;
You can’t perform that action at this time.
0 commit comments