Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete for overriding members does not appear in all lines within an extended Class #3784

Closed
osaxma opened this issue Jan 15, 2022 · 1 comment
Labels
in lsp/analysis server Something to be fixed in the Dart analysis server is bug
Milestone

Comments

@osaxma
Copy link

osaxma commented Jan 15, 2022

Describe the bug
Not sure if this is a bug or if it's based on the style guide of how members should be sorted.

class _SomeStatefulWidgetState extends State<SomeStatefulWidget> {
  
  // ❌ autocomplete for override does not work here
 
  String value1 = '';

  // ❌ autocomplete for override does not work here
  
  String get value2 => '';

  // ✅ autocomplete for override works here 

  void method() {}
  
  // ✅ autocomplete for override works here 


  @override
  Widget build(BuildContext context) {
    return Container();
  }

  // ✅  autocomplete for override works here

}

To Reproduce
The code sample above and the screen recording below should have reproduction steps.

Expected behavior
I expect autocomplete to work anywhere within the class for overriding members.

Screenshots

Screen.Recording.2022-01-15.at.9.51.48.PM.mov

Versions:

  • VS Code version: 1.63.2
  • Dart extension version: 3.32.0
  • Dart/Flutter SDK version:
Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (4 weeks ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1

Additional Context
This could be another issue but with dart code:

import 'package:analyzer/dart/ast/visitor.dart';

class SomeClass extends SimpleAstVisitor {
  // auto complete does not work here
}

Though it worked later when after adding the following import:

import 'package:analyzer/dart/ast/ast.dart';
@osaxma osaxma added the is bug label Jan 15, 2022
@DanTup DanTup added this to the v3.34.0 milestone Jan 17, 2022
@DanTup DanTup added the in lsp/analysis server Something to be fixed in the Dart analysis server label Jan 17, 2022
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Jan 18, 2022
Fixes Dart-Code/Dart-Code#3784.

Change-Id: I422f7758f0ae713a37c4b15672828ada67ce9d65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
@DanTup
Copy link
Member

DanTup commented Jan 18, 2022

Fixed by dart-lang/sdk@92da237. It's an SDK change so will show in a future SDK release rather than a Dart-Code release.

@DanTup DanTup closed this as completed Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in lsp/analysis server Something to be fixed in the Dart analysis server is bug
Projects
None yet
Development

No branches or pull requests

2 participants