IJ-CR-119726 [java-highlighting] S IDEA-306108 Assignment to a variable with non-denotable type: confusing error message

- fix for quickfix
- refactoring

GitOrigin-RevId: aedc118f2dd67bf56391792e7cd3042a8f7f33a8
This commit is contained in:
Mikhail Pyltsin
2024-01-25 14:37:04 +01:00
committed by intellij-monorepo-bot
parent 874e9d5be8
commit 82abbe2dbb
6 changed files with 75 additions and 62 deletions

View File

@@ -0,0 +1,10 @@
class TypeObjectWithAnotherInitializer {
class X {}
class Y {
public void main(String[] args) {
var x = new X() {};
<error descr="Incompatible types. Found: 'TypeObjectWithAnotherInitializer.Y', required: 'anonymous TypeObjectWithAnotherInitializer.X'">x = new Y()</error>;
}
}
}