flutter / flutter/flutter-intellij
Complex `if-pattern` breaks inspection in all branches.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
When I Cmd+B `timestamp.difference` in IntellijIdea, it says "Cannot find declaration to go to".
Hover on any token also doesn't work.
Removing `when` part makes everything inspectable again.
```dart
void main() {
DateTime? tapTimestamp;
if (tapTimestamp case final timestamp?
when timestamp.difference(DateTime.timestamp()).inMilliseconds < 300) {
} else {
tapTimestamp = DateTime.timestamp();
}
}
```
[✓] Flutter (Channel stable, 3.13.6, on macOS 14.0 23A344 darwin-arm64, locale en-RU)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.1)
[✓] VS Code (version 1.82.2)
[✓] Connected device (2 available)
[✓] Network resources
It's not reproducible in both VScode and DartPad
Contributor guide
Assessment
This issue has not been assessed yet.