Fix compiler tests

This commit is contained in:
Yan Zhulanow
2015-09-21 23:40:34 +03:00
parent 35362a0f3b
commit 6db9344659
319 changed files with 1034 additions and 1032 deletions
+1 -1
View File
@@ -21,6 +21,6 @@ fun tests() {
}
// from standard library
fun <K, V> MutableMap<K, V>.set(key : K, value : V) : V<!BASE_WITH_NULLABLE_UPPER_BOUND!>?<!> = this.put(key, value)
operator fun <K, V> MutableMap<K, V>.set(key : K, value : V) : V<!BASE_WITH_NULLABLE_UPPER_BOUND!>?<!> = this.put(key, value)
fun println(message : Any?) = System.out.println(message)
+1 -1
View File
@@ -5,5 +5,5 @@ package a {
public fun println(/*0*/ message: kotlin.Any?): kotlin.Unit
private fun </*0*/ T> test(/*0*/ value: T, /*1*/ extf: kotlin.String.(T) -> kotlin.Unit): kotlin.Unit
public fun tests(): kotlin.Unit
public fun </*0*/ K, /*1*/ V> kotlin.MutableMap<K, V>.set(/*0*/ key: K, /*1*/ value: V): V?
public operator fun </*0*/ K, /*1*/ V> kotlin.MutableMap<K, V>.set(/*0*/ key: K, /*1*/ value: V): V?
}
@@ -1,7 +1,7 @@
package b
class A {
fun <T> get(i: Int): List<T> = throw Exception("$i")
operator fun <T> get(i: Int): List<T> = throw Exception("$i")
}
fun bar(l: List<Int>) = l
@@ -7,7 +7,7 @@ package b {
public final class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public final fun </*0*/ T> get(/*0*/ i: kotlin.Int): kotlin.List<T>
public final operator fun </*0*/ T> get(/*0*/ i: kotlin.Int): kotlin.List<T>
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -20,7 +20,7 @@ fun test(z: Z) {
}
//binary operation expression
fun <T> Z.plus(a: A<T>): A<T> = a
operator fun <T> Z.plus(a: A<T>): A<T> = a
fun test1(z: Z) {
id(z <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>+<!> <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>newA<!>())
@@ -32,7 +32,7 @@ fun test1(z: Z) {
}
//comparison operation
fun <T> Z.compareTo(a: A<T>): Int { use(a); return 1 }
operator fun <T> Z.compareTo(a: A<T>): Int { use(a); return 1 }
fun test2(z: Z) {
val a: Boolean = id(z <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!><<!> <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>newA<!>())
@@ -11,10 +11,10 @@ package h {
public fun test5(): kotlin.Unit
public fun </*0*/ T> toBeOrNot(): kotlin.Boolean
public fun use(/*0*/ vararg a: kotlin.Any? /*kotlin.Array<out kotlin.Any?>*/): kotlin.Array<out kotlin.Any?>
public fun </*0*/ T> h.Z.compareTo(/*0*/ a: h.A<T>): kotlin.Int
public operator fun </*0*/ T> h.Z.compareTo(/*0*/ a: h.A<T>): kotlin.Int
public fun h.Z.equals(/*0*/ any: kotlin.Any): kotlin.Int
public fun </*0*/ T> h.Z.foo(/*0*/ a: h.A<T>): h.A<T>
public fun </*0*/ T> h.Z.plus(/*0*/ a: h.A<T>): h.A<T>
public operator fun </*0*/ T> h.Z.plus(/*0*/ a: h.A<T>): h.A<T>
public interface A</*0*/ T> {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
@@ -5,4 +5,4 @@ fun test(map: MutableMap<Int, Int>, t: Int) {
}
//from library
fun <K, V> MutableMap<K, V>.set(key : K, value : V) : V<!BASE_WITH_NULLABLE_UPPER_BOUND!>?<!> = this.put(key, value)
operator fun <K, V> MutableMap<K, V>.set(key : K, value : V) : V<!BASE_WITH_NULLABLE_UPPER_BOUND!>?<!> = this.put(key, value)
@@ -2,4 +2,4 @@ package
public fun </*0*/ T> foo(/*0*/ t: T): T
public fun test(/*0*/ map: kotlin.MutableMap<kotlin.Int, kotlin.Int>, /*1*/ t: kotlin.Int): kotlin.Unit
public fun </*0*/ K, /*1*/ V> kotlin.MutableMap<K, V>.set(/*0*/ key: K, /*1*/ value: V): V?
public operator fun </*0*/ K, /*1*/ V> kotlin.MutableMap<K, V>.set(/*0*/ key: K, /*1*/ value: V): V?
@@ -6,7 +6,7 @@ class A(val b: B) {
}
class B {
fun <T> invoke(<!UNUSED_PARAMETER!>f<!>: (T) -> T): MyFunc<T> = throw Exception()
operator fun <T> invoke(<!UNUSED_PARAMETER!>f<!>: (T) -> T): MyFunc<T> = throw Exception()
}
fun id<R>(r: R) = r
@@ -16,7 +16,7 @@ package j {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public final fun </*0*/ T> invoke(/*0*/ f: (T) -> T): j.MyFunc<T>
public final operator fun </*0*/ T> invoke(/*0*/ f: (T) -> T): j.MyFunc<T>
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -14,4 +14,4 @@ fun test() {
//from library
fun arrayList<T>(vararg <!UNUSED_PARAMETER!>values<!>: T) : ArrayList<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
fun <T> Iterable<T>.plus(<!UNUSED_PARAMETER!>elements<!>: Iterable<T>): List<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
operator fun <T> Iterable<T>.plus(<!UNUSED_PARAMETER!>elements<!>: Iterable<T>): List<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
@@ -3,5 +3,5 @@ package
package n {
public fun </*0*/ T> arrayList(/*0*/ vararg values: T /*kotlin.Array<out T>*/): java.util.ArrayList<T>
public fun test(): kotlin.Unit
public fun </*0*/ T> kotlin.Iterable<T>.plus(/*0*/ elements: kotlin.Iterable<T>): kotlin.List<T>
public operator fun </*0*/ T> kotlin.Iterable<T>.plus(/*0*/ elements: kotlin.Iterable<T>): kotlin.List<T>
}
@@ -5,5 +5,5 @@ class B<T> {
fun <S> x (y: B<Iterable<S>>) {
val z: S = y[""] // does not work with [], but works with .get()
}
fun <S> get(s : String): S = throw Exception()
operator fun <S> get(s : String): S = throw Exception()
}
@@ -3,7 +3,7 @@ package
public final class B</*0*/ T> {
public constructor B</*0*/ T>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public final fun </*0*/ S> get(/*0*/ s: kotlin.String): S
public final operator fun </*0*/ S> get(/*0*/ s: kotlin.String): S
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public final fun </*0*/ S> x(/*0*/ y: B<kotlin.Iterable<S>>): kotlin.Unit
@@ -8,4 +8,4 @@ class F<T> {
val z: ArrayList<T> = y["", w]
}
}
fun <V, T> Any.get(s: String, w: ArrayList<V>): ArrayList<T> = throw Exception()
operator fun <V, T> Any.get(s: String, w: ArrayList<V>): ArrayList<T> = throw Exception()
@@ -1,6 +1,6 @@
package
public fun </*0*/ V, /*1*/ T> kotlin.Any.get(/*0*/ s: kotlin.String, /*1*/ w: java.util.ArrayList<V>): java.util.ArrayList<T>
public operator fun </*0*/ V, /*1*/ T> kotlin.Any.get(/*0*/ s: kotlin.String, /*1*/ w: java.util.ArrayList<V>): java.util.ArrayList<T>
public final class F</*0*/ T> {
public constructor F</*0*/ T>()