Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6a6c1eb
Refactor: Rework expected MethodSignatures.
LlamaLad7 Sep 16, 2026
ceab7de
Fix: Disallow non-int int-like types in @ModifyConstant.
LlamaLad7 Sep 18, 2026
97b6c24
Fix: Disallow `nullValue` in `@ModifyConstant`.
LlamaLad7 Sep 17, 2026
42b371e
stash
LlamaLad7 Sep 19, 2026
ef6df01
stash
LlamaLad7 Sep 19, 2026
b8be515
finish general intersection
LlamaLad7 Sep 19, 2026
59debcb
cleanup
LlamaLad7 Sep 19, 2026
bf4e768
stash
LlamaLad7 Sep 20, 2026
497f179
stash
LlamaLad7 Sep 20, 2026
74c9191
fix general intersection
LlamaLad7 Sep 20, 2026
8a19885
stash
LlamaLad7 Sep 20, 2026
a58bcd4
fix tests
LlamaLad7 Sep 20, 2026
1015633
return type only suggestions
LlamaLad7 Sep 20, 2026
90a2214
prioritise existing return type in modifier suggestions
LlamaLad7 Sep 20, 2026
b8dce64
restore BeforeConstant's behaviour of ensuring only 1 discriminator i…
LlamaLad7 Sep 20, 2026
e2130f0
Fix: Support `.class` constants in `@ModifyConstant`.
LlamaLad7 Sep 20, 2026
1d86ce1
Switch `@ModifyConstant` to a general signature type.
LlamaLad7 Sep 20, 2026
c6125f3
int coercion kinda fixed ish
LlamaLad7 Sep 21, 2026
58f31e9
fix int coercion properly
LlamaLad7 Sep 21, 2026
054c3d4
cleanup
LlamaLad7 Sep 21, 2026
285995a
proper int-like logic
LlamaLad7 Sep 25, 2026
f44abeb
cleanup
LlamaLad7 Sep 25, 2026
dda0b6f
some docs and fixes
LlamaLad7 Sep 26, 2026
57204e1
fix return type solving
LlamaLad7 Sep 26, 2026
d49a8a4
Cache walked supertypes and improve handling of Object as a supertype.
LlamaLad7 Sep 26, 2026
fbbfabc
Cleanup
LlamaLad7 Sep 26, 2026
2bff39a
Cleanup
LlamaLad7 Sep 26, 2026
b89aeb7
Small fixes
LlamaLad7 Sep 26, 2026
ecefb0d
Small fixes
LlamaLad7 Sep 26, 2026
a0c6698
Fix: Suggest "ci" for coerced callbackinfo name
LlamaLad7 Sep 27, 2026
385c821
Make highlight pos consistent
LlamaLad7 Sep 27, 2026
d99a252
Switch to fabric mixin for tests
LlamaLad7 Sep 27, 2026
4137742
Some tests
LlamaLad7 Sep 27, 2026
a96a8f8
Assert no issues after multi-fix tests
LlamaLad7 Sep 28, 2026
8251041
Remove `allowCoerceTrailing`.
LlamaLad7 Sep 28, 2026
18b7d9d
Fix @Coerce return type being added to wrong psi element.
LlamaLad7 Sep 28, 2026
b800649
Fix: WrapMethod cannot always be static.
LlamaLad7 Sep 28, 2026
afd6a95
WrapMethod tests
LlamaLad7 Sep 28, 2026
9b72bb9
ModifyReturnValue tests
LlamaLad7 Sep 28, 2026
fcabc88
Fix: Remove vestigial and overly strict int-like params check.
LlamaLad7 Sep 28, 2026
01db6cc
ModifyExpressionValue tests.
LlamaLad7 Sep 28, 2026
bf68947
More @Inject test cases
LlamaLad7 Sep 28, 2026
702610d
ModifyConstant tests
LlamaLad7 Sep 28, 2026
f8f1d2b
ModifyReceiver tests
LlamaLad7 Sep 28, 2026
8a35dd6
WrapWithCondition tests
LlamaLad7 Sep 28, 2026
97d88b8
Redirect tests
LlamaLad7 Sep 28, 2026
d220cf3
Fix: Only constrain int-like anchor for types that overlap with int-l…
LlamaLad7 Sep 28, 2026
b01151f
WrapOperation tests
LlamaLad7 Sep 28, 2026
3b0b08d
Make InjectSignatures ctor private
LlamaLad7 Sep 28, 2026
99a894a
Unused imports
LlamaLad7 Sep 28, 2026
f048935
Address review comments.
LlamaLad7 Oct 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fuel-coroutines = { module = "com.github.kittinunf.fuel:fuel-coroutines", versio
sentry = "io.sentry:sentry:8.37.1"

# Testing
test-mixin = "org.spongepowered:mixin:0.8.5"
test-mixin = "net.fabricmc:sponge-mixin:0.17.4+mixin.0.8.7"
test-spigotapi = "org.spigotmc:spigot-api:1.21.11-R0.2-SNAPSHOT"
test-bungeecord = "net.md-5:bungeecord-api:1.21-R0.4"
test-spongeapi = "org.spongepowered:spongeapi:7.4.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Minecraft Development for IntelliJ
*
* https://mcdev.io/
*
* Copyright (C) 2026 minecraft-dev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, version 3.0 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.demonwav.mcdev.mixintestdata.invalidInjectorMethodSignatureFix;

public class MixedInComplex {
public void method1(String arg) {
int local1 = 0;
CharSequence local2 = null;
char local3 = 'a';
Integer local4 = 10;
}

public void method2(int arg) {
int local1 = 0;
}

public String method3(Integer arg) {
return arg.toString();
}

public Integer method4() {
return 1;
}

public void method5(CharSequence arg) {
int local1 = 0;
String local2 = null;
int local3 = 0;
int local4 = 0;
char local5 = 0;
char local6 = 0;
}

public void method6(CharSequence arg) {
int local1 = 0;
String local2 = null;
int local3 = 0;
int local4 = 0;
char local5 = 0;
short local6 = 0;
}

public void method7(char a) {
}

public void method8(short a) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Minecraft Development for IntelliJ
*
* https://mcdev.io/
*
* Copyright (C) 2026 minecraft-dev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, version 3.0 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.demonwav.mcdev.mixintestdata.invalidInjectorMethodSignatureFix;

public class MixedInModifyArg {
public void caller(Object obj) {
callee1("hello", 1);
callee2('a', (short) 3, 4);
callee3(1, 2, 3);
}

private static void callee1(String x, int y) {
}

private static void callee2(char w, short x, int y) {
}

private static void callee3(int a, int b, int c) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Minecraft Development for IntelliJ
*
* https://mcdev.io/
*
* Copyright (C) 2026 minecraft-dev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, version 3.0 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.demonwav.mcdev.mixintestdata.invalidInjectorMethodSignatureFix;

public class MixedInModifyConstant {
public void method1(Class<?> arg) {
System.out.println(42);
System.out.println(101);
System.out.println(Long.class);
System.out.println((Object) 5 instanceof Integer);
System.out.println("hello");
}

public void method2(String arg) {
System.out.println(Long.class);
System.out.println((Object) 5 instanceof Integer);
System.out.println((Object) null);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Minecraft Development for IntelliJ
*
* https://mcdev.io/
*
* Copyright (C) 2026 minecraft-dev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, version 3.0 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.demonwav.mcdev.mixintestdata.invalidInjectorMethodSignatureFix;

public class MixedInModifyExpressionValue {
public void method1() {
System.out.println(42);
System.out.println(101);
System.out.println(callee1());
System.out.println(callee2());
System.out.println(callee5());
}

public void method2(String a, long b) {
System.out.println('a');
System.out.println(callee3());
System.out.println(callee4());
}

private static char callee1() {
return 'a';
}

private static int callee2() {
return 1;
}

private static Long[] callee3() {
return new Long[0];
}

private static Double[] callee4() {
return new Double[0];
}

private static short callee5() {
return (short) 1;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Minecraft Development for IntelliJ
*
* https://mcdev.io/
*
* Copyright (C) 2026 minecraft-dev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, version 3.0 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.demonwav.mcdev.mixintestdata.invalidInjectorMethodSignatureFix;

public abstract class MixedInModifyReceiver implements Comparable<MixedInModifyReceiver> {
public String test;
public char test2;

public void caller(char c) {
callee1("hello", 1);
callee2('a', (short) 3, 4);
callee3(1, 2, 3);
this.test = "hello";
this.test2 = 'a';
System.out.println(this.test2);
System.out.println(Integer.valueOf(5).longValue());
}

private void callee1(String x, int y) {
}

private void callee2(char w, short x, int y) {
}

private void callee3(int a, int b, int c) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Minecraft Development for IntelliJ
*
* https://mcdev.io/
*
* Copyright (C) 2026 minecraft-dev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, version 3.0 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.demonwav.mcdev.mixintestdata.invalidInjectorMethodSignatureFix;

public class MixedInModifyReturnValue {
public String method1() {
return "a";
}

public Integer method2() {
return 2;
}

public static Long method3() {
return 3L;
}

public int method4(String a, int b) {
return b;
}

public char method5(String a, short b) {
return (char) b;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Minecraft Development for IntelliJ
*
* https://mcdev.io/
*
* Copyright (C) 2026 minecraft-dev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, version 3.0 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.demonwav.mcdev.mixintestdata.invalidInjectorMethodSignatureFix;

public class MixedInModifyVariable {
public void method1(String arg, Object arg2) {
int local1 = 0;
CharSequence local2 = null;
char local3 = 'a';
Integer local4 = 10;
}

public void method2(int arg) {
int local1 = 0;
}

public void method3(CharSequence arg) {
int local1 = 0;
String local2 = null;
int local3 = 0;
int local4 = 0;
}
}
Loading
Loading