KT-740
Turn on KT-740-3.kt test. Fix a typo.
This commit is contained in:
@@ -87,7 +87,7 @@ public final class MiscTest extends AbstractExpressionTest {
|
|||||||
|
|
||||||
//TODO: depends on KT-1198
|
//TODO: depends on KT-1198
|
||||||
//TODO: look into BindingContext.VARIABLE_REASSIGNMENT
|
//TODO: look into BindingContext.VARIABLE_REASSIGNMENT
|
||||||
// public void testKt740_3() throws Exception {
|
public void testKt740_3() throws Exception {
|
||||||
// checkFooBoxIsOk("KT-740-3.kt");
|
checkFooBoxIsOk("KT-740-3.kt");
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -76,7 +76,7 @@ public final class KotlinPropertyAccessTranslator extends PropertyAccessTranslat
|
|||||||
@NotNull
|
@NotNull
|
||||||
public JsExpression translateAsSet(@Nullable JsExpression receiver, @NotNull JsExpression toSetTo) {
|
public JsExpression translateAsSet(@Nullable JsExpression receiver, @NotNull JsExpression toSetTo) {
|
||||||
PropertySetterDescriptor setter = propertyDescriptor.getSetter();
|
PropertySetterDescriptor setter = propertyDescriptor.getSetter();
|
||||||
assert setter != null : "Setter for kotlin properties should bot be null.";
|
assert setter != null : "Setter for kotlin properties should not be null.";
|
||||||
return callBuilderForAccessor(receiver)
|
return callBuilderForAccessor(receiver)
|
||||||
.args(toSetTo)
|
.args(toSetTo)
|
||||||
.descriptor(setter)
|
.descriptor(setter)
|
||||||
|
|||||||
@@ -9,12 +9,13 @@ class A() {
|
|||||||
fun divAssign(a : Int) {
|
fun divAssign(a : Int) {
|
||||||
c1++;
|
c1++;
|
||||||
}
|
}
|
||||||
fun times(a : Int) {
|
fun times(a : Int) : A {
|
||||||
c2++;
|
c2++;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val a : A = A()
|
var a : A = A()
|
||||||
get() {
|
get() {
|
||||||
c0++
|
c0++
|
||||||
return $a
|
return $a
|
||||||
@@ -30,12 +31,11 @@ fun box() : String {
|
|||||||
return "2"
|
return "2"
|
||||||
}
|
}
|
||||||
a *= 3
|
a *= 3
|
||||||
if (c0 != 1) {
|
if (c0 != 2) {
|
||||||
return "3"
|
return "3"
|
||||||
}
|
}
|
||||||
if (c2 != 1) {
|
if (c2 != 1) {
|
||||||
return "4"
|
return "4"
|
||||||
}
|
}
|
||||||
return "OK"
|
return "OK"
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user