Revert 'isEmpty' transformation

This commit is contained in:
Denis Zharkov
2015-10-13 20:49:31 +03:00
committed by Mikhail Glukhikh
parent 17c906658d
commit 6322198a11
71 changed files with 127 additions and 156 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ class StrList : List<String?> {
override val size: Int
get() = throw UnsupportedOperationException()
override val isEmpty: Boolean get() {
override fun isEmpty(): Boolean {
throw UnsupportedOperationException()
}
@@ -1,6 +1,6 @@
class MyCollection<T>: Collection<T> {
override val size: Int get() = 0
override val isEmpty: Boolean get() = true
override fun isEmpty(): Boolean = true
override fun contains(o: T): Boolean = false
override fun iterator(): Iterator<T> = throw UnsupportedOperationException()
override fun containsAll(c: Collection<T>): Boolean = false
+1 -1
View File
@@ -1,6 +1,6 @@
class MyList<T>: List<T> {
override val size: Int get() = 0
override val isEmpty: Boolean get() = true
override fun isEmpty(): Boolean = true
override fun contains(o: T): Boolean = false
override fun iterator(): Iterator<T> = throw Error()
override fun containsAll(c: Collection<T>): Boolean = false
@@ -1,6 +1,6 @@
class MyList<T>(val v: T): List<T> {
override val size: Int get() = 0
override val isEmpty: Boolean get() = true
override fun isEmpty(): Boolean = true
override fun contains(o: T): Boolean = false
override fun iterator(): Iterator<T> = throw Error()
override fun containsAll(c: Collection<T>): Boolean = false
@@ -13,7 +13,7 @@ open class Super<T>(val v: T) {
class MyList<T>(v: T): Super<T>(v), List<T> {
override val size: Int get() = 0
override val isEmpty: Boolean get() = true
override fun isEmpty(): Boolean = true
override fun contains(o: T): Boolean = false
override fun iterator(): Iterator<T> = throw Error()
override fun containsAll(c: Collection<T>): Boolean = false
+1 -1
View File
@@ -1,6 +1,6 @@
class MyMap<K, V>: Map<K, V> {
override val size: Int get() = 0
override val isEmpty: Boolean get() = true
override fun isEmpty(): Boolean = true
override fun containsKey(key: K): Boolean = false
override fun containsValue(value: V): Boolean = false
override fun get(key: K): V? = null
@@ -1,6 +1,6 @@
class MyMap<K, V>: Map<K, V> {
override val size: Int get() = 0
override val isEmpty: Boolean get() = true
override fun isEmpty(): Boolean = true
override fun containsKey(key: K): Boolean = false
override fun containsValue(value: V): Boolean = false
override fun get(key: K): V? = null
@@ -1,6 +1,6 @@
class MyList: List<String> {
override val size: Int get() = 0
override val isEmpty: Boolean get() = true
override fun isEmpty(): Boolean = true
override fun contains(o: String): Boolean = false
override fun iterator(): Iterator<String> = throw Error()
override fun containsAll(c: Collection<String>): Boolean = false
@@ -4,7 +4,7 @@ interface Addable {
class C : Addable, List<String> {
override val size: Int get() = null!!
override val isEmpty: Boolean get() = null!!
override fun isEmpty(): Boolean = null!!
override fun contains(o: String): Boolean = null!!
override fun iterator(): Iterator<String> = null!!
override fun containsAll(c: Collection<String>): Boolean = null!!
@@ -6,7 +6,7 @@ open class SetStringImpl {
class S : Set<String>, SetStringImpl() {
override val size: Int get() = 0
override val isEmpty: Boolean get() = true
override fun isEmpty(): Boolean = true
override fun contains(o: String): Boolean = false
override fun iterator(): Iterator<String> = null!!
override fun containsAll(c: Collection<String>) = false
@@ -2,10 +2,10 @@ import java.util.Collections
class A<U : Number, V : U, W : V> : Set<W> {
override val size: Int get() = 0
override val isEmpty: Boolean get() = true
override fun isEmpty(): Boolean = true
override fun contains(o: W): Boolean = false
override fun iterator(): Iterator<W> = Collections.emptySet<W>().iterator()
override fun containsAll(c: Collection<W>): Boolean = c.isEmpty
override fun containsAll(c: Collection<W>): Boolean = c.isEmpty()
}
fun expectUoe(block: () -> Any) {
@@ -3,7 +3,7 @@ import java.util.ArrayList
class MyCollection<T> : Collection<List<Iterator<T>>> {
override fun iterator() = null!!
override val size: Int get() = null!!
override val isEmpty: Boolean get() = null!!
override fun isEmpty(): Boolean = null!!
override fun contains(o: List<Iterator<T>>): Boolean = null!!
override fun containsAll(c: Collection<List<Iterator<T>>>): Boolean = null!!
}
@@ -5,7 +5,7 @@ interface A0 {
}
class B0 : Collection<String>, A0 {
override val isEmpty: Boolean get() = throw UnsupportedOperationException()
override fun isEmpty() = throw UnsupportedOperationException()
override fun contains(o: String) = throw UnsupportedOperationException()
override fun iterator() = throw UnsupportedOperationException()
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
@@ -18,7 +18,7 @@ open class A1 {
}
class B1 : Collection<String>, A1() {
override val isEmpty: Boolean get() = throw UnsupportedOperationException()
override fun isEmpty() = throw UnsupportedOperationException()
override fun contains(o: String) = throw UnsupportedOperationException()
override fun iterator() = throw UnsupportedOperationException()
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
@@ -43,7 +43,7 @@ interface I4<T> {
}
class B4 : Collection<String>, I4<Int> {
override val isEmpty: Boolean get() = throw UnsupportedOperationException()
override fun isEmpty() = throw UnsupportedOperationException()
override fun contains(o: String) = throw UnsupportedOperationException()
override fun iterator() = throw UnsupportedOperationException()
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
@@ -56,7 +56,7 @@ interface I5 : Collection<String> {
}
class B5 : I5 {
override val isEmpty: Boolean get() = throw UnsupportedOperationException()
override fun isEmpty() = throw UnsupportedOperationException()
override fun contains(o: String) = throw UnsupportedOperationException()
override fun iterator() = throw UnsupportedOperationException()
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
@@ -2,7 +2,7 @@ class A1 : MutableCollection<String> {
override val size: Int
get() = 56
override val isEmpty: Boolean get() {
override fun isEmpty(): Boolean {
throw UnsupportedOperationException()
}
+1 -1
View File
@@ -1,7 +1,7 @@
class A : Map<String, String> {
override val size: Int get() = 56
override val isEmpty: Boolean get() {
override fun isEmpty(): Boolean {
throw UnsupportedOperationException()
}
@@ -1,6 +1,6 @@
abstract class C : Test.A, List<String> {
override val size: Int get() = null!!
override val isEmpty: Boolean get() = null!!
override fun isEmpty(): Boolean = null!!
override fun contains(o: String): Boolean = null!!
override fun iterator(): Iterator<String> = null!!
override fun containsAll(c: Collection<String>): Boolean = null!!
@@ -58,7 +58,7 @@ open class KList<E> : MutableList<E> {
override val size: Int
get() = throw UnsupportedOperationException()
override val isEmpty: Boolean get() {
override fun isEmpty(): Boolean {
throw UnsupportedOperationException()
}
@@ -1,8 +1,7 @@
open class A : MutableList<Int> {
override val size: Int
get() = throw UnsupportedOperationException()
override val isEmpty: Boolean
get() = throw UnsupportedOperationException()
override fun isEmpty(): Boolean = throw UnsupportedOperationException()
override fun contains(o: Int): Boolean {
throw UnsupportedOperationException()
@@ -2,7 +2,7 @@ open class KList : MutableList<String> {
override val size: Int
get() = throw UnsupportedOperationException()
override val isEmpty: Boolean get() {
override fun isEmpty(): Boolean {
throw UnsupportedOperationException()
}