Report an error when variance is specified for a function or property type parameter

This commit is contained in:
Andrey Breslav
2012-11-22 11:03:09 +04:00
parent d8c9d19bd7
commit 12fd07af08
20 changed files with 58 additions and 72 deletions
@@ -1,3 +0,0 @@
package test
fun <in T> f() = 1
@@ -1,3 +0,0 @@
namespace test
internal final fun </*0*/ in T : jet.Any?>f(): jet.Int
@@ -1,3 +0,0 @@
package test
fun <out T> f() = 1
@@ -1,3 +0,0 @@
namespace test
internal final fun </*0*/ out T : jet.Any?>f(): jet.Int
@@ -1,3 +0,0 @@
package test
fun <in P, Q : P> funParamReferencesParam() = 1
@@ -1,3 +0,0 @@
namespace test
internal final fun </*0*/ in P : jet.Any?, /*1*/ Q : P>funParamReferencesParam(): jet.Int
@@ -1,3 +0,0 @@
package test
fun <P, in Q> funTwoTypeParams() = 1
@@ -1,3 +0,0 @@
namespace test
internal final fun </*0*/ P : jet.Any?, /*1*/ in Q : jet.Any?>funTwoTypeParams(): jet.Int