Upgrading kotlin 0.9 project to 1.0.1 .. help!

I can’t figure how to fix these compilation errors:

javaClass()
error: Kotlin: Unresolved reference: javaClass

val myEvent: Event = Event()
myEvent += { (e: MyType): Unit → printMyType(e) }
error: “e: is unexpected token”

Use SomeType::class.java instead of javaClass<SomeType>.

No parentheses around parameters of lambda is required, rewrite as:

myEvent += { e: MyType -> printMyType(e) }

or

myEvent += { printMyType(it) }
1 Like

worked. many many 10x!!