KT-1052: Infix calls do not work.

This commit is contained in:
pTalanov
2012-03-13 13:48:53 +04:00
parent e5eaffc1c8
commit d69988382b
3 changed files with 22 additions and 1 deletions
@@ -56,8 +56,12 @@ public final class MiscTest extends AbstractExpressionTest {
}
}
public void testKt1052_2() throws Exception {
checkFooBoxIsTrue("KT-1052-2.kt");
}
public void testKt1052() throws Exception {
checkFooBoxIsTrue("KT1052.kt");
checkOutput("KT-1052.kt", "true\n");
}
@@ -0,0 +1,17 @@
fun main(args : Array<String>) {
println(true.and1(true))
}
fun Boolean.and1(other : Boolean) : Boolean{
if(other == true) {
if(this == true){
return true ;
}
else{
return false;
}
}
else {
return false;
}
}