FIR Java: map classes to make java type-parameters have correct bounds

Really, this commit implements early J2K mapping for all Java types.
It's questionable and probably wrong at least for super-types,
because, for example, we cannot resolve spliterator() in classes
derived from java.lang.Iterable
This commit is contained in:
Simon Ogorodnik
2019-04-23 04:22:12 +03:00
committed by Mikhail Glukhikh
parent cb91c6b977
commit 3e69838f48
279 changed files with 338 additions and 337 deletions
@@ -1,6 +1,6 @@
public open class Some : R|java/lang/Object| {
public open class Some : R|kotlin/Any| {
public open operator fun foo(param: R|kotlin/Int|): R|kotlin/Boolean|
public open operator fun bar(arr: R|kotlin/IntArray|): R|kotlin/Array<ft<java/lang/String, java/lang/String?>>|
public open operator fun bar(arr: R|kotlin/IntArray|): R|kotlin/Array<ft<kotlin/String, kotlin/String?>>|
}
@@ -7,7 +7,7 @@ FILE: jvm.kt
public final fun test(): R|kotlin/Unit| {
lval res1: R|kotlin/Boolean| = R|/Some.foo|(Int(1))
lval res2: R|kotlin/Boolean| = R|/Some.foo|(Int(1).R|kotlin/Int.unaryMinus|())
lval res3: R|kotlin/Array<ft<java/lang/String, java/lang/String?>>| = R|/Some.bar|(R|kotlin/intArrayOf|(Int(0), Int(2), Int(2).R|kotlin/Int.unaryMinus|()))
lval res3: R|kotlin/Array<ft<kotlin/String, kotlin/String?>>| = R|/Some.bar|(R|kotlin/intArrayOf|(Int(0), Int(2), Int(2).R|kotlin/Int.unaryMinus|()))
}
}