mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
warn about compilable code which would lead to runtime ClassCastException in addition to unchecked warning which nobody understands (IDEA-154345)
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
class Test {
|
||||
<S extends Runnable> S f() {
|
||||
return null;
|
||||
}
|
||||
|
||||
{
|
||||
String m <warning descr="Though assignment is formal correct, it could lead to ClassCastException at runtime. Expected: 'String', actual: 'Runnable & String'">=</warning> f();
|
||||
System.out.println(m);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user