User: joe Date: 03 Nov 25 22:21 Revision: 8bcbeb1424c898073b1b2798e2b0941e338cfd2b Summary: Remove check for injecting before super() call. Fixes #2506 TeamCity URL: http://ci.mcdev.io:80/viewModification.html?tab=vcsModificationFiles&modId=10192&personal=false Index: src/main/kotlin/platform/mixin/inspection/injector/InjectIntoConstructorInspection.kt =================================================================== --- src/main/kotlin/platform/mixin/inspection/injector/InjectIntoConstructorInspection.kt (revision c1a1264667e0a031316fcf18546eabccf9b3d770) +++ src/main/kotlin/platform/mixin/inspection/injector/InjectIntoConstructorInspection.kt (revision 8bcbeb1424c898073b1b2798e2b0941e338cfd2b) @@ -97,26 +97,11 @@ ) return } - - val delegateCtorCall = targetMethod.findDelegateConstructorCall() - if (delegateCtorCall != null && - instructions.any { - val insnIndex = targetMethod.instructions.indexOf(it.insn) - val delegateCtorIndex = targetMethod.instructions.indexOf(delegateCtorCall) - insnIndex <= delegateCtorIndex - } + } - ) { - holder.registerProblem( - problemElement, - "Cannot inject before super() call", - ) - return - } - } - } - } + } + } + } + } - } - } override fun getStaticDescription() = "@Inject into Constructor" }