KT-1054 comparison of booleans
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
fun box() : String {
|
||||
return if(true.and(true)) "OK" else "fail"
|
||||
}
|
||||
|
||||
fun Boolean.and(other : Boolean) : Boolean{
|
||||
if(other == true) {
|
||||
if(this == true){
|
||||
return true ;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user