Closed bdueck closed 6 years ago
You removed private val logger = logger()
from companion object
and therefore there's no logger
any more. Just add it back to your companion object and everything should work fine.
I left the anonymous companion object declaration at the end of the class. What I was doing was introducing a new named companion object. What was unexpected is that Utils.kt insisted that I have private val logger = logger() in my new companion object.
You cannot have two companion objects in a single class.
Yep - thanks, dumb mistake on my part. I wasn't aware of that rule in Kotlin - and didn't notice the compiler flagging this - I just focused on the error markets on logger references. Apologies for this.
Hi - first off, great job on putting together coroutine support for Spring.
I've run into a small problem as I've been exploring the demo.
Specifically, adding a companion object to a Spring Component runs into problems. The problem seems to be with the magic being done in Utils.kt with unwrapCompanionClass. Modifying DemoService by adding the "foo" companion object as I've done below, causes a compile error with the "logger" reference as shown below.
@Component open class DemoService {
...