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:
committed by
Mikhail Glukhikh
parent
cb91c6b977
commit
3e69838f48
@@ -1,4 +1,4 @@
|
||||
public open class Annotated : R|java/lang/Object| {
|
||||
public open class Annotated : R|kotlin/Any| {
|
||||
@R|org/jetbrains/annotations/NotNull|() public open operator fun foo(@R|org/jetbrains/annotations/Nullable|() param: R|kotlin/String|?): R|kotlin/String|
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public open class Annotated : R|java/lang/Object| {
|
||||
public open class Annotated : R|kotlin/Any| {
|
||||
@R|org/jetbrains/annotations/NotNull|() public open operator fun foo(@R|org/jetbrains/annotations/Nullable|() param: R|kotlin/String|?): R|kotlin/String|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public open class Some : R|java/lang/Object| {
|
||||
public open class Some : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class A<T> : R|java/lang/Object| {
|
||||
public open class A<T> : R|kotlin/Any| {
|
||||
public open operator fun foo(t: R|ft<T, T?>|!): R|ft<T, T?>|!
|
||||
|
||||
}
|
||||
|
||||
@@ -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|()))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public open class Inheritor : R|java/lang/Object|, R|Base| {
|
||||
public open class Inheritor : R|kotlin/Any|, R|Base| {
|
||||
public open operator fun getX(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class Some : R|java/lang/Object|, R|Strange<*>| {
|
||||
public open class Some : R|kotlin/Any|, R|Strange<*>| {
|
||||
public open operator fun foo(): R|kotlin/Any|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class A : R|java/lang/Object| {
|
||||
public open class A : R|kotlin/Any| {
|
||||
public open operator fun foo(): R|ft<A, A?>|!
|
||||
|
||||
public open operator fun bar(): R|ft<A, A?>|!
|
||||
|
||||
Reference in New Issue
Block a user