smallshen
11/27/2024, 1:58 PMconst val processor: Processor get() = throw RuntimeException("Should replaced by compiler plugin")
Original code:
fun apiCall(p0: Int) {
processor.something(p0)
}
fun main() {
apiCall(123)
}
Would become:
fun apiCall(p0: Int) {
processor.something(p0)
}
fun main() {
Processor().use { processor ->
// old main's entire body
apiCall(processor, 123)
}
}
Where should I start? What level does this belongs to? What are some related classes/function will be used, so I can look into?Tóth István Zoltán
11/28/2024, 5:09 AM