Skip to content

Relax Kotlin contracts for Executable parameters #4481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: marc/jdk17
Choose a base branch
from

Conversation

marcphilipp
Copy link
Member

  • Relax Kotlin contracts for Executable parameters
  • Treat Kotlin compiler warnings as errors again

Overview


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

Since `Executable` is allowed/expected to throw exceptions, the
semantics of being called `EXACTLY_ONCE` are blurry because it might not
be executed entirely when throwing an exception. Since the Kotlin 2.1
compiler emits a warning for these parameters, we're relaxing their
contracts to be called `AT_MOST_ONCE` instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate Kotlin 2.1 compiler warnings for contracts
1 participant