mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
redundant cast: ensure cast type compared with ground type (IDEA-174369)
remove attempts to emulate that and reuse getGroundTargetType api
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
interface A8<A1, A2> {
|
||||
A2 a(A1 a1);
|
||||
}
|
||||
|
||||
interface B<B1, B2> {
|
||||
B2 b(B1 b1);
|
||||
}
|
||||
|
||||
class Bug {
|
||||
<T1, T2> void bug(B<T1, T2> b) {
|
||||
Map<String, A8<?, T2>> m = new HashMap<>();
|
||||
// replace with lambda here
|
||||
m.put("", (A8<T1, T2>) t1 -> b.b(t1));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user