IR/Android: place the cache field first

to avoid NPEs if it is used during instance initialization.
This commit is contained in:
pyos
2021-11-19 10:33:13 +01:00
committed by Alexander Udalov
parent 55d1fdfbc2
commit 001ddda935
2 changed files with 5 additions and 2 deletions
@@ -33,9 +33,11 @@ class MyActivity(): Activity() {
} as T?
}
private val textViewString = textView1.toString()
public fun box(): String {
val result = when {
textView1.toString() == "TextView" && password.toString() == "EditText" && login.toString() == "Button" -> "OK"
textViewString == "TextView" && password.toString() == "EditText" && login.toString() == "Button" -> "OK"
else -> ""
}