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; } }); } } ``` [Please attach logs](https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting#enable-logging) https://pastebin.com/iTZDjVq0 https://pastebin.com/bc7rGyfE ##### Additional Informations
Activity
Nightenom commentedon Feb 14, 2023
Hi, any progress on this? its here 18 months without notice - is this upstream issue?
datho7561 commentedon Sep 9, 2026
Yeah, I think it's an upstream JDT issue. I think AST error recovery when lambdas are present needs to be significantly improved.