Turn on KT-740-3.kt test.
Fix a typo.
This commit is contained in:
pTalanov
2012-03-13 18:42:28 +04:00
parent af690fb02a
commit b3e306ac32
3 changed files with 12 additions and 12 deletions
@@ -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");
}
}
@@ -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"
}