https://kotlinlang.org logo
Title
u

user

07/11/2022, 10:31 PM
Unexpected implicit cast to TextView>: layout tag was TextView I have a function that accepts a Map: private fun chooseActiveElement(m: Map) {} This code works: chooseActiveElement(mapOf( 1 to (findViewById(R.id.labelFixNo)) )) But this one (parentheses removed) does not: chooseActiveElement(mapOf( 1 to findViewById(R.id.labelFixNo) )) Unexpected implicit cast to TextView>: layout tag was TextView I'm curious, why are the parentheses necessary and what does the error message mean exactly?