Added check for incompatible variance modifiers and repeated modifiers

This commit is contained in:
Svetlana Isakova
2014-12-19 17:37:22 +03:00
parent d2becce1ac
commit 7b09e85717
38 changed files with 310 additions and 79 deletions
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test;
import org.jetbrains.annotations.NotNull;
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
public class ArrayTypeVariance {
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
import java.util.*
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
import java.util.*
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
import java.util.*
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
import java.util.*
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
public trait ChangeProjectionKind1 {
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
public trait InheritNotVararg {
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
public trait InheritNotVarargInteger {
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
public trait InheritNotVarargNotNull {
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
public trait InheritProjectionKind {
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
public trait InheritVarargNotNull {
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
public trait InheritProjectionKind {
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
public trait SameProjectionKind {
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
public trait TwoSuperclassesConflictingProjectionKinds {
@@ -3,9 +3,6 @@ package test
var Long.date1: Any get() = java.util.Date()
set(value) {}
var Long.date2: Any get() = java.util.Date()
protected set(value) {}
var Long.date3: Any get() = java.util.Date()
private set(value) {}
@@ -21,8 +18,5 @@ public var Long.date8: java.util.Date get() = java.util.Date()
public var Long.date9: java.util.Date get() = java.util.Date()
private set(value) {}
public var Long.date10: java.util.Date get() = java.util.Date()
protected set(value) {}
public var Long.date11: java.util.Date get() = java.util.Date()
public set(value) {}
@@ -3,15 +3,9 @@ package test
internal var kotlin.Long.date1: kotlin.Any
internal fun kotlin.Long.<get-date1>(): kotlin.Any
internal fun kotlin.Long.<set-date1>(/*0*/ value: kotlin.Any): kotlin.Unit
public var kotlin.Long.date10: java.util.Date
public fun kotlin.Long.<get-date10>(): java.util.Date
protected fun kotlin.Long.<set-date10>(/*0*/ value: java.util.Date): kotlin.Unit
public var kotlin.Long.date11: java.util.Date
public fun kotlin.Long.<get-date11>(): java.util.Date
public fun kotlin.Long.<set-date11>(/*0*/ value: java.util.Date): kotlin.Unit
internal var kotlin.Long.date2: kotlin.Any
internal fun kotlin.Long.<get-date2>(): kotlin.Any
protected fun kotlin.Long.<set-date2>(/*0*/ value: kotlin.Any): kotlin.Unit
internal var kotlin.Long.date3: kotlin.Any
internal fun kotlin.Long.<get-date3>(): kotlin.Any
private fun kotlin.Long.<set-date3>(/*0*/ value: kotlin.Any): kotlin.Unit
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
fun nothing(): Array<in Number> = throw Exception()
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
fun nothing(): Array<out Number> = throw Exception()
@@ -1,3 +1,4 @@
//ALLOW_AST_ACCESS
package test
fun <T> nothing(): Array<out T> = throw Exception()