FIR: Support adding expect type to calls in foo() as R position
See https://kotlinlang.org/docs/whatsnew12.html#support-for-foo-as-a-shorthand-for-this-foo
This commit is contained in:
committed by
TeamCityServer
parent
6136526a3a
commit
d932d5b0a5
@@ -8,9 +8,9 @@ inline fun <reified T> foo(): T {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val fooCall = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!>() as String // T in foo should be inferred to String
|
||||
val fooCall = foo() as String // T in foo should be inferred to String
|
||||
fooCall checkType { _<String>() }
|
||||
|
||||
val safeFooCall = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!>() as? String
|
||||
val safeFooCall = foo() as? String
|
||||
safeFooCall checkType { _<String?>() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user