Files
codeql/java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/user.kt
Chris Smowton 28b6e263ec Kotlin: reintroduce pointless wildcards when a Java declaration explicitly uses them
For example, Java code might use `HasOutVariance<? extends String>`, or `HasInVariance<? super Object>`, both of which are needless wildcards and which the Kotlin extractor would previously have refused to reintroduce due to their not specifying a larger type than their bound. However this led to inconsistency with Java extraction, which
extracts the type as it appears in source.

This seems to particularly happen with generated code, e.g. the output of the Kotlin protobuf compiler.
2022-10-26 20:05:27 +01:00

5 lines
68 B
Kotlin

fun f() {
Test.needlessExtends(null)
Test.needlessSuper(null)
}