Skip to content

Commit

Permalink
Fix tests having ambiguous methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jan 4, 2024
1 parent 82551d1 commit 736d229
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@ class TestMixinShadow {
@org.spongepowered.asm.mixin.Mixin(a.pkg.A.class)
abstract class MixinA {
@org.spongepowered.asm.mixin.Shadow
private int aMethod(a.pkg.AInterface[] arguments);
private int aMethodWithAnArrayArgument(a.pkg.AInterface[] arguments);
private void test() {
aMethod(new a.pkg.AInterface[1]);
aMethodWithAnArrayArgument(new a.pkg.AInterface[1]);
}
}
""".trimIndent()) shouldBe """
@org.spongepowered.asm.mixin.Mixin(b.pkg.B.class)
abstract class MixinA {
@org.spongepowered.asm.mixin.Shadow
private int bMethod(b.pkg.BInterface[] arguments);
private int bMethodWithAnArrayArgument(b.pkg.BInterface[] arguments);
private void test() {
bMethod(new b.pkg.BInterface[1]);
bMethodWithAnArrayArgument(new b.pkg.BInterface[1]);
}
}
""".trimIndent()
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/mappings.srg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CL: a/pkg/A b/pkg/B
FD: a/pkg/A/a b/pkg/B/b
FD: a/pkg/A/aField b/pkg/B/bField
MD: a/pkg/A/aMethod ()V b/pkg/B/bMethod ()V
MD: a/pkg/A/aMethodWithAnArrayArgument ()V b/pkg/B/bMethodWithAnArrayArgument ()V
MD: a/pkg/A/getA ()La/pkg/A; b/pkg/B/getB ()Lb/pkg/B;
MD: a/pkg/A/getSyntheticA ()La/pkg/A; b/pkg/B/getSyntheticB ()Lb/pkg/B;
MD: a/pkg/A/setSyntheticA (La/pkg/A;)V; b/pkg/B/setSyntheticB (Lb/pkg/B;)V;
Expand Down
2 changes: 1 addition & 1 deletion src/testA/java/a/pkg/A.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void aMethod() {
aInterfaceMethod();
}

public int aMethod(a.pkg.AInterface[] arguments) {
public int aMethodWithAnArrayArgument(a.pkg.AInterface[] arguments) {
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/testB/java/b/pkg/B.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void bMethod() {
bInterfaceMethod();
}

public int bMethod(b.pkg.BInterface[] arguments) {
public int bMethodWithAnArrayArgument(b.pkg.BInterface[] arguments) {
return 0;
}

Expand Down

0 comments on commit 736d229

Please sign in to comment.