diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/a/pkg/A.java | 1 | ||||
-rw-r--r-- | src/test/java/b/pkg/B.java | 1 | ||||
-rw-r--r-- | src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt | 11 | ||||
-rw-r--r-- | src/test/resources/mappings.srg | 1 |
4 files changed, 14 insertions, 0 deletions
diff --git a/src/test/java/a/pkg/A.java b/src/test/java/a/pkg/A.java index 3143407..3e20f3e 100644 --- a/src/test/java/a/pkg/A.java +++ b/src/test/java/a/pkg/A.java @@ -35,6 +35,7 @@ public class A extends AParent implements AInterface { @Override public void aInterfaceMethod() { + new A() {}; } public class Inner { diff --git a/src/test/java/b/pkg/B.java b/src/test/java/b/pkg/B.java index 030ffa2..3c71aae 100644 --- a/src/test/java/b/pkg/B.java +++ b/src/test/java/b/pkg/B.java @@ -35,6 +35,7 @@ public class B extends BParent implements BInterface { @Override public void bInterfaceMethod() { + new B() {}; } public class Inner { diff --git a/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt b/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt index 1f9a3a2..595b65f 100644 --- a/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt +++ b/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt @@ -49,4 +49,15 @@ class TestMixinAnnotation { class MixinA { @Shadow private int bField; } """.trimIndent() } + + @Test + fun `remaps with anonymous inner class target`() { + TestData.remap(""" + @org.spongepowered.asm.mixin.Mixin(targets = "a.pkg.A${'$'}1") + class MixinA {} + """.trimIndent()) shouldBe """ + @org.spongepowered.asm.mixin.Mixin(targets = "b.pkg.B${'$'}1") + class MixinA {} + """.trimIndent() + } }
\ No newline at end of file diff --git a/src/test/resources/mappings.srg b/src/test/resources/mappings.srg index 22d63a9..4213107 100644 --- a/src/test/resources/mappings.srg +++ b/src/test/resources/mappings.srg @@ -6,6 +6,7 @@ MD: a/pkg/A/aOverloaded (I)V b/pkg/B/bOverloaded (I)V MD: a/pkg/A/aOverloaded (Z)V b/pkg/B/bOverloaded (Z)V MD: a/pkg/A/commonOverloaded (Ljava/lang/Object;)V b/pkg/B/commonOverloaded (Ljava/lang/Object;)V MD: a/pkg/A/commonOverloaded (La/pkg/A;)V b/pkg/B/commonOverloaded (La/pkg/B;)V +CL: a/pkg/A$1 b/pkg/B$1 CL: a/pkg/A$Inner b/pkg/B$Inner FD: a/pkg/A$Inner/aField b/pkg/B$Inner/bField CL: a/pkg/AParent b/pkg/BParent |