-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: force type var short form as a key in generic resolve mapping (#…
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
jadx-core/src/test/java/jadx/tests/integration/types/TestGenerics8.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package jadx.tests.integration.types; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import jadx.tests.api.IntegrationTest; | ||
|
||
import static jadx.tests.api.utils.assertj.JadxAssertions.assertThat; | ||
|
||
public class TestGenerics8 extends IntegrationTest { | ||
|
||
public static class TestCls<T> { | ||
|
||
public abstract static class Class2<S extends I1 & I2> extends Parent2<S> { | ||
public void test() { | ||
S s = get(); | ||
s.i1(); | ||
s.i2(); | ||
} | ||
} | ||
|
||
static class Parent2<T extends I1> { | ||
T t; | ||
|
||
protected T get() { | ||
return t; | ||
} | ||
} | ||
|
||
interface I1 { | ||
void i1(); | ||
} | ||
|
||
interface I2 { | ||
void i2(); | ||
} | ||
} | ||
|
||
@Test | ||
public void test() { | ||
noDebugInfo(); | ||
assertThat(getClassNode(TestCls.class)) | ||
.code() | ||
.containsOne("S s = get();") | ||
.containsOne("s.i1();") | ||
.containsOne("s.i2();"); | ||
} | ||
} |