[FIR] Java super-type arguments are now handled as flexible
This commit is contained in:
Vendored
+4
-4
@@ -28,11 +28,11 @@ interface WithFoo {
|
||||
|
||||
fun <M2: WithFoo> foo(delegateResolver: ResolverForProject<M2?>): ResolverForProject<M2?> {
|
||||
val descriptorByModule = MyMap<M2, String>()
|
||||
val result = <!INAPPLICABLE_CANDIDATE!>ResolverForProjectImpl<!>(descriptorByModule, delegateResolver)
|
||||
result.<!UNRESOLVED_REFERENCE!>exposeM<!>.<!UNRESOLVED_REFERENCE!>foo<!>() // M is not M2?
|
||||
result.<!UNRESOLVED_REFERENCE!>exposeM<!>?.<!UNRESOLVED_REFERENCE!>foo<!>() // no warning, M is not M2, hense M is M2!
|
||||
val result = ResolverForProjectImpl(descriptorByModule, delegateResolver)
|
||||
result.exposeM.foo() // M is not M2?
|
||||
result.exposeM?.foo() // no warning, M is not M2, hense M is M2!
|
||||
|
||||
return <!INAPPLICABLE_CANDIDATE!>ResolverForProjectImpl<!>(descriptorByModule, delegateResolver) // another bound check
|
||||
return ResolverForProjectImpl(descriptorByModule, delegateResolver) // another bound check
|
||||
}
|
||||
|
||||
// MyMap<M2, String> :< Map<M, String> => M = M2!
|
||||
|
||||
+4
-4
@@ -22,10 +22,10 @@ fun test(b: B, c: C, d: D, e: E) {
|
||||
eatAString(d)
|
||||
eatAString(e)
|
||||
|
||||
<!INAPPLICABLE_CANDIDATE!>eatAStringN<!>(b)
|
||||
<!INAPPLICABLE_CANDIDATE!>eatAStringN<!>(c)
|
||||
<!INAPPLICABLE_CANDIDATE!>eatAStringN<!>(d)
|
||||
<!INAPPLICABLE_CANDIDATE!>eatAStringN<!>(e)
|
||||
eatAStringN(b)
|
||||
eatAStringN(c)
|
||||
eatAStringN(d)
|
||||
eatAStringN(e)
|
||||
}
|
||||
|
||||
// FILE: 3.kt
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ FILE fqName:<root> fileName:/builtinMap.kt
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:java.util.LinkedHashMap<K1 of <root>.plus, V1 of <root>.plus>) returnType:kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER name:<this> type:java.util.LinkedHashMap<K1 of <root>.plus, V1 of <root>.plus>
|
||||
BLOCK_BODY
|
||||
CALL 'public open fun put (p0: K1 of <root>.plus, p1: V1 of <root>.plus): V1 of <root>.plus? [operator] declared in java.util.HashMap' type=V1 of <root>.plus? origin=null
|
||||
CALL 'public open fun put (p0: K1 of <root>.plus?, p1: V1 of <root>.plus?): V1 of <root>.plus? [operator] declared in java.util.HashMap' type=V1 of <root>.plus? origin=null
|
||||
$this: GET_VAR '<this>: java.util.LinkedHashMap<K1 of <root>.plus, V1 of <root>.plus> declared in special.<anonymous>' type=java.util.LinkedHashMap<K1 of <root>.plus, V1 of <root>.plus> origin=null
|
||||
p0: CALL 'public final fun <get-first> (): K1 of <root>.plus declared in kotlin.Pair' type=K1 of <root>.plus origin=null
|
||||
$this: GET_VAR 'pair: kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus> declared in <root>.plus' type=kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus> origin=null
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public abstract class ClassWithTypePExtendsIterableP<P> : R|kotlin/Any|, R|kotlin/collections/MutableIterable<P>| {
|
||||
public abstract class ClassWithTypePExtendsIterableP<P> : R|kotlin/Any|, R|kotlin/collections/MutableIterable<ft<P, P?>!>| {
|
||||
public constructor<P>(): R|test/ClassWithTypePExtendsIterableP<P>|
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public final enum class AnnotatedEnumEntry : R|kotlin/Enum<test/AnnotatedEnumEntry>| {
|
||||
public final enum class AnnotatedEnumEntry : R|kotlin/Enum<ft<test/AnnotatedEnumEntry, test/AnnotatedEnumEntry?>!>| {
|
||||
@R|test/AnnotatedEnumEntry.Anno|(String(a)) public final static field E1: R|ft<test/AnnotatedEnumEntry, test/AnnotatedEnumEntry?>!|
|
||||
|
||||
@R|test/AnnotatedEnumEntry.Anno|(String(b)) @R|test/AnnotatedEnumEntry.Anno2|() public final static field E2: R|ft<test/AnnotatedEnumEntry, test/AnnotatedEnumEntry?>!|
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public final enum class EnumConstructorParameter : R|kotlin/Enum<test/EnumConstructorParameter>| {
|
||||
public final enum class EnumConstructorParameter : R|kotlin/Enum<ft<test/EnumConstructorParameter, test/EnumConstructorParameter?>!>| {
|
||||
public final static field INSTANCE: R|ft<test/EnumConstructorParameter, test/EnumConstructorParameter?>!|
|
||||
|
||||
private constructor(@R|test/EnumConstructorParameter.Anno|(String(string)) s: R|ft<kotlin/String, kotlin/String?>!|): R|test/EnumConstructorParameter|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public final enum class EnumMembers : R|kotlin/Enum<test/EnumMembers>| {
|
||||
public final enum class EnumMembers : R|kotlin/Enum<ft<test/EnumMembers, test/EnumMembers?>!>| {
|
||||
public final static field FIRST: R|ft<test/EnumMembers, test/EnumMembers?>!|
|
||||
|
||||
public final static field SECOND: R|ft<test/EnumMembers, test/EnumMembers?>!|
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public open enum class EnumWithSpecializedEntry : R|kotlin/Enum<test/EnumWithSpecializedEntry>| {
|
||||
public open enum class EnumWithSpecializedEntry : R|kotlin/Enum<ft<test/EnumWithSpecializedEntry, test/EnumWithSpecializedEntry?>!>| {
|
||||
public final static field E1: R|ft<test/EnumWithSpecializedEntry, test/EnumWithSpecializedEntry?>!|
|
||||
|
||||
public final static field E2: R|ft<test/EnumWithSpecializedEntry, test/EnumWithSpecializedEntry?>!|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public final enum class JavaEnum : R|kotlin/Enum<test/JavaEnum>| {
|
||||
public final enum class JavaEnum : R|kotlin/Enum<ft<test/JavaEnum, test/JavaEnum?>!>| {
|
||||
public final static field ENTRY: R|ft<test/JavaEnum, test/JavaEnum?>!|
|
||||
|
||||
public final static field ANOTHER: R|ft<test/JavaEnum, test/JavaEnum?>!|
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public abstract interface SubclassOfCollection<E> : R|kotlin/collections/MutableCollection<E>| {
|
||||
public abstract interface SubclassOfCollection<E> : R|kotlin/collections/MutableCollection<ft<E, E?>!>| {
|
||||
public abstract operator fun iterator(): R|kotlin/collections/MutableIterator<ft<E, E?>!>|
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
public abstract interface SubclassOfMapEntry<K, V> : R|kotlin/collections/MutableMap.MutableEntry<K, V>| {
|
||||
public abstract operator fun setValue(value: R|V|): R|V|
|
||||
public abstract interface SubclassOfMapEntry<K, V> : R|kotlin/collections/MutableMap.MutableEntry<ft<K, K?>!, ft<V, V?>!>| {
|
||||
public abstract operator fun setValue(value: R|ft<V, V?>!|): R|ft<V, V?>!|
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
public open class ModalityOfFakeOverrides : R|java/util/AbstractList<kotlin/String>| {
|
||||
public open class ModalityOfFakeOverrides : R|java/util/AbstractList<ft<kotlin/String, kotlin/String?>!>| {
|
||||
@R|java/lang/Override|() @R|org/jetbrains/annotations/NotNull|() public open operator fun get(index: R|kotlin/Int|): R|kotlin/String|
|
||||
|
||||
@R|java/lang/Override|() public open operator fun size(): R|kotlin/Int|
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
public abstract interface SubstitutedSamInterface : R|java/util/Comparator<kotlin/String>| {
|
||||
public abstract interface SubstitutedSamInterface : R|java/util/Comparator<ft<kotlin/String, kotlin/String?>!>| {
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
public abstract interface SubstitutedSamInterfaceSubclassOfBuiltin : R|kotlin/Comparable<test/SubstitutedSamInterfaceSubclassOfBuiltin>| {
|
||||
public abstract interface SubstitutedSamInterfaceSubclassOfBuiltin : R|kotlin/Comparable<ft<test/SubstitutedSamInterfaceSubclassOfBuiltin, test/SubstitutedSamInterfaceSubclassOfBuiltin?>!>| {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public final enum class Enum : R|kotlin/Enum<test/Enum>| {
|
||||
public final enum class Enum : R|kotlin/Enum<ft<test/Enum, test/Enum?>!>| {
|
||||
public final static field A: R|ft<test/Enum, test/Enum?>!|
|
||||
|
||||
public final static field B: R|ft<test/Enum, test/Enum?>!|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public final enum class StaticMembersInEnum : R|kotlin/Enum<test/StaticMembersInEnum>| {
|
||||
public final enum class StaticMembersInEnum : R|kotlin/Enum<ft<test/StaticMembersInEnum, test/StaticMembersInEnum?>!>| {
|
||||
public final static field ENTRY: R|ft<test/StaticMembersInEnum, test/StaticMembersInEnum?>!|
|
||||
|
||||
public open static field STATIC_FIELD: R|kotlin/Int|
|
||||
|
||||
Reference in New Issue
Block a user