Description
The Kotlin contracts introduced in #1866 cause the following warnings after bumping apiVersion
and languageVersion
to 2.1 on the marc/jdk17
branch.
w: junit-jupiter-api/src/main/kotlin/org/junit/jupiter/api/Assertions.kt:414:9 Wrong invocation kind 'EXACTLY_ONCE' for 'executable: () -> R' specified, the actual invocation kind is 'AT_MOST_ONCE'.
w: junit-jupiter-api/src/main/kotlin/org/junit/jupiter/api/Assertions.kt:442:9 Wrong invocation kind 'EXACTLY_ONCE' for 'executable: () -> R' specified, the actual invocation kind is 'AT_MOST_ONCE'.
w: junit-jupiter-api/src/main/kotlin/org/junit/jupiter/api/Assertions.kt:466:9 Wrong invocation kind 'EXACTLY_ONCE' for 'executable: () -> R' specified, the actual invocation kind is 'AT_MOST_ONCE'.
w: junit-jupiter-api/src/main/kotlin/org/junit/jupiter/api/Assertions.kt:490:9 Wrong invocation kind 'EXACTLY_ONCE' for 'executable: () -> R' specified, the actual invocation kind is 'AT_MOST_ONCE'.
These warnings can be reproduced by running ./gradlew :junit-jupiter-api:compileKotlin --rerun
They are currently not treated as errors:
junit5/junit-jupiter-api/junit-jupiter-api.gradle.kts
Lines 26 to 29 in 4ba2f60
Deliverables
- Resolve the warnings or suppress them if they're false positives