I faced a very strange behavior in Kotlin compiler...
# announcements
m
I faced a very strange behavior in Kotlin compiler, which seems to be a bug. There’s an extension function in my project called `logger`:
Copy code
fun logger(name: String) = lazy { LoggerFactory.getLogger(name) }
And I use it in mu classes in the following way:
Copy code
val logger by logger(name)
Everything works fine until I change the property access to
private
. After that the compiler starts saying that
Type checking has run into a recursive problem
. And the most interesting thing is that in some other classes
private val logger by logger(name)
actually compiles. What can be the problem here?