Stop using deprecated APIs

This commit is contained in:
Ilya Ryzhenkov
2014-12-02 15:41:22 +03:00
parent 2b8ffeda28
commit be717f48f8
45 changed files with 111 additions and 112 deletions
@@ -109,7 +109,7 @@ private fun <Function : FunctionHandle> findConcreteSuperDeclaration(function: F
result.removeAll(toRemove)
val concreteRelevantDeclarations = result.filter { !it.isAbstract }
if (concreteRelevantDeclarations.size != 1) {
if (concreteRelevantDeclarations.size() != 1) {
error("Concrete fake override $function should have exactly one concrete super-declaration: $concreteRelevantDeclarations")
}
@@ -62,7 +62,7 @@ public object CodegenUtilKt {
(listOf(it) + DescriptorUtils.getAllOverriddenDescriptors(it)).map { it.getOriginal() }.contains(overriddenDescriptor.getOriginal())
}
}
assert(actualDelegates.size <= 1) { "Meny delegates found for $delegatingMember: $actualDelegates" }
assert(actualDelegates.size() <= 1) { "Meny delegates found for $delegatingMember: $actualDelegates" }
actualDelegates.firstOrNull()
}
+1 -1
View File
@@ -24,7 +24,7 @@ public trait OutputFileCollection {
}
public class SimpleOutputFileCollection(private val outputFiles: List<OutputFile>) : OutputFileCollection {
override fun get(relativePath: String): OutputFile? = outputFiles.find { it.relativePath == relativePath }
override fun get(relativePath: String): OutputFile? = outputFiles.firstOrNull { it.relativePath == relativePath }
override fun asList(): List<OutputFile> = outputFiles
}