Skip to content

Use imported library with prefix quick fix puts the prefix at the wrong position #4836

Closed

Description

@mosuem

Describe the bug
Use imported library with prefix quick fix puts the prefix at the wrong position.

To Reproduce

  1. Create new project
  2. Insert import 'dart:ffi' as ffi;
  3. Type @Native
  4. Get the quickfix Use imported library 'dart:ffi' with prefix 'ffi'
  5. The prefix ffi. is placed before the @, resulting in a syntax error

Expected behavior
5. Should be placed after the @

Please complete the following information:

Dart Code extension: 3.77.20231111
Flutter extension: 3.76.0 (activated)

App: Visual Studio Code
App Host: desktop
Version: linux 1.82.2

Workspace type: Dart (LSP)

Dart (3.3.0-edge.de9494ae0703ba877e967cf8c6f1083b0b3d5d60): /home/mosum/dart-sdk/sdk/out/ReleaseX64/dart-sdk

Activity

  1. added
    in editorRelates to code editing or language features
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    on Nov 14, 2023
  2. added this to the v3.78.0 milestone on Nov 14, 2023
  3. DanTup commented on Nov 14, 2023

    @DanTup
    Member
  4. DanTup commented on Nov 14, 2023

    @DanTup
    Member

    Fixed by dart-lang/sdk@467bd63. Ships in the SDK!

  5. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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 bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions