[tests] generic vararg decompilation test case (IDEA-204272)
This commit is contained in:
@@ -126,6 +126,7 @@ public class SingleClassesTest {
|
||||
@Test public void testPrivateClasses() { doTest("pkg/PrivateClasses"); }
|
||||
@Test public void testSuspendLambda() { doTest("pkg/TestSuspendLambdaKt"); }
|
||||
@Test public void testNamedSuspendFun2Kt() { doTest("pkg/TestNamedSuspendFun2Kt"); }
|
||||
@Test public void testGenericArgs() { doTest("pkg/TestGenericArgs"); }
|
||||
|
||||
private void doTest(String testFile, String... companionFiles) {
|
||||
ConsoleDecompiler decompiler = fixture.getDecompiler();
|
||||
|
||||
BIN
testData/classes/pkg/TestGenericArgs.class
Normal file
BIN
testData/classes/pkg/TestGenericArgs.class
Normal file
Binary file not shown.
55
testData/results/TestGenericArgs.dec
Normal file
55
testData/results/TestGenericArgs.dec
Normal file
@@ -0,0 +1,55 @@
|
||||
package pkg;
|
||||
|
||||
public class TestGenericArgs {
|
||||
private static <T> void genericSingle(Class<T> var0) {
|
||||
}// 4
|
||||
|
||||
private static <T> void genericVarArgs(Class<T>... var0) {
|
||||
}// 6
|
||||
|
||||
private static <T> void genericArray(Class<T>[] var0) {
|
||||
}// 8
|
||||
|
||||
private static <T> void single(Class var0) {
|
||||
}// 10
|
||||
|
||||
private static <T> void varArgs(Class... var0) {
|
||||
}// 12
|
||||
|
||||
private static <T> void array(Class[] var0) {
|
||||
}// 14
|
||||
}
|
||||
|
||||
class 'pkg/TestGenericArgs' {
|
||||
method 'genericSingle (Ljava/lang/Class;)V' {
|
||||
0 4
|
||||
}
|
||||
|
||||
method 'genericVarArgs ([Ljava/lang/Class;)V' {
|
||||
0 7
|
||||
}
|
||||
|
||||
method 'genericArray ([Ljava/lang/Class;)V' {
|
||||
0 10
|
||||
}
|
||||
|
||||
method 'single (Ljava/lang/Class;)V' {
|
||||
0 13
|
||||
}
|
||||
|
||||
method 'varArgs ([Ljava/lang/Class;)V' {
|
||||
0 16
|
||||
}
|
||||
|
||||
method 'array ([Ljava/lang/Class;)V' {
|
||||
0 19
|
||||
}
|
||||
}
|
||||
|
||||
Lines mapping:
|
||||
4 <-> 5
|
||||
6 <-> 8
|
||||
8 <-> 11
|
||||
10 <-> 14
|
||||
12 <-> 17
|
||||
14 <-> 20
|
||||
15
testData/src/pkg/TestGenericArgs.java
Normal file
15
testData/src/pkg/TestGenericArgs.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package pkg;
|
||||
|
||||
public class TestGenericArgs {
|
||||
private static <T> void genericSingle(Class<T> param) { }
|
||||
|
||||
private static <T> void genericVarArgs(Class<T>... param) { }
|
||||
|
||||
private static <T> void genericArray(Class<T>[] param) { }
|
||||
|
||||
private static <T> void single(Class param) { }
|
||||
|
||||
private static <T> void varArgs(Class... param) { }
|
||||
|
||||
private static <T> void array(Class[] param) { }
|
||||
}
|
||||
Reference in New Issue
Block a user