File tree Expand file tree Collapse file tree
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,10 +145,12 @@ public int hashCode() {
145145 } else {
146146 sanitizedMethodName = parentMethodName ;
147147 }
148- final String interfaceTarget = interfaceName .replace ('/' , '_' ).replace ('.' , '_' );
149- final LambdaId id = new LambdaId (interfaceName , sanitizedMethodName );
148+ final String interfaceTarget = interfaceName .replace ('/' , '.' );
149+ final int lastDot = interfaceTarget .lastIndexOf ('.' );
150+ final String canonicalInterfaceTarget = lastDot == -1 ? interfaceTarget : interfaceTarget .substring (lastDot + 1 );
151+ final LambdaId id = new LambdaId (canonicalInterfaceTarget , sanitizedMethodName );
150152
151- return "$lambda$" + sanitizedMethodName + '$' + interfaceTarget + '$' + this .mangleCounters .get (id );
153+ return "$lambda$" + sanitizedMethodName + '$' + canonicalInterfaceTarget + '$' + this .mangleCounters .get (id );
152154 }
153155
154156 public String mangleGeneratedLambdaName (final String interfaceName ) {
You can’t perform that action at this time.
0 commit comments