Boxing values merge fix. #KT-5588 Fixed
When merging Boxed value and something else just return MIXED_VALUE
This commit is contained in:
committed by
Evgeny Gerashchenko
parent
81f7ace128
commit
e0ced7cbcf
+2
-2
@@ -221,12 +221,12 @@ public class BoxingInterpreter extends OptimizationBasicInterpreter {
|
||||
|
||||
if (v instanceof BoxedBasicValue) {
|
||||
onMergeFail((BoxedBasicValue) v);
|
||||
v = new BasicValue(v.getType());
|
||||
return MIXED_VALUE;
|
||||
}
|
||||
|
||||
if (w instanceof BoxedBasicValue) {
|
||||
onMergeFail((BoxedBasicValue) w);
|
||||
w = new BasicValue(w.getType());
|
||||
return MIXED_VALUE;
|
||||
}
|
||||
|
||||
return super.merge(v, w);
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import org.jetbrains.org.objectweb.asm.tree.analysis.BasicInterpreter;
|
||||
import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue;
|
||||
|
||||
public class OptimizationBasicInterpreter extends BasicInterpreter {
|
||||
private static final BasicValue MIXED_VALUE = new BasicValue(Type.getObjectType("#"));
|
||||
public static final BasicValue MIXED_VALUE = new BasicValue(Type.getObjectType("#"));
|
||||
private static final BasicValue BOOLEAN_VALUE = new BasicValue(Type.BOOLEAN_TYPE);
|
||||
private static final BasicValue CHAR_VALUE = new BasicValue(Type.CHAR_TYPE);
|
||||
private static final BasicValue BYTE_VALUE = new BasicValue(Type.BYTE_TYPE);
|
||||
|
||||
Reference in New Issue
Block a user