Doubt about renaming an interface method with a nested lambda of the same type

I have two cases, both in different packages:
First (package firstCase;)
Implementation of the functional interface MyInterface with a method in the body of which there is a call with a lambda of the functional interface of the same type MyInterface.

package firstCase;
public class InterfaceSource implements MyInterface {
	@Override
	public void testMethod() {
		InterfaceDest.someSimilarUsingOfMyInterface(()->{
			;
		});
	}
}

As a result, Proguard retains the former name of the method.

Second (package secondCase;)
Implementation of the functional interface MyInterface with a method in the body of which there is nothing.

package secondCase;
public class InterfaceSource implements MyInterface {
	@Override
	public void testMethod() {
		;
	}
}

As a result, Proguard changes the name of the method.

Mappings:

firstCase.InterfaceDest -> pkg.a:
    void <init>() -> <init>
    void someSimilarUsingOfMyInterface(firstCase.MyInterface) -> a
firstCase.InterfaceSource -> pkg.b:
    void <init>() -> <init>
   void testMethod() -> testMethod  <<<<<<<<<<<<<<<<
    void lambda$testMethod$0() -> a
firstCase.MyInterface -> pkg.c:
    void testMethod() -> testMethod
main.Main -> main.Main:
    void <init>() -> <init>
    void main(java.lang.String[]) -> main
secondCase.InterfaceSource -> pkg.d:
    void <init>() -> <init>
    void testMethod() -> a  <<<<<<<<<<<<<<<<
secondCase.MyInterface -> pkg.e:
    void testMethod() -> a

Config:

-injars /test/in.zip
-outjars /test/out.zip
-libraryjars /test/jdk1.8.0_281/jre/lib/rt.jar
-dontshrink
-dontoptimize
-printmapping /test/pg.map
-repackageclasses pkg
-printconfiguration /test/pg.cfg
-keepclasseswithmembers,includedescriptorclasses,includecode class ***Main*** {
    *** ***(...);
}

Full code: GitHub - numerolog/pg-naming-doubt
Question: Is that how it should be?

Thanks.

Dear @numerolog,

Welcome to our community and thank you for raising this question! Could you please try to send us the full configuration file by adding the -printconfiguration /path/to/save/the/fullconfiguration/file.txt to your configuration file? You will then find a full configuration file in the path you specified where all the configuration options of the whole project is listed in one file. Please send over that particular file.

I would like to check whether or not certain keep rules are present in any consumer rule files you might be using.

Kind regards,

Ewout

Ok.
I am attaching the contents of the fullconfiguration.txt file:
fullconfiguration.txt (334 Bytes)

Let me remind you - I’m worried that the former name “testMethod” remains in the first case, is it some kind of limitation related to lambdas?

Hi! I’ve been able to confirm that this is a current limitation of ProGuard. (The problem originates from this code block in Proguard to be exact)
There seems to be no deep reason to keep the behaviour as it is now, and it could probably be improved. Thanks for flagging that to us!

I’ve added a task to our internal tracker to have a better look at it.