HighlightControlFlowUtil: disable assignment to pattern variables

GitOrigin-RevId: 09c4aa42068ce0258543a17546404fcdec952404
This commit is contained in:
Tagir Valeev
2019-12-27 09:01:34 +00:00
committed by intellij-monorepo-bot
parent 3fc9bf9589
commit 2380906af8
3 changed files with 23 additions and 9 deletions
@@ -0,0 +1,7 @@
class X {
void expressions(Object obj) {
if (obj instanceof String s) {
<error descr="Cannot assign a value to final variable 's'">s</error> = "foo";
}
}
}