Fix compiler tests
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
+2
-2
@@ -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<!>())
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+1
-1
@@ -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)
|
||||
+1
-1
@@ -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?
|
||||
|
||||
compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedForVariableAsFunctionCall.kt
Vendored
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user