We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc13a2f commit cf0954aCopy full SHA for cf0954a
lib/src/front_end/piece_factory.dart
@@ -627,8 +627,8 @@ mixin PieceFactory {
627
// @meta
628
// // Weird place for comment.
629
// int f() {}
630
- var firstToken = modifiers.firstWhereOrNull((token) => token != null) ??
631
- returnType.firstNonCommentToken;
+ var firstToken =
+ modifiers.nonNulls.firstOrNull ?? returnType.firstNonCommentToken;
632
var leadingComments = pieces.takeCommentsBefore(firstToken);
633
634
var returnTypePiece = pieces.build(() {
0 commit comments