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: look into BindingContext.VARIABLE_REASSIGNMENT
|
||||
// public void testKt740_3() throws Exception {
|
||||
// checkFooBoxIsOk("KT-740-3.kt");
|
||||
// }
|
||||
public void testKt740_3() throws Exception {
|
||||
checkFooBoxIsOk("KT-740-3.kt");
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ public final class KotlinPropertyAccessTranslator extends PropertyAccessTranslat
|
||||
@NotNull
|
||||
public JsExpression translateAsSet(@Nullable JsExpression receiver, @NotNull JsExpression toSetTo) {
|
||||
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)
|
||||
.args(toSetTo)
|
||||
.descriptor(setter)
|
||||
|
||||
@@ -9,12 +9,13 @@ class A() {
|
||||
fun divAssign(a : Int) {
|
||||
c1++;
|
||||
}
|
||||
fun times(a : Int) {
|
||||
fun times(a : Int) : A {
|
||||
c2++;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
val a : A = A()
|
||||
var a : A = A()
|
||||
get() {
|
||||
c0++
|
||||
return $a
|
||||
@@ -30,12 +31,11 @@ fun box() : String {
|
||||
return "2"
|
||||
}
|
||||
a *= 3
|
||||
if (c0 != 1) {
|
||||
if (c0 != 2) {
|
||||
return "3"
|
||||
}
|
||||
if (c2 != 1) {
|
||||
return "4"
|
||||
}
|
||||
return "OK"
|
||||
|
||||
if (c2 != 1) {
|
||||
return "4"
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user