Compilation Exception - remove duplicated this on stack
#KT-3114 Fixed
This commit is contained in:
@@ -2484,16 +2484,17 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
|
||||
|
||||
JetExpression left = expression.getLeft();
|
||||
JetExpression right = expression.getRight();
|
||||
StackValue receiver = gen(left);
|
||||
Callable callable = resolveToCallable(descriptor, false);
|
||||
|
||||
Type type;
|
||||
if (callable instanceof IntrinsicMethod) {
|
||||
// Compare two primitive values
|
||||
type = comparisonOperandType(expressionType(left), expressionType(right));
|
||||
StackValue receiver = gen(left);
|
||||
receiver.put(type, v);
|
||||
gen(right, type);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
type = Type.INT_TYPE;
|
||||
StackValue result = invokeOperation(expression, descriptor, (CallableMethod) callable);
|
||||
result.put(type, v);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
class KeySpan(val left: String) {
|
||||
|
||||
public fun matches(value : String) : Boolean {
|
||||
|
||||
return left > value && left > value
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
KeySpan("1").matches("3")
|
||||
return "OK"
|
||||
}
|
||||
@@ -742,6 +742,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest("compiler/testData/codegen/box/classes/kt285.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt3114.kt")
|
||||
public void testKt3114() throws Exception {
|
||||
doTest("compiler/testData/codegen/box/classes/kt3114.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt343.kt")
|
||||
public void testKt343() throws Exception {
|
||||
doTest("compiler/testData/codegen/box/classes/kt343.kt");
|
||||
|
||||
Reference in New Issue
Block a user