[NI] Fix loosing type annotations on extension functions

#KT-32138 fixed
This commit is contained in:
Ilya Chernikov
2019-11-21 18:25:57 +01:00
parent 467e6e3d97
commit 7dd9ed7e38
11 changed files with 153 additions and 4 deletions
@@ -0,0 +1,19 @@
class B {
class Builder
}
typealias ApplyRestrictions = B.Builder.() -> B.Builder
fun applyRestrictions1(): ApplyRestrictions = { this }
fun applyRestrictions2() = applyRestrictions1()
fun <K> applyRestrictions3(<warning descr="[UNUSED_PARAMETER] Parameter 'e' is never used">e</warning>: K) = applyRestrictions1()
fun buildB() {
val a1 = applyRestrictions1()
val a2 = applyRestrictions2()
val a3 = applyRestrictions3("foo")
B.Builder().a1()
B.Builder().a2()
B.Builder().a3()
}