FIR checker: report SETTER_PROJECTED_OUT
This commit is contained in:
committed by
TeamCityServer
parent
c3a91efea3
commit
cdfb2fb3d9
-13
@@ -1,13 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNREACHABLE_CODE -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
// t is unused due to KT-4233
|
||||
interface Tr<T> {
|
||||
var v: T
|
||||
}
|
||||
|
||||
fun test(t: Tr<*>) {
|
||||
t.v = null!!
|
||||
t.v = <!ASSIGNMENT_TYPE_MISMATCH!>""<!>
|
||||
t.v = <!NULL_FOR_NONNULL_TYPE!>null<!>
|
||||
t.v checkType { _<Any?>() }
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNREACHABLE_CODE -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
// t is unused due to KT-4233
|
||||
|
||||
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNREACHABLE_CODE
|
||||
interface Tr<T> {
|
||||
var v: T
|
||||
}
|
||||
|
||||
fun test(t: Tr<out String>) {
|
||||
// resolved as t.v = t.v + null!!, where type of right operand is String,
|
||||
// so TYPE_MISMATCH: String is not <: of Captured(out String)
|
||||
<!ASSIGNMENT_TYPE_MISMATCH!>t.v += null!!<!>
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNREACHABLE_CODE
|
||||
interface Tr<T> {
|
||||
var v: T
|
||||
|
||||
Reference in New Issue
Block a user