Removing usages of tuples from test data

(KT-2358 Drop tuples)
 #KT-2358 In progress
This commit is contained in:
Andrey Breslav
2012-09-18 13:48:20 +04:00
parent dee5152f9b
commit 5eaa5b396b
64 changed files with 172 additions and 330 deletions
@@ -1,12 +1,14 @@
//KT-657 Semantic checks for when without condition
package kt657
class Pair<A, B>(a: A, b: B)
fun foo() =
when {
cond1() -> 12
cond2() -> 2
<!TYPE_MISMATCH_IN_CONDITION!>4<!> -> 34
<!TYPE_MISMATCH_IN_CONDITION!>#(1, 2)<!> -> 3
<!TYPE_MISMATCH_IN_CONDITION!>Pair(1, 2)<!> -> 3
<!EXPECTED_CONDITION!>in 1..10<!> -> 34
<!TYPE_MISMATCH_IN_CONDITION!>4<!> -> 38
<!EXPECTED_CONDITION!>is Int<!> -> 33
@@ -3,17 +3,18 @@
package kt234_kt973
class Pair<A, B>(a: A, b: B)
fun test(t : #(Int, Int)) : Int {
fun test(t : Pair<Int, Int>) : Int {
<!NO_ELSE_IN_WHEN!>when<!> (t) {
#(10, 10) -> return 1
Pair(10, 10) -> return 1
}
return 0 // unreachable code
}
fun test1(t : #(Int, Int)) : Int {
fun test1(t : Pair<Int, Int>) : Int {
when (t) {
#(10, 10) -> return 1
Pair(10, 10) -> return 1
else -> return 2
}
<!UNREACHABLE_CODE!>return 0<!> // unreachable code