This is my code, it's very strange, I'm using var for the declaration
lateinit var ln_onvan: TextInputLayout
lateinit var typeface: Typeface
typeface = Func.getTypeface(this)
ln_onvan=findViewById<TextInputLayout>(R.id.ln_onvan)
///on this line I get this error
ln_onvan.typeface=typeface;
I don't understand it, could you help me to solve this problem?