Annotated the return type of 'elvis' function with @Exact

fun <T> ELVIS(T?, T): @Exact T
This commit is contained in:
Svetlana Isakova
2015-10-20 18:52:17 +03:00
parent 7150be7c67
commit 06e90cf6a1
11 changed files with 78 additions and 12 deletions
@@ -12,7 +12,7 @@ fun stringLen(s : String?) : Int {
}
fun stringReturnInLeftLen(s : String?) : Int {
val s1 : String = (if (s != null) { return s.length() } else { null }) ?: return 0
val s1 = (if (s != null) { return s.length() } else { null }) ?: return 0
}
fun box(): String {