Does Kotlin have more sexy syntax for that? :simpl...
# announcements
e
Does Kotlin have more sexy syntax for that? simple smile I’m trying to achive passing Activity arguments in a sexy way, and now it looks like:
Copy code
infix fun <T> T.over (property: KProperty<T>){}

class MainActivity2() : AppCompatActivity(){

    var someParam = 0
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        btn.setOnClickListener{
            intent<MainActivity>().start{
                3 over MainActivity2::someParam
            }
        }
    }
}