-
Notifications
You must be signed in to change notification settings - Fork 492
Open
Description
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.