[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
|
||||
|
||||
Reference in New Issue
Block a user