[FE 1.0] Introduce deprecation of inferred type variable into a declared upper bound within a builder inference call

This commit is contained in:
Victor Petukhov
2022-05-31 13:42:35 +02:00
committed by teamcity
parent 848075192c
commit b472ccd358
31 changed files with 300 additions and 35 deletions
@@ -0,0 +1,12 @@
/kt47986_2.kt:4:18: warning: parameter 'builderAction' is never used
fun <K> buildFoo(builderAction: Foo<K>.() -> Unit): Foo<K> = Foo()
^
/kt47986_2.kt:11:9: warning: variable 'x' is never used
val x = buildFoo { // can't infer
^
/kt47986_2.kt:11:13: warning: type parameter for a type argument K can't be inferred into declared upper bounds. Please provide any use-site type information. It will become an error in future releases.
val x = buildFoo { // can't infer
^
/kt47986_2.kt:12:13: warning: variable 'y' is never used
val y = id(::bar)
^