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://pastebin.com/iTZDjVq0
https://pastebin.com/bc7rGyfE
Additional Informations
Using instanceof pattern inside of lambdas breaks multiple features. Examples:
Environment
[Please attach a sample project reproducing the error]
Please attach logs
https://pastebin.com/iTZDjVq0
https://pastebin.com/bc7rGyfE
Additional Informations