https://kotlinlang.org logo
Title
c

Clayton Walker

04/02/2018, 10:04 PM
not worth it for the problem we're trying to solve. we were wondering because the last comment on https://youtrack.jetbrains.com/issue/KT-8889 made it seem like end users had access, all warnings aside.
g

gildor

04/02/2018, 11:45 PM
I'm not sure but maybe your own code cannot use contracts DSL for now, maybe just stdlib can do that, try to use some function from stdlib with contracts to verify that your config is correct. Anyway, I wouldn't recommend to use it, this feature even not in experimental status
d

dsavvinov

04/03/2018, 7:57 AM
Yes, @gildor is absolutely right here -- the only one client that is allowed to annotate functions with custom
contracts
now is stdlib. Comment in the linked issue is a bit misleading, we'll clarify it to prevent further confusion -- sorry about that 🙂 In case you're interested, there's some possibility that soon we'll make those declarations
public
to allow users play with them, but that will be only in some strictly "non-production" mode of compiler, where no guarantees on stability and/or compatibility of code are given.