mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
Customize JVM signature for Collection's members
- Do not write signature for `contains` - Write signature for `containsAll` as it's declared like `containsAll(Collection<?>)`
This commit is contained in:
13
compiler/testData/codegen/boxWithJava/collections/mutableList/J.java
vendored
Normal file
13
compiler/testData/codegen/boxWithJava/collections/mutableList/J.java
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import java.util.*;
|
||||
|
||||
public class J {
|
||||
|
||||
private static class MyList<E> extends KList<E> {}
|
||||
|
||||
public static String foo() {
|
||||
Collection<String> collection = new MyList<String>();
|
||||
if (!collection.contains("ABCDE")) return "fail 1";
|
||||
if (!collection.containsAll(Arrays.asList(1, 2, 3))) return "fail 2";
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user