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

Catch block parameters are not highlighted #4320

Closed
navaronbracke opened this issue Dec 23, 2022 · 1 comment
Closed

Catch block parameters are not highlighted #4320

navaronbracke opened this issue Dec 23, 2022 · 1 comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone

Comments

@navaronbracke
Copy link

navaronbracke commented Dec 23, 2022

Describe the bug
Syntax highlighting for the catch block parameters is broken.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new file, i.e. catch.dart and paste in the code sample
try {
 // do something
} catch (error, stackTrace) {
 // handle error
}
  1. Open the file in VSCode
  2. The error and stackTrace arguments are not highlighted, so they look the same as a dynamic foo = 42; variable would look.
  3. Type inference does not work either when hovering over either error or stackTrace, even though we know that error is an Object and stackTrace is a StackTrace

Expected behavior
I expect that the error and stackTrace arguments get highlighted in blue. When hovering over either error or stackTrace, the tooltip should display the proper type.

Screenshots
Screenshot 2022-12-23 at 19 47 30

Please complete the following information:

  • Operating System and version: macOS 12.2.1 21D62 darwin-x64
  • VS Code version: 1.74.1
  • Dart extension version: v3.56.0
  • Dart/Flutter SDK version: Dart 2.19.0-444.1.beta | Flutter 3.7.0-1.1.pre (beta)
  • Target device (if the issue relates to Flutter debugging): N/A
@DanTup DanTup added this to the v3.58.0 milestone Jan 4, 2023
@DanTup DanTup added in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available labels Jan 4, 2023
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Jan 4, 2023
… clauses

Fixes Dart-Code/Dart-Code#4320.

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

DanTup commented Jan 4, 2023

Fixed by dart-lang/sdk@792aede. This change is in the Dart analysis server so will ship with a future Dart/Flutter SDK release rather than show up in the VS Code extension release.

@DanTup DanTup closed this as completed Jan 4, 2023
@DanTup DanTup modified the milestones: v3.58.0, v3.60.0 Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Projects
None yet
Development

No branches or pull requests

2 participants