Adjust testData after contains transformation
This commit is contained in:
@@ -11,7 +11,7 @@ fun foo(a: Number) {
|
|||||||
}
|
}
|
||||||
---------------------
|
---------------------
|
||||||
<v0>: {<: Number} NEW: magic[FAKE_INITIALIZER](a: Number) -> <v0>
|
<v0>: {<: Number} NEW: magic[FAKE_INITIALIZER](a: Number) -> <v0>
|
||||||
a <v1>: * NEW: r(a) -> <v1>
|
a <v1>: Int! NEW: r(a) -> <v1>
|
||||||
1 <v2>: * NEW: r(1) -> <v2>
|
1 <v2>: * NEW: r(1) -> <v2>
|
||||||
1 <v3>: * NEW: magic[EQUALS_IN_WHEN_CONDITION](1|<v1>, <v2>) -> <v3>
|
1 <v3>: * NEW: magic[EQUALS_IN_WHEN_CONDITION](1|<v1>, <v2>) -> <v3>
|
||||||
"1" <v4>: {<: String?} NEW: r("1") -> <v4>
|
"1" <v4>: {<: String?} NEW: r("1") -> <v4>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
class MyCollection<T>: Collection<T> {
|
class MyCollection<T>: Collection<T> {
|
||||||
override val size: Int get() = 0
|
override val size: Int get() = 0
|
||||||
override fun isEmpty(): Boolean = true
|
override fun isEmpty(): Boolean = true
|
||||||
override fun contains(o: Any?): Boolean = false
|
override fun contains(o: T): Boolean = false
|
||||||
override fun iterator(): Iterator<T> = throw UnsupportedOperationException()
|
override fun iterator(): Iterator<T> = throw UnsupportedOperationException()
|
||||||
override fun containsAll(c: Collection<Any?>): Boolean = false
|
override fun containsAll(c: Collection<T>): Boolean = false
|
||||||
override fun hashCode(): Int = 0
|
override fun hashCode(): Int = 0
|
||||||
override fun equals(other: Any?): Boolean = false
|
override fun equals(other: Any?): Boolean = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
class MyList<T>: List<T> {
|
class MyList<T>: List<T> {
|
||||||
override val size: Int get() = 0
|
override val size: Int get() = 0
|
||||||
override fun isEmpty(): Boolean = true
|
override fun isEmpty(): Boolean = true
|
||||||
override fun contains(o: Any?): Boolean = false
|
override fun contains(o: T): Boolean = false
|
||||||
override fun iterator(): Iterator<T> = throw Error()
|
override fun iterator(): Iterator<T> = throw Error()
|
||||||
override fun containsAll(c: Collection<Any?>): Boolean = false
|
override fun containsAll(c: Collection<T>): Boolean = false
|
||||||
override fun get(index: Int): T = throw IndexOutOfBoundsException()
|
override fun get(index: Int): T = throw IndexOutOfBoundsException()
|
||||||
override fun indexOf(o: Any?): Int = -1
|
override fun indexOf(o: Any?): Int = -1
|
||||||
override fun lastIndexOf(o: Any?): Int = -1
|
override fun lastIndexOf(o: Any?): Int = -1
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
class MyList<T>(val v: T): List<T> {
|
class MyList<T>(val v: T): List<T> {
|
||||||
override val size: Int get() = 0
|
override val size: Int get() = 0
|
||||||
override fun isEmpty(): Boolean = true
|
override fun isEmpty(): Boolean = true
|
||||||
override fun contains(o: Any?): Boolean = false
|
override fun contains(o: T): Boolean = false
|
||||||
override fun iterator(): Iterator<T> = throw Error()
|
override fun iterator(): Iterator<T> = throw Error()
|
||||||
override fun containsAll(c: Collection<Any?>): Boolean = false
|
override fun containsAll(c: Collection<T>): Boolean = false
|
||||||
override fun get(index: Int): T = v
|
override fun get(index: Int): T = v
|
||||||
override fun indexOf(o: Any?): Int = -1
|
override fun indexOf(o: Any?): Int = -1
|
||||||
override fun lastIndexOf(o: Any?): Int = -1
|
override fun lastIndexOf(o: Any?): Int = -1
|
||||||
|
|||||||
+2
-2
@@ -14,9 +14,9 @@ open class Super<T>(val v: T) {
|
|||||||
class MyList<T>(v: T): Super<T>(v), List<T> {
|
class MyList<T>(v: T): Super<T>(v), List<T> {
|
||||||
override val size: Int get() = 0
|
override val size: Int get() = 0
|
||||||
override fun isEmpty(): Boolean = true
|
override fun isEmpty(): Boolean = true
|
||||||
override fun contains(o: Any?): Boolean = false
|
override fun contains(o: T): Boolean = false
|
||||||
override fun iterator(): Iterator<T> = throw Error()
|
override fun iterator(): Iterator<T> = throw Error()
|
||||||
override fun containsAll(c: Collection<Any?>): Boolean = false
|
override fun containsAll(c: Collection<T>): Boolean = false
|
||||||
override fun get(index: Int): T = v
|
override fun get(index: Int): T = v
|
||||||
override fun indexOf(o: Any?): Int = -1
|
override fun indexOf(o: Any?): Int = -1
|
||||||
override fun lastIndexOf(o: Any?): Int = -1
|
override fun lastIndexOf(o: Any?): Int = -1
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
class MyList: List<String> {
|
class MyList: List<String> {
|
||||||
override val size: Int get() = 0
|
override val size: Int get() = 0
|
||||||
override fun isEmpty(): Boolean = true
|
override fun isEmpty(): Boolean = true
|
||||||
override fun contains(o: Any?): Boolean = false
|
override fun contains(o: String): Boolean = false
|
||||||
override fun iterator(): Iterator<String> = throw Error()
|
override fun iterator(): Iterator<String> = throw Error()
|
||||||
override fun containsAll(c: Collection<Any?>): Boolean = false
|
override fun containsAll(c: Collection<String>): Boolean = false
|
||||||
override fun get(index: Int): String = throw IndexOutOfBoundsException()
|
override fun get(index: Int): String = throw IndexOutOfBoundsException()
|
||||||
override fun indexOf(o: Any?): Int = -1
|
override fun indexOf(o: Any?): Int = -1
|
||||||
override fun lastIndexOf(o: Any?): Int = -1
|
override fun lastIndexOf(o: Any?): Int = -1
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ interface Addable {
|
|||||||
class C : Addable, List<String> {
|
class C : Addable, List<String> {
|
||||||
override val size: Int get() = null!!
|
override val size: Int get() = null!!
|
||||||
override fun isEmpty(): Boolean = null!!
|
override fun isEmpty(): Boolean = null!!
|
||||||
override fun contains(o: Any?): Boolean = null!!
|
override fun contains(o: String): Boolean = null!!
|
||||||
override fun iterator(): Iterator<String> = null!!
|
override fun iterator(): Iterator<String> = null!!
|
||||||
override fun containsAll(c: Collection<Any?>): Boolean = null!!
|
override fun containsAll(c: Collection<String>): Boolean = null!!
|
||||||
override fun get(index: Int): String = null!!
|
override fun get(index: Int): String = null!!
|
||||||
override fun indexOf(o: Any?): Int = null!!
|
override fun indexOf(o: Any?): Int = null!!
|
||||||
override fun lastIndexOf(o: Any?): Int = null!!
|
override fun lastIndexOf(o: Any?): Int = null!!
|
||||||
|
|||||||
+2
-2
@@ -7,9 +7,9 @@ open class SetStringImpl {
|
|||||||
class S : Set<String>, SetStringImpl() {
|
class S : Set<String>, SetStringImpl() {
|
||||||
override val size: Int get() = 0
|
override val size: Int get() = 0
|
||||||
override fun isEmpty(): Boolean = true
|
override fun isEmpty(): Boolean = true
|
||||||
override fun contains(o: Any?): Boolean = false
|
override fun contains(o: String): Boolean = false
|
||||||
override fun iterator(): Iterator<String> = null!!
|
override fun iterator(): Iterator<String> = null!!
|
||||||
override fun containsAll(c: Collection<Any?>) = false
|
override fun containsAll(c: Collection<String>) = false
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+2
-2
@@ -3,9 +3,9 @@ import java.util.Collections
|
|||||||
class A<U : Number, V : U, W : V> : Set<W> {
|
class A<U : Number, V : U, W : V> : Set<W> {
|
||||||
override val size: Int get() = 0
|
override val size: Int get() = 0
|
||||||
override fun isEmpty(): Boolean = true
|
override fun isEmpty(): Boolean = true
|
||||||
override fun contains(o: Any?): Boolean = false
|
override fun contains(o: W): Boolean = false
|
||||||
override fun iterator(): Iterator<W> = Collections.emptySet<W>().iterator()
|
override fun iterator(): Iterator<W> = Collections.emptySet<W>().iterator()
|
||||||
override fun containsAll(c: Collection<Any?>): Boolean = c.isEmpty()
|
override fun containsAll(c: Collection<W>): Boolean = c.isEmpty()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun expectUoe(block: () -> Any) {
|
fun expectUoe(block: () -> Any) {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ class MyCollection<T> : Collection<List<Iterator<T>>> {
|
|||||||
override fun iterator() = null!!
|
override fun iterator() = null!!
|
||||||
override val size: Int get() = null!!
|
override val size: Int get() = null!!
|
||||||
override fun isEmpty(): Boolean = null!!
|
override fun isEmpty(): Boolean = null!!
|
||||||
override fun contains(o: Any?): Boolean = null!!
|
override fun contains(o: List<Iterator<T>>): Boolean = null!!
|
||||||
override fun containsAll(c: Collection<Any?>): Boolean = null!!
|
override fun containsAll(c: Collection<List<Iterator<T>>>): Boolean = null!!
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ interface A0 {
|
|||||||
|
|
||||||
class B0 : Collection<String>, A0 {
|
class B0 : Collection<String>, A0 {
|
||||||
override fun isEmpty() = throw UnsupportedOperationException()
|
override fun isEmpty() = throw UnsupportedOperationException()
|
||||||
override fun contains(o: Any?) = throw UnsupportedOperationException()
|
override fun contains(o: String) = throw UnsupportedOperationException()
|
||||||
override fun iterator() = throw UnsupportedOperationException()
|
override fun iterator() = throw UnsupportedOperationException()
|
||||||
override fun containsAll(c: Collection<Any?>) = throw UnsupportedOperationException()
|
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
|
|
||||||
open class A1 {
|
open class A1 {
|
||||||
@@ -17,9 +17,9 @@ open class A1 {
|
|||||||
|
|
||||||
class B1 : Collection<String>, A1() {
|
class B1 : Collection<String>, A1() {
|
||||||
override fun isEmpty() = throw UnsupportedOperationException()
|
override fun isEmpty() = throw UnsupportedOperationException()
|
||||||
override fun contains(o: Any?) = throw UnsupportedOperationException()
|
override fun contains(o: String) = throw UnsupportedOperationException()
|
||||||
override fun iterator() = throw UnsupportedOperationException()
|
override fun iterator() = throw UnsupportedOperationException()
|
||||||
override fun containsAll(c: Collection<Any?>) = throw UnsupportedOperationException()
|
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
|
|
||||||
interface I2 {
|
interface I2 {
|
||||||
@@ -42,9 +42,9 @@ interface I4<T> {
|
|||||||
|
|
||||||
class B4 : Collection<String>, I4<Int> {
|
class B4 : Collection<String>, I4<Int> {
|
||||||
override fun isEmpty() = throw UnsupportedOperationException()
|
override fun isEmpty() = throw UnsupportedOperationException()
|
||||||
override fun contains(o: Any?) = throw UnsupportedOperationException()
|
override fun contains(o: String) = throw UnsupportedOperationException()
|
||||||
override fun iterator() = throw UnsupportedOperationException()
|
override fun iterator() = throw UnsupportedOperationException()
|
||||||
override fun containsAll(c: Collection<Any?>) = throw UnsupportedOperationException()
|
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
|
|
||||||
interface I5 : Collection<String> {
|
interface I5 : Collection<String> {
|
||||||
@@ -53,9 +53,9 @@ interface I5 : Collection<String> {
|
|||||||
|
|
||||||
class B5 : I5 {
|
class B5 : I5 {
|
||||||
override fun isEmpty() = throw UnsupportedOperationException()
|
override fun isEmpty() = throw UnsupportedOperationException()
|
||||||
override fun contains(o: Any?) = throw UnsupportedOperationException()
|
override fun contains(o: String) = throw UnsupportedOperationException()
|
||||||
override fun iterator() = throw UnsupportedOperationException()
|
override fun iterator() = throw UnsupportedOperationException()
|
||||||
override fun containsAll(c: Collection<Any?>) = throw UnsupportedOperationException()
|
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class A1 : MutableCollection<String> {
|
|||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun contains(o: Any?): Boolean {
|
override fun contains(o: String): Boolean {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ class A1 : MutableCollection<String> {
|
|||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun containsAll(c: Collection<Any?>): Boolean {
|
override fun containsAll(c: Collection<String>): Boolean {
|
||||||
throw UnsupportedOperationException()
|
throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
abstract class C : Test.A, List<String> {
|
abstract class C : Test.A, List<String> {
|
||||||
override val size: Int get() = null!!
|
override val size: Int get() = null!!
|
||||||
override fun isEmpty(): Boolean = null!!
|
override fun isEmpty(): Boolean = null!!
|
||||||
override fun contains(o: Any?): Boolean = null!!
|
override fun contains(o: String): Boolean = null!!
|
||||||
override fun iterator(): Iterator<String> = null!!
|
override fun iterator(): Iterator<String> = null!!
|
||||||
override fun containsAll(c: Collection<Any?>): Boolean = null!!
|
override fun containsAll(c: Collection<String>): Boolean = null!!
|
||||||
override fun get(index: Int): String = null!!
|
override fun get(index: Int): String = null!!
|
||||||
override fun indexOf(o: Any?): Int = null!!
|
override fun indexOf(o: Any?): Int = null!!
|
||||||
override fun lastIndexOf(o: Any?): Int = null!!
|
override fun lastIndexOf(o: Any?): Int = null!!
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package collections
|
|||||||
fun <T> testCollection(c: Collection<T>, t: T) {
|
fun <T> testCollection(c: Collection<T>, t: T) {
|
||||||
c.size
|
c.size
|
||||||
c.isEmpty()
|
c.isEmpty()
|
||||||
c.contains(1)
|
c.contains(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||||
val <!UNUSED_VARIABLE!>iterator<!>: Iterator<T> = c.iterator()
|
val <!UNUSED_VARIABLE!>iterator<!>: Iterator<T> = c.iterator()
|
||||||
c.containsAll(c)
|
c.containsAll(c)
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ fun <T> testCollection(c: Collection<T>, t: T) {
|
|||||||
fun <T> testMutableCollection(c: MutableCollection<T>, t: T) {
|
fun <T> testMutableCollection(c: MutableCollection<T>, t: T) {
|
||||||
c.size
|
c.size
|
||||||
c.isEmpty()
|
c.isEmpty()
|
||||||
c.contains(1)
|
c.contains(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||||
val <!UNUSED_VARIABLE!>iterator<!>: Iterator<T> = c.iterator()
|
val <!UNUSED_VARIABLE!>iterator<!>: Iterator<T> = c.iterator()
|
||||||
c.containsAll(c)
|
c.containsAll(c)
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ fun <T> testMutableList(l: MutableList<T>, t: T) {
|
|||||||
fun <T> testSet(s: Set<T>, t: T) {
|
fun <T> testSet(s: Set<T>, t: T) {
|
||||||
s.size
|
s.size
|
||||||
s.isEmpty()
|
s.isEmpty()
|
||||||
s.contains(1)
|
s.contains(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||||
val <!UNUSED_VARIABLE!>iterator<!>: Iterator<T> = s.iterator()
|
val <!UNUSED_VARIABLE!>iterator<!>: Iterator<T> = s.iterator()
|
||||||
s.containsAll(s)
|
s.containsAll(s)
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ fun <T> testSet(s: Set<T>, t: T) {
|
|||||||
fun <T> testMutableSet(s: MutableSet<T>, t: T) {
|
fun <T> testMutableSet(s: MutableSet<T>, t: T) {
|
||||||
s.size
|
s.size
|
||||||
s.isEmpty()
|
s.isEmpty()
|
||||||
s.contains(1)
|
s.contains(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
||||||
val <!UNUSED_VARIABLE!>iterator<!>: Iterator<T> = s.iterator()
|
val <!UNUSED_VARIABLE!>iterator<!>: Iterator<T> = s.iterator()
|
||||||
s.containsAll(s)
|
s.containsAll(s)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package foo
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
val list = arrayListOf(3, "2", -1, null, 0, 8, 5, "3", 77, -15)
|
val list: List<Any?> = arrayListOf(3, "2", -1, null, 0, 8, 5, "3", 77, -15)
|
||||||
val subset = arrayListOf(3, "2", -1, null)
|
val subset = arrayListOf(3, "2", -1, null)
|
||||||
val empty = arrayListOf<Any?>()
|
val empty = arrayListOf<Any?>()
|
||||||
val withOtherElements = arrayListOf(3, 54, null)
|
val withOtherElements = arrayListOf(3, 54, null)
|
||||||
|
|||||||
Reference in New Issue
Block a user