[java-highlighting] IDEA-306108 Assignment to a variable with non-denotable type: confusing error message and useless quick-fix

- add `anonymous` when it is not clear what type is used

GitOrigin-RevId: f3395a590fd4a48a5570fdf9ace540845e5f3879
This commit is contained in:
Mikhail Pyltsin
2023-11-13 17:04:45 +00:00
committed by intellij-monorepo-bot
parent 36f70b7235
commit 8adeaf3193
3 changed files with 82 additions and 15 deletions
@@ -0,0 +1,6 @@
class TypeObject {
void test() {
var x = new Object() {};
<error descr="Incompatible types. Found: 'java.lang.Object', required: 'anonymous java.lang.Object'">x = new Object()</error>;
}
}