summaryrefslogtreecommitdiff
path: root/plugins/InspectionGadgets/test/com/siyeh/igtest/abstraction/weaken_type/TypeMayBeWeakened.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/InspectionGadgets/test/com/siyeh/igtest/abstraction/weaken_type/TypeMayBeWeakened.java')
-rw-r--r--plugins/InspectionGadgets/test/com/siyeh/igtest/abstraction/weaken_type/TypeMayBeWeakened.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/abstraction/weaken_type/TypeMayBeWeakened.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/abstraction/weaken_type/TypeMayBeWeakened.java
index 370aba53a19c..a134fcd8d9fb 100644
--- a/plugins/InspectionGadgets/test/com/siyeh/igtest/abstraction/weaken_type/TypeMayBeWeakened.java
+++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/abstraction/weaken_type/TypeMayBeWeakened.java
@@ -162,4 +162,15 @@ class Test implements Foo2 {
interface Foo {
void bar();
}
-interface Foo2 extends Foo {} \ No newline at end of file
+interface Foo2 extends Foo {}
+class Helper {
+
+ void foo() {
+ class A<T> {
+ void foo() {}
+ }
+ class B<T> extends A<T> {}
+ B<String> <warning descr="Type of variable 'b' may be weakened to 'A'">b</warning> = new B();
+ b.foo();
+ }
+} \ No newline at end of file