FIR: Support flexible types in getErasedVersionOfFirstUpperBound
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ val strList: List<String> = null!!
|
||||
fun main() {
|
||||
val rawA = Test.rawAField
|
||||
rawA.first = Test.rawAField.second
|
||||
Test.rawAField.second = rawA.first.<!INAPPLICABLE_CANDIDATE!>second<!>
|
||||
Test.rawAField.second = rawA.first.second
|
||||
|
||||
rawA.listOfDoubles = strList
|
||||
rawA.listOfDoubles = "" // first should be List
|
||||
|
||||
+3
-3
@@ -27,12 +27,12 @@ public class Test {
|
||||
|
||||
fun foo(x: B<*>) {
|
||||
// TODO: x.foo() now is flexible type instead of raw, because of captured type approximation
|
||||
val q: MutableList<String> = x.foo().<!INAPPLICABLE_CANDIDATE!>getChildrenStubs<!>()
|
||||
val q: MutableList<String> = x.foo().getChildrenStubs()
|
||||
|
||||
// Raw(B).field erased to A<Any!>..A<out Any!>?
|
||||
Test.rawB.field = A<String>()
|
||||
val anyA: A<Any> = Test.rawB.field
|
||||
|
||||
Test.rawB.field.<!INAPPLICABLE_CANDIDATE!>consume<!>("")
|
||||
val y: Any = Test.rawB.field.<!INAPPLICABLE_CANDIDATE!>produce<!>()
|
||||
Test.rawB.field.consume("")
|
||||
val y: Any = Test.rawB.field.produce()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user