Join Slack
Powered by
Can I write contract inside an interface?
# announcements
a
amadeu01
04/08/2019, 1:00 PM
Can I write contract inside an interface?
g
gildor
04/08/2019, 1:28 PM
No, only in a top-level function
a
amadeu01
04/08/2019, 4:10 PM
@gildor
sorry, but what is top-level function?
g
gildor
04/08/2019, 4:33 PM
This is a function declared outside of class or interface, on file level
gildor
04/08/2019, 4:34 PM
https://kotlinlang.org/docs/reference/functions.html#function-scope
gildor
04/08/2019, 4:35 PM
Also see KEEP about this limitation
https://github.com/Kotlin/KEEP/blob/master/proposals/kotlin-contracts.md#limitations-and-capabilities-of-the-prototype
6
Views
Open in Slack
Previous
Next