Skip to content

Commit 25eb1a3

Browse files
author
Matthias Güdemann
committed
Add unit test for implicitly generic super class
1 parent a72f52a commit 25eb1a3

11 files changed

+89
-0
lines changed
Binary file not shown.

unit/java_bytecode/java_bytecode_parse_generics/DerivedGenerics.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public class DerivedGenerics {
1515
ExtendsAndImplementsSameInterface new14;
1616
ExtendsAndImplementsSameInterface2 new15;
1717
ExtendsAndImplementsSameInterfaceGeneric new16;
18+
GenericBase<?>.ExtendImplicit new17;
19+
GenericBase<?>.ExtendImplicitAndExplicit<?> new18;
20+
GenericBase2<?, ?>.ExtendImplicitAndExplicit new19;
1821
}
1922

2023
class DerivedGenericInst extends Generic<Interface_Implementation>
@@ -189,3 +192,25 @@ public Class<? extends Class> someMethod(){
189192
return null;
190193
}
191194
}
195+
196+
// This class exists to test that subclasses of implicit generic classes have a
197+
// base class entry which is a Java generic symbol.
198+
class GenericBase<T> {
199+
class ImplicitGeneric {
200+
}
201+
class ExtendImplicit extends ImplicitGeneric {
202+
}
203+
class ImplicitAndExplicitGeneric<S> {
204+
}
205+
class ExtendImplicitAndExplicit<S> extends ImplicitAndExplicitGeneric<S> {
206+
}
207+
}
208+
209+
// This class exists to test the subclasses of generic and implicitly generic
210+
// classes have a base class entry which is a Java generic symbol.
211+
class GenericBase2<T, S> {
212+
class ImplicitAndExplicitGeneric<S> {
213+
}
214+
class ExtendImplicitAndExplicit extends ImplicitAndExplicitGeneric<S> {
215+
}
216+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)