
Not possible to reference private inner classes in method signatures
NotMyWing opened this issue ยท 1 comments
It's currently impossible to reference instances of private inner classes (specifically, of other mods, which can't traditionally be access transformed) in method signatures. Coercing arguments also doesn't seem to be possible, as Mixin strictly expects the signature to be A$B
, so defining the argument as Object
fails at runtime. @Local
expects A$B
as well. This leaves no options for targeting the instance.
Example class:
class A {
method(B b);
static class B {}
}
Example mixin:
interface IExtendedB {}
@Mixin(B.class)
class mB implements IExtendedB {}
@Mixin(A.class)
class mA {
@Inject(method = "method", ...)
public void injection(A.B b, CallbackInfo ci) {} // oops! fails at compile-time
public void injection(CallbackInfo ci, @Local IExtendedB b) {} // oops! fails at runtime
public void injection(CallbackInfo ci, @Local Object b) {} // oops! failed to validate at runtime
}