Ignore redundant projections for declaration-site variance

This commit is contained in:
Denis Zharkov
2016-01-14 12:01:02 +03:00
parent 06d0a7c17c
commit 23d2b87a52
4 changed files with 31 additions and 11 deletions
@@ -0,0 +1,17 @@
class Out<out E>
interface Open
class Final
fun foo(x: Out<out Open>, y: Out<out Final>): Out<out Open> = Out()
// method: RedundantProjectionsKt::foo
// jvm signature: (LOut;LOut;)LOut;
// generic signature: (LOut<+LOpen;>;LOut<LFinal;>;)LOut<LOpen;>;
class In<in F>
fun bar(x: In<in Open>, y: In<in Any?>): In<in Open> = In()
// method: RedundantProjectionsKt::bar
// jvm signature: (LIn;LIn;)LIn;
// generic signature: (LIn<-LOpen;>;LIn<Ljava/lang/Object;>;)LIn<LOpen;>;