Dave Leeds
05/01/2017, 3:03 PMclass OuterClass {
// Error:(2, 45) Kotlin: Left-hand side of a callable reference with a receiver parameter cannot be empty. Please specify the type of the receiver before '::' explicitly
val creator: (String) -> InnerClass = ::InnerClass
inner class InnerClass(val name: String)
}
The constructor reference does work when the inner class is not marked as inner. I can also wrap the constructor in a lambda, but that seems like it should be unnecessary. Can someone explain the reason that I get the error?