Fix compiler tests
This commit is contained in:
@@ -35,15 +35,15 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
class MyArray() {
|
||||
fun get(i: Int): Int = 1
|
||||
fun set(i: Int, value: Int): Int = 1
|
||||
operator fun get(i: Int): Int = 1
|
||||
operator fun set(i: Int, value: Int): Int = 1
|
||||
}
|
||||
|
||||
class MyArray1() {
|
||||
fun get(i: Int): Int = 1
|
||||
fun set(i: Int, value: Int) {}
|
||||
operator fun get(i: Int): Int = 1
|
||||
operator fun set(i: Int, value: Int) {}
|
||||
}
|
||||
|
||||
class MyNumber() {
|
||||
fun inc(): MyNumber = MyNumber()
|
||||
operator fun inc(): MyNumber = MyNumber()
|
||||
}
|
||||
@@ -6,18 +6,18 @@ package kt235 {
|
||||
public final class MyArray {
|
||||
public constructor MyArray()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun get(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
public final operator fun get(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun set(/*0*/ i: kotlin.Int, /*1*/ value: kotlin.Int): kotlin.Int
|
||||
public final operator fun set(/*0*/ i: kotlin.Int, /*1*/ value: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class MyArray1 {
|
||||
public constructor MyArray1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun get(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
public final operator fun get(/*0*/ i: kotlin.Int): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun set(/*0*/ i: kotlin.Int, /*1*/ value: kotlin.Int): kotlin.Unit
|
||||
public final operator fun set(/*0*/ i: kotlin.Int, /*1*/ value: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ package kt235 {
|
||||
public constructor MyNumber()
|
||||
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 inc(): kt235.MyNumber
|
||||
public final operator fun inc(): kt235.MyNumber
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ fun test() {
|
||||
attributes["href"] = "1" // inference fails, but it shouldn't
|
||||
}
|
||||
|
||||
fun <K, V> MutableMap<K, V>.set(key : K, value : V) {}//= this.put(key, value)
|
||||
operator fun <K, V> MutableMap<K, V>.set(key : K, value : V) {}//= this.put(key, value)
|
||||
@@ -1,4 +1,4 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
public fun </*0*/ K, /*1*/ V> kotlin.MutableMap<K, V>.set(/*0*/ key: K, /*1*/ value: V): kotlin.Unit
|
||||
public operator fun </*0*/ K, /*1*/ V> kotlin.MutableMap<K, V>.set(/*0*/ key: K, /*1*/ value: V): kotlin.Unit
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// KT-282 Nullability in extension functions and in binary calls
|
||||
|
||||
class Set {
|
||||
fun contains(<!UNUSED_PARAMETER!>x<!> : Int) : Boolean = true
|
||||
operator fun contains(<!UNUSED_PARAMETER!>x<!> : Int) : Boolean = true
|
||||
}
|
||||
|
||||
fun Set?.plus(<!UNUSED_PARAMETER!>x<!> : Int) : Int = 1
|
||||
operator fun Set?.plus(<!UNUSED_PARAMETER!>x<!> : Int) : Int = 1
|
||||
|
||||
fun Int?.contains(<!UNUSED_PARAMETER!>x<!> : Int) : Boolean = false
|
||||
operator fun Int?.contains(<!UNUSED_PARAMETER!>x<!> : Int) : Boolean = false
|
||||
|
||||
fun f(): Unit {
|
||||
var set : Set? = null
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package
|
||||
|
||||
public fun f(): kotlin.Unit
|
||||
public fun kotlin.Int?.contains(/*0*/ x: kotlin.Int): kotlin.Boolean
|
||||
public fun Set?.plus(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
public operator fun kotlin.Int?.contains(/*0*/ x: kotlin.Int): kotlin.Boolean
|
||||
public operator fun Set?.plus(/*0*/ x: kotlin.Int): kotlin.Int
|
||||
|
||||
public final class Set {
|
||||
public constructor Set()
|
||||
public final fun contains(/*0*/ x: kotlin.Int): kotlin.Boolean
|
||||
public final operator fun contains(/*0*/ x: kotlin.Int): kotlin.Boolean
|
||||
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 open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
@@ -5,4 +5,4 @@ fun test() {
|
||||
attributes["href"] = "1" // inference fails, but it shouldn't
|
||||
}
|
||||
|
||||
fun <K, V> Map<K, V>.set(key : K, value : V) {}//= this.put(key, value)
|
||||
operator fun <K, V> Map<K, V>.set(key : K, value : V) {}//= this.put(key, value)
|
||||
@@ -1,4 +1,4 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
public fun </*0*/ K, /*1*/ V> kotlin.Map<K, V>.set(/*0*/ key: K, /*1*/ value: V): kotlin.Unit
|
||||
public operator fun </*0*/ K, /*1*/ V> kotlin.Map<K, V>.set(/*0*/ key: K, /*1*/ value: V): kotlin.Unit
|
||||
|
||||
@@ -11,7 +11,7 @@ fun bar(list : MutableList<Int>) {
|
||||
System.out.println(list)
|
||||
}
|
||||
|
||||
fun <T> MutableList<T>.plusAssign(t : T) {
|
||||
operator fun <T> MutableList<T>.plusAssign(t : T) {
|
||||
add(t)
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ fun foo() {
|
||||
}
|
||||
|
||||
class MyNumber(var i: Int) {
|
||||
fun minusAssign(m : MyNumber) {
|
||||
operator fun minusAssign(m : MyNumber) {
|
||||
i -= m.i
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ package
|
||||
package kt469 {
|
||||
public fun bar(/*0*/ list: kotlin.MutableList<kotlin.Int>): kotlin.Unit
|
||||
public fun foo(): kotlin.Unit
|
||||
public fun </*0*/ T> kotlin.MutableList<T>.plusAssign(/*0*/ t: T): kotlin.Unit
|
||||
public operator fun </*0*/ T> kotlin.MutableList<T>.plusAssign(/*0*/ t: T): kotlin.Unit
|
||||
|
||||
public final class MyNumber {
|
||||
public constructor MyNumber(/*0*/ i: kotlin.Int)
|
||||
public final var i: kotlin.Int
|
||||
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 minusAssign(/*0*/ m: kt469.MyNumber): kotlin.Unit
|
||||
public final operator fun minusAssign(/*0*/ m: kt469.MyNumber): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ fun <T> Array<T>?.get(i: Int) : T {
|
||||
else throw NullPointerException()
|
||||
}
|
||||
|
||||
fun Int?.inc() : Int {
|
||||
operator fun Int?.inc() : Int {
|
||||
if (this != null)
|
||||
return <!DEBUG_INFO_SMARTCAST!>this<!>.inc()
|
||||
else
|
||||
|
||||
@@ -2,4 +2,4 @@ package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
public fun </*0*/ T> kotlin.Array<T>?.get(/*0*/ i: kotlin.Int): T
|
||||
public fun kotlin.Int?.inc(): kotlin.Int
|
||||
public operator fun kotlin.Int?.inc(): kotlin.Int
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package lol
|
||||
|
||||
class B() {
|
||||
fun plusAssign(<!UNUSED_PARAMETER!>other<!> : B) : String {
|
||||
operator fun plusAssign(<!UNUSED_PARAMETER!>other<!> : B) : String {
|
||||
return "s"
|
||||
}
|
||||
fun minusAssign(<!UNUSED_PARAMETER!>other<!> : B) : String {
|
||||
operator fun minusAssign(<!UNUSED_PARAMETER!>other<!> : B) : String {
|
||||
return "s"
|
||||
}
|
||||
fun modAssign(<!UNUSED_PARAMETER!>other<!> : B) : String {
|
||||
operator fun modAssign(<!UNUSED_PARAMETER!>other<!> : B) : String {
|
||||
return "s"
|
||||
}
|
||||
fun divAssign(<!UNUSED_PARAMETER!>other<!> : B) : String {
|
||||
operator fun divAssign(<!UNUSED_PARAMETER!>other<!> : B) : String {
|
||||
return "s"
|
||||
}
|
||||
fun timesAssign(<!UNUSED_PARAMETER!>other<!> : B) : String {
|
||||
operator fun timesAssign(<!UNUSED_PARAMETER!>other<!> : B) : String {
|
||||
return "s"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ package lol {
|
||||
|
||||
public final class B {
|
||||
public constructor B()
|
||||
public final fun divAssign(/*0*/ other: lol.B): kotlin.String
|
||||
public final operator fun divAssign(/*0*/ other: lol.B): kotlin.String
|
||||
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 minusAssign(/*0*/ other: lol.B): kotlin.String
|
||||
public final fun modAssign(/*0*/ other: lol.B): kotlin.String
|
||||
public final fun plusAssign(/*0*/ other: lol.B): kotlin.String
|
||||
public final fun timesAssign(/*0*/ other: lol.B): kotlin.String
|
||||
public final operator fun minusAssign(/*0*/ other: lol.B): kotlin.String
|
||||
public final operator fun modAssign(/*0*/ other: lol.B): kotlin.String
|
||||
public final operator fun plusAssign(/*0*/ other: lol.B): kotlin.String
|
||||
public final operator fun timesAssign(/*0*/ other: lol.B): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ package kt629
|
||||
|
||||
class A() {
|
||||
var p = "yeah"
|
||||
fun mod(<!UNUSED_PARAMETER!>other<!> : A) : A {
|
||||
operator fun mod(<!UNUSED_PARAMETER!>other<!> : A) : A {
|
||||
return A();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ package kt629 {
|
||||
public final var p: kotlin.String
|
||||
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 mod(/*0*/ other: kt629.A): kt629.A
|
||||
public final operator fun mod(/*0*/ other: kt629.A): kt629.A
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ public final class MyWrapper : Wrapper<A> {
|
||||
public constructor Pair</*0*/ out T>(/*0*/ a: T, /*1*/ b: T)
|
||||
public final val a: T
|
||||
public final val b: T
|
||||
public final /*synthesized*/ fun component1(): T
|
||||
public final /*synthesized*/ fun component2(): T
|
||||
public final operator /*synthesized*/ fun component1(): T
|
||||
public final operator /*synthesized*/ fun component2(): T
|
||||
public final /*synthesized*/ fun copy(/*0*/ a: T = ..., /*1*/ b: T = ...): Pair<T>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
@@ -28,8 +28,8 @@ public final class MyWrapper : Wrapper<A> {
|
||||
public constructor Pair</*0*/ out T>(/*0*/ a: T, /*1*/ b: T)
|
||||
public final val a: T
|
||||
public final val b: T
|
||||
public final /*synthesized*/ fun component1(): T
|
||||
public final /*synthesized*/ fun component2(): T
|
||||
public final operator /*synthesized*/ fun component1(): T
|
||||
public final operator /*synthesized*/ fun component2(): T
|
||||
public final /*synthesized*/ fun copy(/*0*/ a: T = ..., /*1*/ b: T = ...): Pair<T>
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
|
||||
Reference in New Issue
Block a user