Skip to content

Commit

Permalink
New: Support WrongOperationParametersInspection in @WrapMethods. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
LlamaLad7 authored Jun 1, 2024
1 parent 10bd8d7 commit efcfd5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ class WrongOperationParametersInspection : MixinInspection() {
PsiField::class.java
) ?: return

if (!containingMethod.hasAnnotation(MixinConstants.MixinExtras.WRAP_OPERATION)) {
if (!containingMethod.hasAnnotation(MixinConstants.MixinExtras.WRAP_OPERATION) &&
!containingMethod.hasAnnotation(MixinConstants.MixinExtras.WRAP_METHOD)
) {
return
}

Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/platform/mixin/util/MixinConstants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ object MixinConstants {
object MixinExtras {
const val OPERATION = "com.llamalad7.mixinextras.injector.wrapoperation.Operation"
const val WRAP_OPERATION = "com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation"
const val WRAP_METHOD = "com.llamalad7.mixinextras.injector.wrapmethod.WrapMethod"
const val LOCAL = "com.llamalad7.mixinextras.sugar.Local"
const val LOCAL_REF_PACKAGE = "com.llamalad7.mixinextras.sugar.ref."

Expand Down

0 comments on commit efcfd5d

Please sign in to comment.