I would like to restrict on which constant value extension function can be called. For example function like:
@IdRes
fun <T : View> Int.find() = findViewById<T>(this)
If this was called on real id, it's fine:
R.id.someView.find<TextView>() // ok
But this should make compilation error:
42.find<TextView>() // should be compile error
Is annotating extension receiver supported in Kotlin?