-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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:
https://github.com/junit-team/junit5/blob/4ba2f600b1011f22c6619382208d07f0694c38f4/junit-jupiter-api/junit-jupiter-api.gradle.kts#L26-L29
Deliverables
- Resolve the warnings or suppress them if they're false positives