Make 'sure' an inline function with a lazy parameter

Also replace some other non-lazy stdlib function usages with the new lazy
'sure'
This commit is contained in:
Alexander Udalov
2015-04-16 00:58:50 +03:00
parent b2a2e4ae92
commit 44e35cad29
12 changed files with 102 additions and 120 deletions
@@ -32,7 +32,7 @@ public abstract class VirtualFileKotlinClassFinder : VirtualFileFinder {
if (javaClass.getOuterClass() != null) {
// For nested classes we get a file of the containing class, to get the actual class file for A.B.C,
// we take the file for A, take its parent directory, then in this directory we look for A$B$C.class
file = file.getParent()!!.findChild(classFileName(javaClass) + ".class").sure("Virtual file not found for $javaClass")
file = file.getParent()!!.findChild(classFileName(javaClass) + ".class").sure { "Virtual file not found for $javaClass" }
}
return KotlinBinaryClassCache.getKotlinBinaryClass(file)