FIR: Do not add alias for variables with explicit type
This commit is contained in:
committed by
TeamCityServer
parent
5317cf3af1
commit
a0a57581ec
+1
-1
@@ -10,5 +10,5 @@ fun main() {
|
||||
val c : ListOfLists<*> = b
|
||||
val d : ArrayList<ArrayList<*>> = <!INITIALIZER_TYPE_MISMATCH!>c.x<!>
|
||||
|
||||
c.x checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><ArrayList<out ArrayList<*>>>() }
|
||||
c.x checkType { _<ArrayList<out ArrayList<*>>>() }
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
class A<out T, in E> {
|
||||
fun foo(x: @UnsafeVariance T) {}
|
||||
fun foo(x: @UnsafeVariance T, y: List<@UnsafeVariance T>): @UnsafeVariance E = null!!
|
||||
|
||||
fun bar(): List<@UnsafeVariance E> = null!!
|
||||
}
|
||||
|
||||
fun foo(x: A<String, Any?>, cs: CharSequence, ls: List<CharSequence>) {
|
||||
val y: A<CharSequence, String> = x
|
||||
|
||||
y.foo(<!ARGUMENT_TYPE_MISMATCH!>cs<!>)
|
||||
val s: String = <!INITIALIZER_TYPE_MISMATCH!>y.foo(<!ARGUMENT_TYPE_MISMATCH!>cs<!>, <!ARGUMENT_TYPE_MISMATCH!>ls<!>)<!>
|
||||
|
||||
val ls2: List<String> = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH!>y.bar()<!>
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
class A<out T, in E> {
|
||||
|
||||
Reference in New Issue
Block a user