fix constructor arguments for extended inner classes
This commit is contained in:
@@ -334,7 +334,7 @@ public class InvocationExprent extends Exprent {
|
|||||||
boolean firstParameter = true;
|
boolean firstParameter = true;
|
||||||
int start = isEnum ? 2 : 0;
|
int start = isEnum ? 2 : 0;
|
||||||
for (int i = start; i < lstParameters.size(); i++) {
|
for (int i = start; i < lstParameters.size(); i++) {
|
||||||
if (sigFields == null) {
|
if (sigFields == null || null == sigFields.get(i)) {
|
||||||
if (!firstParameter) {
|
if (!firstParameter) {
|
||||||
buf.append(", ");
|
buf.append(", ");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ public class SingleClassesTest {
|
|||||||
@Test public void testMethodReferenceLetterClass() { doTest("pkg/TestMethodReferenceLetterClass"); }
|
@Test public void testMethodReferenceLetterClass() { doTest("pkg/TestMethodReferenceLetterClass"); }
|
||||||
@Test public void testMemberAnnotations() { doTest("pkg/TestMemberAnnotations"); }
|
@Test public void testMemberAnnotations() { doTest("pkg/TestMemberAnnotations"); }
|
||||||
@Test public void testStaticNameClash() { doTest("pkg/TestStaticNameClash"); }
|
@Test public void testStaticNameClash() { doTest("pkg/TestStaticNameClash"); }
|
||||||
|
@Test public void testExtendingSubclass() { doTest("pkg/TestExtendingSubclass"); }
|
||||||
|
|
||||||
protected void doTest(String testFile, String... companionFiles) {
|
protected void doTest(String testFile, String... companionFiles) {
|
||||||
ConsoleDecompiler decompiler = fixture.getDecompiler();
|
ConsoleDecompiler decompiler = fixture.getDecompiler();
|
||||||
@@ -130,4 +131,4 @@ public class SingleClassesTest {
|
|||||||
|
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
testData/classes/pkg/TestExtendingSubclass$Subclass1.class
Normal file
BIN
testData/classes/pkg/TestExtendingSubclass$Subclass1.class
Normal file
Binary file not shown.
BIN
testData/classes/pkg/TestExtendingSubclass$Subclass2.class
Normal file
BIN
testData/classes/pkg/TestExtendingSubclass$Subclass2.class
Normal file
Binary file not shown.
BIN
testData/classes/pkg/TestExtendingSubclass.class
Normal file
BIN
testData/classes/pkg/TestExtendingSubclass.class
Normal file
Binary file not shown.
35
testData/results/TestExtendingSubclass.dec
Normal file
35
testData/results/TestExtendingSubclass.dec
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
package pkg;
|
||||||
|
|
||||||
|
public class TestExtendingSubclass {
|
||||||
|
class Subclass2 extends TestExtendingSubclass.Subclass1 {
|
||||||
|
Subclass2(String name) {
|
||||||
|
super(name);// 14
|
||||||
|
}// 15
|
||||||
|
}
|
||||||
|
|
||||||
|
class Subclass1 {
|
||||||
|
Subclass1(String name) {
|
||||||
|
}// 9
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class 'pkg/TestExtendingSubclass$Subclass2' {
|
||||||
|
method '<init> (Lpkg/TestExtendingSubclass;Ljava/lang/String;)V' {
|
||||||
|
8 5
|
||||||
|
b 6
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class 'pkg/TestExtendingSubclass$Subclass1' {
|
||||||
|
method '<init> (Lpkg/TestExtendingSubclass;Ljava/lang/String;)V' {
|
||||||
|
9 11
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Lines mapping:
|
||||||
|
9 <-> 12
|
||||||
|
14 <-> 6
|
||||||
|
15 <-> 7
|
||||||
|
Not mapped:
|
||||||
|
8
|
||||||
|
13
|
||||||
18
testData/src/pkg/TestExtendingSubclass.java
Normal file
18
testData/src/pkg/TestExtendingSubclass.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package pkg;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class TestExtendingSubclass {
|
||||||
|
|
||||||
|
class Subclass1 {
|
||||||
|
Subclass1(String name) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Subclass2 extends Subclass1 {
|
||||||
|
Subclass2(String name) {
|
||||||
|
super(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user