Undeprecate @BuilderInference annotation #KT-52400 Declined

This commit is contained in:
Mikhail Glukhikh
2022-08-16 16:59:43 +02:00
committed by Space
parent 744896b571
commit b4a92e8a56
6 changed files with 3 additions and 9 deletions
@@ -1,4 +1,4 @@
fun <T> foo(@<!DEPRECATION, OPT_IN_USAGE_ERROR!>BuilderInference<!> block: MutableList<T>.() -> Unit): T = null!!
fun <T> foo(@<!OPT_IN_USAGE_ERROR!>BuilderInference<!> block: MutableList<T>.() -> Unit): T = null!!
fun takeString(s: String) {}
@@ -12,7 +12,7 @@ fun test_2() {
takeList(list)
}
fun <E> myBuildList(@<!DEPRECATION, OPT_IN_USAGE_ERROR!>BuilderInference<!> builderAction: MutableList<E>.() -> Unit): List<E> {
fun <E> myBuildList(@<!OPT_IN_USAGE_ERROR!>BuilderInference<!> builderAction: MutableList<E>.() -> Unit): List<E> {
return ArrayList<E>().apply(builderAction)
}
@@ -2,7 +2,7 @@ interface KtScope {
fun getAllNames(): Set<String>
}
inline fun <E> buildSet(@<!DEPRECATION, OPT_IN_USAGE_ERROR!>BuilderInference<!> builderAction: MutableSet<E>.() -> Unit): Set<E> {
inline fun <E> buildSet(@<!OPT_IN_USAGE_ERROR!>BuilderInference<!> builderAction: MutableSet<E>.() -> Unit): Set<E> {
return null!!
}