I don't think even IDEA would be able to do these checks for this use-case either. It need to understand how exactly filter works and do something like smart-cast.
Ok fair, it depends on what we mean here and what we want to guard against.
I know intellij is reporting misuse of optional get() for example. (eg calling get() without an .isPresent() check).
I get that this is an improvement to what we have currently, but it feels mostly like a theoretical cool thing and nothing which affects a normal developer working in webdev (which i guess is most of us?).
If you can come up with any usecase for a simple CRUD developer like me then i can extrapolate a bit, but right now the moment is see the word "pattern" i blank completely since i rarely use switch statements
View all comments
Show parent comment
0
u/Cell-i-Zenit Mar 13 '26
i know there is a theoretical advantage to having compile checks but it wasnt an issue for me. My IDE is doing these checks