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:
Denis.Zharkov
2021-05-26 17:44:05 +03:00
committed by TeamCityServer
parent 6136526a3a
commit d932d5b0a5
20 changed files with 219 additions and 49 deletions
@@ -8,6 +8,6 @@ object CommonCase {
operator fun <D, E, R> Fas<D, E, R>.provideDelegate(host: D, p: Any?): Fas<D, E, R> = TODO()
operator fun <D, E, R> Fas<D, E, R>.getValue(receiver: E, p: Any?): R = TODO()
val Long.test1: String by <!TYPE_MISMATCH!>delegate()<!> // common test, not working because of Inference1
val Long.test1: String by <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>delegate<!>() // common test, not working because of Inference1
val Long.test2: String by delegate<CommonCase, Long, String>() // should work
}