0

Although I had marked 'lateinit',it's still not initialized. It's one ghost bug,last night everything is OK,but today it's can't work,it's so tiredenter image description here

1 Answers1

0

It is not initialized because you marked it lateinit and never actually initialized it.

You still need some method which will do userMapper = ..., and you must call this method before you can call userCheck.

But it would be better to remove lateinit and initialize in the constructor.

Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487