flutter / flutter/flutter-intellij
Using record types as generics breaks hot reloading
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
## Steps to Reproduce
When using darts record types as generics, hot reloading will fail with the warning
`Reload not performed Analysis issues found (view issues)`
Clicking the `view issues` button will show zero issues in the project.
[Here](https://github.com/flutter/flutter-intellij/files/12671550/main.zip) is an archive of a dart file that will always fail to hot reload. The line causing this problem is 34:
```dart
Future<(int, int)> _problematicFuture = Future(() => (1,2),);
```
Removing the generic part of the Future declaration to change the line to this:
```dart
Future _problematicFuture = Future(() => (1,2),);
```
will immediately fix the problem.
## Version info
Dart plugin 232.9559.10
Flutter plugin 75.1.4
```
❯ flutter doctor -v
[✓] Flutter (Channel stable, 3.13.3, on Arch Linux 6.5.3-arch1-1, locale en_US.UTF-8)
• Flutter version 3.13.3 on channel stable at /opt/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2524052335 (2 weeks ago), 2023-09-06 14:32:31 -0700
• Engine revision b8d35810e9
• Dart version 3.1.1
• DevTools version 2.25.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /home/nils/Android/Sdk
• Platform android-33, build-tools 33.0.1
• Java binary at: /home/nils/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• clang version 16.0.6
• cmake version 3.27.5
• ninja version 1.11.1
• pkg-config version 1.8.1
[✓] Android Studio (version 2022.3)
• Android Studio at /home/nils/.local/share/JetBrains/Toolbox/apps/android-studio
• Flutter plugin version 75.1.2
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Arch Linux 6.5.3-arch1-1
• Chrome (web) • chrome • web-javascript • Chromium 117.0.5938.88 Arch Linux
[✓] Network resources
• All expected network resources are available.
• No issues found!
```
Contributor guide
Assessment
This issue has not been assessed yet.