Add disabled test. Depends on KT-1198
This commit is contained in:
@@ -61,11 +61,17 @@ public final class MiscTest extends AbstractExpressionTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void testKt740() throws Exception {
|
public void testKt740_1() throws Exception {
|
||||||
checkFooBoxIsTrue("KT-740.kt");
|
checkFooBoxIsTrue("KT-740.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testKt740_2() throws Exception {
|
public void testKt740_2() throws Exception {
|
||||||
checkFooBoxIsOk("KT-740-2.kt");
|
checkFooBoxIsOk("KT-740-2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: depends on KT-1198
|
||||||
|
//TODO: look into BindingContext.VARIABLE_REASSIGNMENT
|
||||||
|
// public void testKt740_3() throws Exception {
|
||||||
|
// 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 : "Getter for kotlin properties should bot be null.";
|
assert setter != null : "Setter for kotlin properties should bot be null.";
|
||||||
return callBuilderForAccessor(receiver)
|
return callBuilderForAccessor(receiver)
|
||||||
.args(toSetTo)
|
.args(toSetTo)
|
||||||
.descriptor(setter)
|
.descriptor(setter)
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
var c0 = 0
|
||||||
|
var c1 = 0
|
||||||
|
var c2 = 0
|
||||||
|
|
||||||
|
class A() {
|
||||||
|
var p = 0
|
||||||
|
fun divAssign(a : Int) {
|
||||||
|
c1++;
|
||||||
|
}
|
||||||
|
fun times(a : Int) {
|
||||||
|
c2++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val a : A = A()
|
||||||
|
get() {
|
||||||
|
c0++
|
||||||
|
return $a
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() : String {
|
||||||
|
|
||||||
|
a /= 3
|
||||||
|
if (c0 != 1) {
|
||||||
|
return "1"
|
||||||
|
}
|
||||||
|
if (c1 != 1) {
|
||||||
|
return "2"
|
||||||
|
}
|
||||||
|
a *= 3
|
||||||
|
if (c0 != 1) {
|
||||||
|
return "3"
|
||||||
|
}
|
||||||
|
if (c2 != 1) {
|
||||||
|
return "4"
|
||||||
|
}
|
||||||
|
return "OK"
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user