FIR: add test fixing builder inference case
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
interface KtScope {
|
||||
fun getAllNames(): Set<String>
|
||||
}
|
||||
|
||||
inline fun <E> buildSet(@BuilderInference builderAction: MutableSet<E>.() -> Unit): Set<E> {
|
||||
return null!!
|
||||
}
|
||||
|
||||
inline fun <R> withValidityAssertion(action: () -> R): R {
|
||||
return action()
|
||||
}
|
||||
|
||||
class KtFirCompositeScope(val subScopes: List<KtScope>) {
|
||||
fun getAllNames(): Set<String> = withValidityAssertion {
|
||||
buildSet {
|
||||
subScopes.flatMapTo(this) { it.getAllNames() }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user