Cleanup: smart casts of safe call receiver applied (do NOT cherry-pick to 1.0.X)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user