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
@@ -17,7 +17,7 @@ fun test3() {
fun throwNPE() = null!!
class A {
fun plus(<!UNUSED_PARAMETER!>a<!>: A): Nothing = throw Exception()
operator fun plus(<!UNUSED_PARAMETER!>a<!>: A): Nothing = throw Exception()
}
fun bar() {}
@@ -11,7 +11,7 @@ package c {
public constructor A()
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 plus(/*0*/ a: c.A): kotlin.Nothing
public final operator fun plus(/*0*/ a: c.A): kotlin.Nothing
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
@@ -5,12 +5,12 @@ fun testArrayAccess1(array: Array<Any>) {
}
fun testArrayAccess2() {
fun Nothing.get(i: Int, s: String) {}
operator fun Nothing.get(i: Int, s: String) {}
todo()<!UNREACHABLE_CODE!>[1, ""]<!>
}
fun testAraryAccess3() {
fun Nothing.get(n: Nothing) {}
operator fun Nothing.get(n: Nothing) {}
todo()<!UNREACHABLE_CODE!>[todo()]<!>
}
@@ -23,17 +23,17 @@ fun testArrayAssignment2(array: Array<Any>) {
}
fun testArrayAssignment3(n: Nothing) {
fun Nothing.set(i: Int, j: Int) {}
operator fun Nothing.set(i: Int, j: Int) {}
n<!UNREACHABLE_CODE!>[1] = 2<!>
}
fun testArrayAssignment4(n: Nothing) {
fun Nothing.set(i: Int, a: Any) {}
operator fun Nothing.set(i: Int, a: Any) {}
n<!UNREACHABLE_CODE!>[1] = todo()<!>
}
fun testArrayPlusAssign(array: Array<Any>) {
fun Any.plusAssign(a: Any) {}
operator fun Any.plusAssign(a: Any) {}
array[1] <!UNREACHABLE_CODE!>+=<!> todo()
}
@@ -8,7 +8,7 @@ fun testVariableDeclaration() {
}
fun testPlusAssign() {
fun Int.plusAssign(<!UNUSED_PARAMETER!>i<!>: Int) {}
operator fun Int.plusAssign(<!UNUSED_PARAMETER!>i<!>: Int) {}
var a = 1
a <!UNREACHABLE_CODE!>+=<!> todo()
@@ -1,5 +1,5 @@
fun testBinary1() {
fun Int.times(<!UNUSED_PARAMETER!>s<!>: String) {}
operator fun Int.times(<!UNUSED_PARAMETER!>s<!>: String) {}
todo() <!UNREACHABLE_CODE!>* ""<!>
}
@@ -1,12 +1,12 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun testCompound() {
fun Nothing.get(i: Int) {}
operator fun Nothing.get(i: Int) {}
todo()<!UNREACHABLE_CODE!><!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>[12]<!>
}
fun testCompound1() {
fun Int.times(s: String): Array<String> = throw Exception()
operator fun Int.times(s: String): Array<String> = throw Exception()
<!UNREACHABLE_CODE!>(<!>todo() <!UNREACHABLE_CODE!>* "")[1]<!>
}
@@ -1,5 +1,5 @@
fun testFor() {
fun Nothing.iterator() = (0..1).iterator()
operator fun Nothing.iterator() = (0..1).iterator()
<!UNREACHABLE_CODE!>for (i in<!> todo()<!UNREACHABLE_CODE!>) {}<!>
}
@@ -1,10 +1,10 @@
fun testPrefix() {
fun Any.not() {}
operator fun Any.not() {}
<!UNREACHABLE_CODE!>!<!>todo()
}
fun testPostfixWithCall(n: Nothing) {
fun Nothing.inc(): Nothing = this
operator fun Nothing.inc(): Nothing = this
n<!UNREACHABLE_CODE!>++<!>
}