No usages found for enum despite being used
See original GitHub issueWhen using an enum the usage will not be reported when showing usage for type (CTRL + Click).
Steps to Reproduce
flutter create bug
- Create a simple enum in a sperate file
enum Test{First, Second, Third}
- Reference one of the enum values in
main.dart
likeprint(Test.First)
- Showing usages for
Test
showsNo usages found
.
Version info
[√] Flutter (Channel stable, 1.20.4, on Microsoft Windows [Version 10.0.18363.1082], locale en-DE)
• Flutter version 1.20.4 at D:\dev\flutter\sdk
• Framework revision fba99f6cf9 (10 days ago), 2020-09-14 15:32:52 -0700
• Engine revision d1bc06f032
• Dart version 2.9.2
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\User\AppData\Local\Android\sdk
• Platform android-30, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Find usages for enums via Ctrl + left in IntelliJ - Stack Overflow
In the editor, select a symbol for which you want to see the usages. From the main menu, select Edit | Find |...
Read more >Allow importing both type entity and value entity for "const ...
I can use import type to import pure types without impacting bundle size, but that completely excludes us from being able to use...
Read more >enum — Support for enumerations — Python 3.11.1 ...
Allows Enum members to have attributes without conflicting with member names. unique(). Enum class decorator that ensures only one name is bound to...
Read more >Handbook - Enums - TypeScript
Ambient enums are used to describe the shape of already existing enum types. ... One important difference between ambient and non-ambient enums is...
Read more >PHP 8.1: Enums
Although Enums allow methods declared on them, declaring a method with name cases is not allowed: enum Foo { public function cases(): array{}...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://dart-review.googlesource.com/c/sdk/+/164363
@lzhuor - thanks for the inquiry about a cherry pick. We’re cautious about cherry-picks into our stable releases as they can themselves introduce instability. I think in this instance - while the behavior is incorrect - it doesn’t rise to the level of a cherry pick. An example of something that might would be an issue that prevented all find references operations from working.