KT-1052: Infix calls do not work.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user