redhat-developer / redhat-developer/vscode-java
Unexpected type mismatch error for Either and Either.Right.
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
VSCode Version: 1.99.3
macOS: 26.0 (25A354)
Language Support for Java(TM) by Red Hat v1.45.0
Java Version: Zulu 17.60 (but I was able to repro on multiple versions
vs code won't build the project reporting the code issue as Type mismatch for Either vs Either.Right. Either.Right is a derived class from Either.
When building with mvn compile or with other IDEs this code works just fine.
Steps to Reproduce:
- Create a function
public <R> Mono<Either<Throwable, ResponseEntity<List<SimpleProductTileV2>>>> noOfferProductDetails(
BffRequestContext<R> requestContext) {
// No liam return empty list of products
return Mono.just(new Either.Right<>(new ResponseEntity<>(Collections.<SimpleProductTileV2>emptyList(), HttpStatus.OK)));
}
- Build
- Get error
Type mismatch: cannot convert from Mono<Either.Right<ResponseEntity<List<SimpleProductTileV2>>>> to Mono<Either<Throwable,ResponseEntity<List<SimpleProductTileV2>>>>
mvn compile works just fine
Looks like vs code compiler incorrectly decode Either.Right or something like that.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
一覧にある Java と Language Support for Java のバージョンを使用して、報告された Java スニペットを VS Code で再現し、その結果を mvn compile および他の IDE と比較します。このケースで、拡張機能が Mono<Either.Right<...>> と Mono<Either<...>> の間の型の不一致を報告しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100