mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 00:21:29 +00:00
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 AmbiguousAdapters : R|java/lang/Object| {
|
||||
public open class AmbiguousAdapters : R|kotlin/Any| {
|
||||
public open operator fun foo(r: R|ft<java/lang/Runnable, java/lang/Runnable?>|!): R|kotlin/Unit|
|
||||
|
||||
public open operator fun foo(c: R|ft<java/io/Closeable, java/io/Closeable?>|!): R|kotlin/Unit|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class Basic : R|java/lang/Object| {
|
||||
public open class Basic : R|kotlin/Any| {
|
||||
public open operator fun foo(r: R|ft<java/lang/Runnable, java/lang/Runnable?>|!): R|kotlin/Unit|
|
||||
|
||||
public open static operator fun bar(r: R|ft<java/lang/Runnable, java/lang/Runnable?>|!): R|kotlin/Unit|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class Constructor : R|java/lang/Object| {
|
||||
public open class Constructor : R|kotlin/Any| {
|
||||
public constructor(r: R|ft<java/lang/Runnable, java/lang/Runnable?>|!): R|test/Constructor|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class ConstructorWithAnnotations : R|java/lang/Object| {
|
||||
public open class ConstructorWithAnnotations : R|kotlin/Any| {
|
||||
public constructor(r: R|ft<java/lang/Runnable, java/lang/Runnable?>|!, @R|org/jetbrains/annotations/NotNull|() s: R|kotlin/String|): R|test/ConstructorWithAnnotations|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface DeepSamLoop : R|java/lang/Object| {
|
||||
public abstract interface DeepSamLoop : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
public open class NonTrivialFunctionType : R|java/lang/Object| {
|
||||
public open class NonTrivialFunctionType : R|kotlin/Any| {
|
||||
public open operator fun foo(filenameFilter: R|ft<java/io/FilenameFilter, java/io/FilenameFilter?>|!): R|kotlin/Unit|
|
||||
|
||||
public open operator fun foo(comparator: R|ft<java/util/Comparator<ft<kotlin/String, kotlin/String?>>, java/util/Comparator<ft<kotlin/String, kotlin/String?>>?>|!): R|kotlin/Unit|
|
||||
|
||||
public open operator fun wildcardUnbound(comparator: R|ft<java/util/Comparator<*>, java/util/Comparator<*>?>|!): R|kotlin/Unit|
|
||||
|
||||
public open operator fun wildcardBound(comparator: R|ft<java/util/Comparator<in java/lang/CharSequence>, java/util/Comparator<in java/lang/CharSequence>?>|!): R|kotlin/Unit|
|
||||
public open operator fun wildcardBound(comparator: R|ft<java/util/Comparator<in kotlin/CharSequence>, java/util/Comparator<in kotlin/CharSequence>?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class PrivateSamAdapter : R|java/lang/Object| {
|
||||
public open class PrivateSamAdapter : R|kotlin/Any| {
|
||||
private open operator fun samAdapter(r: R|ft<test/PrivateSamAdapter.SamInterface, test/PrivateSamAdapter.SamInterface?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public abstract interface SelfAsParameter : R|java/lang/Object| {
|
||||
public abstract interface SelfAsParameter : R|kotlin/Any| {
|
||||
public abstract operator fun foo(p: R|ft<test/SelfAsParameter, test/SelfAsParameter?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class SeveralSamParameters : R|java/lang/Object| {
|
||||
public open class SeveralSamParameters : R|kotlin/Any| {
|
||||
public open static operator fun findMaxAndInvokeCallback(comparator: R|ft<java/util/Comparator<ft<kotlin/String, kotlin/String?>>, java/util/Comparator<ft<kotlin/String, kotlin/String?>>?>|!, a: R|ft<kotlin/String, kotlin/String?>|!, b: R|ft<kotlin/String, kotlin/String?>|!, afterRunnable: R|ft<java/lang/Runnable, java/lang/Runnable?>|!): R|ft<kotlin/String, kotlin/String?>|!
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class TypeParameterOfClass<T> : R|java/lang/Object| {
|
||||
public open class TypeParameterOfClass<T> : R|kotlin/Any| {
|
||||
public open operator fun foo(comparator: R|ft<java/util/Comparator<ft<T, T?>>, java/util/Comparator<ft<T, T?>>?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
public open class TypeParameterOfMethod : R|java/lang/Object| {
|
||||
public open class TypeParameterOfMethod : R|kotlin/Any| {
|
||||
public open static operator fun <T> max(comparator: R|ft<java/util/Comparator<ft<T, T?>>, java/util/Comparator<ft<T, T?>>?>|!, value1: R|ft<T, T?>|!, value2: R|ft<T, T?>|!): R|ft<T, T?>|!
|
||||
|
||||
public open static operator fun <T : R|java/lang/CharSequence|> max2(comparator: R|ft<java/util/Comparator<ft<T, T?>>, java/util/Comparator<ft<T, T?>>?>|!, value1: R|ft<T, T?>|!, value2: R|ft<T, T?>|!): R|ft<T, T?>|!
|
||||
public open static operator fun <T : R|kotlin/CharSequence|> max2(comparator: R|ft<java/util/Comparator<ft<T, T?>>, java/util/Comparator<ft<T, T?>>?>|!, value1: R|ft<T, T?>|!, value2: R|ft<T, T?>|!): R|ft<T, T?>|!
|
||||
|
||||
public open static operator fun <A : R|java/lang/CharSequence|, B : R|java/util/List<A>|> method(a: R|ft<java/util/Comparator<ft<A, A?>>, java/util/Comparator<ft<A, A?>>?>|!, b: R|ft<B, B?>|!): R|kotlin/Unit|
|
||||
public open static operator fun <A : R|kotlin/CharSequence|, B : R|kotlin/collections/List<A>|> method(a: R|ft<java/util/Comparator<ft<A, A?>>, java/util/Comparator<ft<A, A?>>?>|!, b: R|ft<B, B?>|!): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public open class TypeParameterOfOuterClass<T> : R|java/lang/Object| {
|
||||
public open class TypeParameterOfOuterClass<T> : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface AdapterDoesntOverrideDeclaration : R|java/lang/Object| {
|
||||
public abstract interface AdapterDoesntOverrideDeclaration : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface InheritedAdapterAndDeclaration : R|java/lang/Object| {
|
||||
public abstract interface InheritedAdapterAndDeclaration : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface InheritedAmbiguousAdapters : R|java/lang/Object| {
|
||||
public abstract interface InheritedAmbiguousAdapters : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface InheritedAndOverriddenAmbiguousAdapters : R|java/lang/Object| {
|
||||
public abstract interface InheritedAndOverriddenAmbiguousAdapters : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface InheritedOverridden : R|java/lang/Object| {
|
||||
public abstract interface InheritedOverridden : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface InheritedOverriddenAdapter : R|java/lang/Object| {
|
||||
public abstract interface InheritedOverriddenAdapter : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface InheritedSameAdapters : R|java/lang/Object| {
|
||||
public abstract interface InheritedSameAdapters : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface InheritedSameAdaptersWithSubstitution : R|java/lang/Object| {
|
||||
public abstract interface InheritedSameAdaptersWithSubstitution : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface InheritedSimple : R|java/lang/Object| {
|
||||
public abstract interface InheritedSimple : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
public abstract interface OverriddenAmbiguousAdapters : R|java/lang/Object| {
|
||||
public abstract interface OverriddenAmbiguousAdapters : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user