Files
Denis Zharkov e062e32f95 Do not load special builtin overrides from Java as synthesized
It has been done just to avoid clashes with real declarations that look
like our builtins: e.g. 'String removeAt(int index) {}' and 'String remove(int index) {}'in Java.

But synthesized members are even weaker than extensions.

Solution is just to ignore the latter declaration and treat first as effective override
of out builltin.
2015-10-14 20:39:51 +03:00

29 lines
545 B
Kotlin
Vendored

import java.util.*
fun foo() {
val al = ArrayList<String>()
al.size
al.contains(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
al.contains("")
al.remove("")
al.removeAt(1)
val hs = HashSet<String>()
hs.size
hs.contains(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
hs.contains("")
hs.remove("")
val hm = HashMap<String, Int>()
hm.size
hm.containsKey(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
hm.containsKey("")
hm[<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>]
hm[""]
hm.remove("")
}