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.
This commit is contained in:
Denis Zharkov
2015-10-13 17:48:41 +03:00
committed by Mikhail Glukhikh
parent cd589b7e6a
commit e062e32f95
18 changed files with 375 additions and 37 deletions
@@ -0,0 +1,28 @@
import java.util.*
fun foo() {
val al = ArrayList<String>()
al.size
al.contains(1)
al.contains("")
al.remove("")
al.removeAt(1)
val hs = HashSet<String>()
hs.size
hs.contains(1)
hs.contains("")
hs.remove("")
val hm = HashMap<String, Int>()
hm.size
hm.<!DEPRECATION!>containsKey<!>(1)
hm.containsKey("")
<!DEPRECATION!>hm[1]<!>
hm[""]
hm.remove("")
}
@@ -0,0 +1,3 @@
package
public fun foo(): kotlin.Unit