Cleanup: smart casts of safe call receiver applied (do NOT cherry-pick to 1.0.X)

This commit is contained in:
Mikhail Glukhikh
2016-07-22 16:37:34 +03:00
parent 26c8bc87fd
commit 692623cb55
9 changed files with 10 additions and 10 deletions
@@ -31,7 +31,7 @@ object ScriptNameUtil {
.map { if (it.startsWith('.')) it else ".$it" }
.firstOrNull { fileName.endsWith(it) }
?.let { fileName.length - it.length }
?: fileName.lastIndexOf('.')?.let { if (it < 0) fileName.length else it }
?: fileName.lastIndexOf('.').let { if (it < 0) fileName.length else it }
?: fileName.length
return fileName
.substring(nameStart, nameEnd)