Tests: fix stdlib declarations in IR interpreter test data
Fix some unresolved supertypes. This is necessary to be able to enable IR fake override builder by default (KT-61514), because it traverses all supertypes and asserts that they're classes, so that it can build fake overrides for declarations from there. Without this change, for example `IrFakeOverrideBuilder.buildFakeOverridesForClass` would crash.
This commit is contained in:
committed by
Space Team
parent
10dbe73828
commit
cf425ffded
+6
-1
@@ -19,6 +19,11 @@ private object EmptySequence : Sequence<Nothing>, DropTakeSequence<Nothing> {
|
||||
override fun take(n: Int) = EmptySequence
|
||||
}
|
||||
|
||||
internal interface DropTakeSequence<T> : Sequence<T> {
|
||||
fun drop(n: Int): Sequence<T>
|
||||
fun take(n: Int): Sequence<T>
|
||||
}
|
||||
|
||||
public inline fun <T> Sequence<T>?.orEmpty(): Sequence<T> = this ?: emptySequence()
|
||||
|
||||
private class GeneratorSequence<T : Any>(private val getInitialValue: () -> T?, private val getNextValue: (T) -> T?) : Sequence<T> {
|
||||
@@ -119,4 +124,4 @@ private fun <T> Appendable.appendElement(element: T, transform: ((T) -> CharSequ
|
||||
element is Char -> append(element)
|
||||
else -> append(element.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user