Refine type from property setter parameter on assignment
In most cases these types are equals, the only known exception is var-property contained in projected type member scope (see test data)
This commit is contained in:
Vendored
+3
-1
@@ -4,5 +4,7 @@ interface Tr<T> {
|
||||
}
|
||||
|
||||
fun test(t: Tr<out String>) {
|
||||
t.<!SETTER_PROJECTED_OUT!>v<!> += null!!
|
||||
// resolved as t.v = t.v + null!!, where type of right operand is String,
|
||||
// so TYPE_MISMATCH: String is not <: of Captured(out String)
|
||||
<!TYPE_MISMATCH!>t.v += null!!<!>
|
||||
}
|
||||
Reference in New Issue
Block a user