Skip to content

Sort members command deletes comment from import #2762

@gkrawiec

Description

@gkrawiec

On a .dart file, the comments to the right of an import get deleted when running the sort members command.

this is the minimal file with which I was able to reproduce it.

import '../a.dart'; //test
import '../b.dart';

after I run the Sort Members command the comment //test gets deleted.

If I only have a single import directive, the comment does NOT disappear. Only happens with 2 or more imports.

[✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.6 19G2021, locale en-US)
 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc4)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.48.2)

Let me know if you need any other info.
thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions