Join Slack
Powered by
If you could clarify the proper Kotlin syntax for ...
# getting-started
a
aviran
06/18/2017, 6:16 PM
If you could clarify the proper Kotlin syntax for this specific issue.... That would be great
d
diesieben07
06/18/2017, 6:47 PM
aviran: You would use an object expression (
https://kotlinlang.org/docs/reference/object-declarations.html#object-expressions
):
Copy code
val thing = object : MyClass() { // ... }
a
aviran
06/18/2017, 6:55 PM
Thanks
e
elizarov
06/18/2017, 7:15 PM
You can always just cut-and-paste the corresponding Java code into Kotlin file in IDEA to learn how to do it (it gets automatically convered)
👍 1
2
Views
Open in Slack
Previous
Next