Made convert to string template inspection less eager

This commit is contained in:
Valentin Kipyatkov
2015-09-03 22:18:39 +03:00
parent 67d1cc80f6
commit 97cf562dea
8 changed files with 12 additions and 106 deletions
+2 -2
View File
@@ -3,9 +3,9 @@ package demo
object Test {
fun subListRangeCheck(fromIndex: Int, toIndex: Int, size: Int) {
if (fromIndex < 0)
throw IndexOutOfBoundsException("fromIndex = $fromIndex")
throw IndexOutOfBoundsException("fromIndex = " + fromIndex)
if (toIndex > size)
throw IndexOutOfBoundsException("toIndex = $toIndex")
throw IndexOutOfBoundsException("toIndex = " + toIndex)
if (fromIndex > toIndex)
throw IllegalArgumentException("fromIndex($fromIndex) > toIndex($toIndex)")
}