Fix variance problems.
This commit is contained in:
@@ -35,7 +35,7 @@ public trait ResolverForModule {
|
||||
public val lazyResolveSession: ResolveSession
|
||||
}
|
||||
|
||||
public trait ResolverForProject<M : ModuleInfo, R : ResolverForModule> {
|
||||
public trait ResolverForProject<M : ModuleInfo,out R : ResolverForModule> {
|
||||
public fun resolverForModule(moduleInfo: M): R
|
||||
public fun descriptorForModule(moduleInfo: M): ModuleDescriptor
|
||||
val allModules: Collection<M>
|
||||
@@ -113,7 +113,7 @@ public trait ModuleInfo {
|
||||
}
|
||||
|
||||
//TODO: (module refactoring) extract project context
|
||||
public trait AnalyzerFacade<out A : ResolverForModule, in P : PlatformAnalysisParameters> {
|
||||
public trait AnalyzerFacade<A : ResolverForModule, in P : PlatformAnalysisParameters> {
|
||||
public fun <M : ModuleInfo> setupResolverForProject(
|
||||
globalContext: GlobalContext,
|
||||
project: Project,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
trait R<in T: Comparable<T>> {
|
||||
trait R<T: Comparable<T>> {
|
||||
var value: T
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ class Holder(var value: Int) {
|
||||
fun set(that: Any?, desc: PropertyMetadata, newValue: Int) { value = newValue }
|
||||
}
|
||||
|
||||
trait R<in T: Comparable<T>> {
|
||||
trait R<T: Comparable<T>> {
|
||||
var value: T
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class A<out T> () {
|
||||
open class A<T> () {
|
||||
fun plus(e: T) = B<T> (e)
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ class Zin<in T> {}
|
||||
|
||||
class Params(val methodIndex: Int, val paramClass: Class<*>, val expectedReturnType: String, val expecedParamType: String)
|
||||
|
||||
class Test<T, out X, in Y>() {
|
||||
class Test<T, X, in Y>() {
|
||||
|
||||
fun test1(p: T): T? = null
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ trait A
|
||||
trait B: A
|
||||
trait D
|
||||
|
||||
trait BaseSuper<T>
|
||||
trait BaseSuper<out T>
|
||||
trait BaseImpl: BaseSuper<D>
|
||||
trait DerivedSuper<out S>: <!INCONSISTENT_TYPE_PARAMETER_VALUES!>BaseSuper<S>, BaseImpl<!>
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ internal trait BaseImpl : BaseSuper<D> {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal trait BaseSuper</*0*/ T> {
|
||||
internal trait BaseSuper</*0*/ out T> {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user