Solution for EA-66870: Foo<in *> and Foo<out *> types are now treated as incorrect.

#EA-66870  Fixed.
This commit is contained in:
Mikhail Glukhikh
2015-05-26 15:56:57 +03:00
parent 9b50705a0e
commit 3ad06f169d
7 changed files with 63 additions and 7 deletions
@@ -0,0 +1,11 @@
// Reproduces exception in TypeResolver.kt: EA-66870
import java.util.ArrayList
abstract class J {
public abstract fun <T : Collection<S>, S : List<<!ILLEGAL_MODIFIER!>in<!> *>> foo(x: T)
fun bar() {
val s = ArrayList<ArrayList<Int>>()
foo(s)
}
}
@@ -0,0 +1,10 @@
package
internal abstract class J {
public constructor J()
internal final fun bar(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public abstract fun </*0*/ T : kotlin.Collection<S>, /*1*/ S : kotlin.List<*>> foo(/*0*/ x: T): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -0,0 +1,11 @@
// Reproduces exception in TypeResolver.kt: EA-66870
import java.util.ArrayList
abstract class J {
public abstract fun <T : Collection<S>, S : List<<!ILLEGAL_MODIFIER!>out<!> *>> foo(x: T)
fun bar() {
val s = ArrayList<ArrayList<Int>>()
foo(s)
}
}
@@ -0,0 +1,10 @@
package
internal abstract class J {
public constructor J()
internal final fun bar(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public abstract fun </*0*/ T : kotlin.Collection<S>, /*1*/ S : kotlin.List<*>> foo(/*0*/ x: T): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}