Files
codeql/java/ql/test/kotlin/library-tests/inherited-collection-implementation/user.kt
Chris Smowton 8266a22332 Kotlin: fix method types when an inherited method implements a collection type
In this circumstance the compiler seems to generate a specialised version of the implementing function with its argument type replaced by the interface-implementing child class' type parameter. However it stores a back-pointer to the real declared function, which we should use as the call target.
2022-10-29 11:29:04 +01:00

2 lines
75 B
Kotlin

private fun user(s: SetImpl<String>) = s.contains("Hello") && "world" in s