redhat-developer / redhat-developer/vscode-java
instanceof pattern inside lambda causes issues.
オープン
まだ誰も着手していません。
content-assist
upstream
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
Using instanceof pattern inside of lambdas breaks multiple features. Examples:
- hovering over elements stops showing the signature
- Renaming from inside the method with the pattern pops an internal error (https://pastebin.com/iTZDjVq0)
- Attempting to Go To Definition of a field or method doesn't work inside the method with the pattern
- Sometime intellisense stops suggesting things
Environment
- Operating System: Windows 10 PRO 1909
- JDK version: Graalvm Java 16 21.1.0
- Visual Studio Code version: 1.59.1(2021-08-19)
- Java extension version: v0.81.0
[Please attach a sample project reproducing the error]
public class Test {
public static final void bug() {
Optional.empty().ifPresent(o-> {
if(o instanceof byte[] array) {
Object local = null;
}
});
}
}
https://pastebin.com/iTZDjVq0
https://pastebin.com/bc7rGyfE
Additional Informations
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、指定された Java extension を使用して提供された Java サンプルを VS Code で開き、hovering、rename、Go To Definition、IntelliSense の失敗を再現します。リンクされた troubleshooting ガイドを使用して Java extension logs を有効にし、リンクされた 2 つの pastebin と動作を比較します。lambda で使用されている instanceof パターン内でこれらの言語機能が動作すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript
- 領域
- developer-experience, devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100