mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] warn on non-instantiatable intersection types (IDEA-277529)
extend for any context GitOrigin-RevId: d6f499348c8278bcb58951900ebf116440719082
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c752c69914
commit
1f0f1acfbc
+1
-1
@@ -4,7 +4,7 @@ class Test {
|
||||
}
|
||||
|
||||
{
|
||||
String m <warning descr="Though assignment is formal correct, it could lead to ClassCastException at runtime. Expected: 'String', actual: 'Runnable & String'">=</warning> f();
|
||||
String m = <warning descr="Intersection type 'Runnable & String' cannot be instantiated, because 'java.lang.String' is final">f</warning>();
|
||||
System.out.println(m);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user