I was reading the stdlib docs on StateFlow, and be...
# language-proposals
n
I was reading the stdlib docs on StateFlow, and began to wonder: as stdlib docs often have vast documentation with what, when, and often how (+ additional dokka
@sample
annotations) I began to wonder: Almost nothing is as bad as public API being documented wrong: old information, deprecated behaviour, bugs in the code having invalid/unexpected behaviour. This is mostly about compiler+dokka/kdoc, but would it be feasible to offer an additional
@proof path.to.Test.withProofOfBehaviour
attached to kdoc paragraph, that at compile time/in IDE after changes to source would be checked (run using the test runner, like
git bisect
) and show the doc with red squiggly if doc proof didn't pass?
h
n
By the looks of it, that would do it (though it looks like it doesn't support existing tests but would generate new ones always solely based on code blocks in the comments). Thanks Philip, that's going straight to my build scripts