diff --git a/src/main/kotlin/platform/mixin/handlers/mixinextras/MixinExtrasInjectorAnnotationHandler.kt b/src/main/kotlin/platform/mixin/handlers/mixinextras/MixinExtrasInjectorAnnotationHandler.kt index dfaf12b53..5604134f6 100644 --- a/src/main/kotlin/platform/mixin/handlers/mixinextras/MixinExtrasInjectorAnnotationHandler.kt +++ b/src/main/kotlin/platform/mixin/handlers/mixinextras/MixinExtrasInjectorAnnotationHandler.kt @@ -83,6 +83,9 @@ abstract class MixinExtrasInjectorAnnotationHandler : InjectorAnnotationHandler( }, SIMPLE_EXPRESSION { override fun matches(target: TargetInsn) = target.hasDecoration(Decorations.SIMPLE_EXPRESSION_TYPE) + }, + STRING_CONCAT_EXPRESSION { + override fun matches(target: TargetInsn) = target.hasDecoration(Decorations.IS_STRING_CONCAT_EXPRESSION) }; abstract fun matches(target: TargetInsn): Boolean diff --git a/src/main/kotlin/platform/mixin/handlers/mixinextras/ModifyExpressionValueHandler.kt b/src/main/kotlin/platform/mixin/handlers/mixinextras/ModifyExpressionValueHandler.kt index d39f196ad..4b1bbc983 100644 --- a/src/main/kotlin/platform/mixin/handlers/mixinextras/ModifyExpressionValueHandler.kt +++ b/src/main/kotlin/platform/mixin/handlers/mixinextras/ModifyExpressionValueHandler.kt @@ -38,7 +38,7 @@ import org.objectweb.asm.tree.MethodNode class ModifyExpressionValueHandler : MixinExtrasInjectorAnnotationHandler() { override val supportedInstructionTypes = listOf( InstructionType.METHOD_CALL, InstructionType.FIELD_GET, InstructionType.INSTANTIATION, InstructionType.CONSTANT, - InstructionType.SIMPLE_EXPRESSION + InstructionType.SIMPLE_EXPRESSION, InstructionType.STRING_CONCAT_EXPRESSION ) override fun extraTargetRestrictions(insn: AbstractInsnNode): Boolean { @@ -68,6 +68,9 @@ class ModifyExpressionValueHandler : MixinExtrasInjectorAnnotationHandler() { target: TargetInsn, annotation: PsiAnnotation ): PsiType? { + if (target.hasDecoration(Decorations.IS_STRING_CONCAT_EXPRESSION)) { + return PsiType.getJavaLangString(annotation.manager, annotation.resolveScope) + } val psiReturnType = getPsiReturnType(target.insn, annotation) val rawReturnType = getInsnReturnType(target.insn) val exprType = target.getDecoration(Decorations.SIMPLE_EXPRESSION_TYPE)