Call findViewById if invoked on anything but our Activity class
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.myapp
|
||||
|
||||
import android.app.Activity
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
|
||||
fun Activity.a() {
|
||||
val x = login
|
||||
val y = this.login
|
||||
}
|
||||
|
||||
// 2 GETSTATIC
|
||||
// 2 INVOKEVIRTUAL
|
||||
// 2 CHECKCAST
|
||||
// 0 _\$_findCachedViewById
|
||||
// 2 findViewById
|
||||
Reference in New Issue
Block a user