test for union types
This commit is contained in:
@@ -112,6 +112,7 @@ public class SingleClassesTest {
|
|||||||
@Test public void testVarArgCalls() { doTest("pkg/TestVarArgCalls"); }
|
@Test public void testVarArgCalls() { doTest("pkg/TestVarArgCalls"); }
|
||||||
@Test public void testLambdaParams() { doTest("pkg/TestLambdaParams"); }
|
@Test public void testLambdaParams() { doTest("pkg/TestLambdaParams"); }
|
||||||
@Test public void testInterfaceMethods() { doTest("pkg/TestInterfaceMethods"); }
|
@Test public void testInterfaceMethods() { doTest("pkg/TestInterfaceMethods"); }
|
||||||
|
//@Test public void testUnionType() { doTest("pkg/TestUnionType"); } //TODO: fix
|
||||||
|
|
||||||
private void doTest(String testFile, String... companionFiles) {
|
private void doTest(String testFile, String... companionFiles) {
|
||||||
ConsoleDecompiler decompiler = fixture.getDecompiler();
|
ConsoleDecompiler decompiler = fixture.getDecompiler();
|
||||||
|
|||||||
BIN
testData/classes/pkg/TestUnionType.class
Normal file
BIN
testData/classes/pkg/TestUnionType.class
Normal file
Binary file not shown.
28
testData/results/TestUnionType.dec
Normal file
28
testData/results/TestUnionType.dec
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
package pkg;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Comparator;
|
||||||
|
|
||||||
|
public interface TestUnionType {
|
||||||
|
static Comparator comparingInt() {
|
||||||
|
return (Comparator & Serializable)((c1, c2) -> {// 8
|
||||||
|
return 1;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class 'pkg/TestUnionType' {
|
||||||
|
method 'lambda$comparingInt$ff46620a$1 (Ljava/lang/Object;Ljava/lang/Object;)I' {
|
||||||
|
0 8
|
||||||
|
1 8
|
||||||
|
}
|
||||||
|
|
||||||
|
method 'comparingInt ()Ljava/util/Comparator;' {
|
||||||
|
5 7
|
||||||
|
8 7
|
||||||
|
b 7
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Lines mapping:
|
||||||
|
8 <-> 8
|
||||||
10
testData/src/pkg/TestUnionType.java
Normal file
10
testData/src/pkg/TestUnionType.java
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package pkg;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Comparator;
|
||||||
|
|
||||||
|
public interface TestUnionType {
|
||||||
|
public static Comparator comparingInt() {
|
||||||
|
return (Comparator & Serializable)(c1, c2) -> 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user