Don't use builder inference if possible
The builder inference is running only if there are still uninferred type variables ^KT-48193 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
3df5667a4b
commit
55811c8851
Vendored
-32
@@ -28,20 +28,6 @@ fun poll01(): Flow<String> {
|
||||
}
|
||||
}
|
||||
|
||||
fun poll1(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll11(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
val inv = if (flag) { ::bar2 } else { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun poll21(flag: Boolean): Flow<String> {
|
||||
return flow {
|
||||
@@ -57,20 +43,6 @@ fun poll31(flag: Boolean): Flow<String> {
|
||||
}
|
||||
}
|
||||
|
||||
fun poll41(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } finally { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll51(): Flow<String> {
|
||||
return flow {
|
||||
val inv = try { ::bar2 } catch (e: Exception) { ::foo2 } finally { ::foo2 }
|
||||
inv()
|
||||
}
|
||||
}
|
||||
|
||||
fun poll61(): Flow<String> {
|
||||
return flow {
|
||||
val inv = ::bar2
|
||||
@@ -101,12 +73,8 @@ fun poll91(): Flow<String> {
|
||||
|
||||
fun box(): String {
|
||||
poll01()
|
||||
poll1(true)
|
||||
poll11(true)
|
||||
poll21(true)
|
||||
poll31(true)
|
||||
poll41()
|
||||
poll51()
|
||||
poll61()
|
||||
poll71()
|
||||
poll81()
|
||||
|
||||
Reference in New Issue
Block a user