Skip to content

Commit 1dd31f2

Browse files
committed
Drop thisLocals after sorting
1 parent 84a37d0 commit 1dd31f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/platform/mixin/inspection/shadow/ShadowParameterNameInspection.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ShadowParameterNameInspection : MixinInspection() {
4949
return
5050
}
5151
val thisLocals = if (target.classAndMethod.method.hasAccess(Opcodes.ACC_STATIC)) 0 else 1
52-
val targetLocals = target.classAndMethod.method.localVariables?.drop(thisLocals)?.sortedBy { it.index } ?: return
52+
val targetLocals = target.classAndMethod.method.localVariables?.sortedBy { it.index }?.drop(thisLocals) ?: return
5353

5454
val method = annotation.parent?.parent as? PsiMethod ?: return
5555
for ((param, targetLocal) in method.parameterList.parameters.zip(targetLocals)) {

0 commit comments

Comments
 (0)