{"record":{"id":"56ae86a8f8fe1bc8","repo":"pxb1988/dex2jar","slug":"can-t-merge-thizcls-and-clz","errorCode":null,"errorMessage":"Can't merge ${thizCls} and ${clz}","messagePattern":"Can't merge (.+?) and (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"dex-ir/src/main/java/com/googlecode/dex2jar/ir/TypeClass.java","lineNumber":104,"sourceCode":"    public static TypeClass merge(TypeClass thizCls, TypeClass clz) {\n        if (thizCls == clz) {\n            return thizCls;\n        }\n        if (thizCls == TypeClass.UNKNOWN) {\n            return clz;\n        } else if (clz == TypeClass.UNKNOWN) {\n            // do nothing\n            return thizCls;\n        } else {\n            if (thizCls.fixed) {\n                if (clz.fixed) {\n                    // special case for merge I and Z\n                    // https://bitbucket.org/pxb1988/dex2jar/issues/1/javalangruntimeexception-can-not-merge-i\n                    // http://sourceforge.net/p/dex2jar/tickets/237/\n                    if ((thizCls == INT && clz == BOOLEAN) || (thizCls == BOOLEAN || clz == INT)) {\n                        return INT;\n                    }\n                    throw new RuntimeException(\"Can't merge \" + thizCls + \" and \" + clz);\n                } else {\n                    return thizCls;\n                }\n            } else if (clz.fixed) {\n                return clz;\n            } else { // both not fixed\n                return merge0(thizCls, clz);\n            }\n        }\n    }\n\n    /**\n     * X     ZIL   ZIFL ZIF  ZI  IF\n     * ZIL   X     ZIL  ZI   ZI  I\n     * ZIFL  ZIL   X    ZIF  ZI  IF\n     * ZIF   ZI    ZIF  X    ZI  IF\n     * ZI    ZI    ZI   ZI   X   I\n     * IF    I     IF   IF   I   X","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/pxb1988/dex2jar/blob/b5bda4fb4935ae8b3869b422454ae3b3896c7bc1/dex-ir/src/main/java/com/googlecode/dex2jar/ir/TypeClass.java#L86-L122","documentation":"Raised by TypeClass.merge during dex-to-ir type inference when two type-class constraints meet at a control-flow merge point and neither is UNKNOWN: at least one is fixed (or the combination is otherwise incompatible, e.g. a reference type meeting a primitive), so no single TypeClass can represent both. This is a type-inference limitation of the converter, not bad user input; the known I/Z merge case is specially handled above this branch.","triggerScenarios":"Thrown at dex-ir/src/main/java/com/googlecode/dex2jar/ir/TypeClass.java:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Update to a newer dex2jar release — type-merging rules have been extended over time (e.g. the special I/Z case referenced in the source)","Report the failing classes to the dex2jar issue tracker with the input dex so the merge rules can be improved","As a workaround, exclude the offending class(es) from translation to get partial output"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b5bda4fb4935ae8b3869b422454ae3b3896c7bc1","analyzedAt":"2026-09-08T00:44:01.258Z","contentChangedAt":"2026-09-08T00:44:01.258Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}