56477f0af8
Load immutable flexible upper bound for 'Iterable<? super T>' We load 'Collection<? super CharSequence>' as 'MutableCollection<in CharSequence>' instead of 'MutableCollection<in CharSequence>..Collection<*>' because it's obviously not typesafe to use any 'Collection<*>' as argument for such type. But there'se nothing bad with loading 'Iterable<? super CharSequence>' as 'MutableIterable<*>..Collection<*>'. Same for other declarations that have covariant mutable representation (currently Iterator, ListIterator). Also there are useful use-cases when it's neccessary to use 'Iterable<*>' as an argument for parameter with type 'Iterable<? super T>' (see matchers.kt test). NB: Star-projections appear in examples because types like 'Collection<in CharSequence>' with conflicting use-site projections are invalid in Kotlin, but they are valid in Java.
24 lines
1.0 KiB
Plaintext
Vendored
24 lines
1.0 KiB
Plaintext
Vendored
package
|
|
|
|
public fun test(/*0*/ x: kotlin.collections.List<kotlin.String>): kotlin.Unit
|
|
|
|
public open class Assert {
|
|
public constructor Assert()
|
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
|
|
// Static members
|
|
public open fun </*0*/ T : kotlin.Any!> assertThat(/*0*/ actual: T!, /*1*/ matcher: Matcher<in T!>!): kotlin.Unit
|
|
}
|
|
|
|
public open class Matcher</*0*/ T : kotlin.Any!> {
|
|
public constructor Matcher</*0*/ T : kotlin.Any!>()
|
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
|
|
|
// Static members
|
|
public open fun </*0*/ T : kotlin.Any!> hasItem(/*0*/ item: T!): Matcher<kotlin.collections.(Mutable)Iterable<*>!>!
|
|
}
|