fabric-loader icon indicating copy to clipboard operation
fabric-loader copied to clipboard

Interface methods overriden by a superclass method are not remapped properly

Open BoogieMonster1O1 opened this issue 4 years ago • 5 comments

This is a bit hard to explain, but i'll try my best A and B are two classes where B has method a which is final. C is an interface which also has a method a. C is implemented by A

public class B {
  public final void a () {}
}
public class A extends B implements C {
}
public interface C  {
  void a ();
}

Calling A.a isn't suppposed to throw an AbstractMethodError as the final superclass method overrides it. However, C.a and B.a aren't remapped properly, causing an AbstractMethodError to be thrown when calling A.a in production. C.a and B.a should get the same intermediary name. This isn't the case though

This directly relates to https://github.com/Legacy-Fabric/fabric-loader-1.8.9/issues/1

BoogieMonster1O1 avatar Sep 28 '20 07:09 BoogieMonster1O1

Is there any reflection occurring in this case?

Otherwise I'd either say it's mappings or tiny-remapper.

i509VCB avatar Sep 28 '20 07:09 i509VCB

Does this ever happen in official fabric? It would be useful to have something that happens in official fabric.

modmuss50 avatar Sep 28 '20 08:09 modmuss50

Failing that a simple way to repoduce the issue would be helpful.

modmuss50 avatar Sep 28 '20 08:09 modmuss50

https://imgur.com/qvkAc7I can confirm that it happens on official fabric (the title screen version doesnt have Fabric in it when using official fabric loader)

BoogieMonster1O1 avatar Dec 03 '20 16:12 BoogieMonster1O1

https://imgur.com/qvkAc7I can confirm that it happens on official fabric (the title screen version doesnt have Fabric in it when using official fabric loader)

i think they meant with their intermediaries.

hYdos avatar Apr 03 '21 07:04 hYdos