Adam S
02/12/2023, 9:20 PMtestProject("foo") {
  var otherFileKt by projectFile("other_file.kt")
  otherFileKt = """
    // ...
  """.trimIndent()
}Property delegate must have a 'getValue(Nothing?, KProperty*>)' method. None of the following functions are suitable.Adam S
02/12/2023, 9:20 PMAdam S
02/12/2023, 9:22 PMAdam S
02/12/2023, 10:38 PMReadWriteProperty<Any?, String>ReadWriteProperty<ProjectTest, String>Adam S
02/12/2023, 10:38 PMGleb Minaev
02/13/2023, 7:31 AMnullthisRefgetValuesetValuenullProjectTestprojectFileimport kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
interface Project
fun project(arg: Project.() -> Unit) {}
class MyDelegate(project: Project, path: String) : ReadWriteProperty<Any?, String> {
    override fun getValue(thisRef: Any?, property: KProperty<*>): String = TODO()
    override fun setValue(thisRef: Any?, property: KProperty<*>, value: String) = TODO()
}
fun Project.file(path: String) : ReadWriteProperty<Any?, String> = MyDelegate(this, path)
fun main() = project {
    val myFile by file("path")
}